Snap for 4818534 from 88e98374cb52b954c7598bd81172b5b08b7de4d3 to pi-release

Change-Id: I5364a7954b30a0e812c679c09f520f0845762eca
diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp
index c0378de..5efe20f 100644
--- a/ipacm/src/IPACM_OffloadManager.cpp
+++ b/ipacm/src/IPACM_OffloadManager.cpp
@@ -366,6 +366,14 @@
 	if(upstream_name == NULL)
 	{
 		if (default_gw_index == INVALID_IFACE) {
+			for (index = 0; index < MAX_EVENT_CACHE; index++) {
+				if (event_cache[index].valid == true &&
+					event_cache[index ].event == IPA_WAN_UPSTREAM_ROUTE_ADD_EVENT) {
+					event_cache[index].valid = false;
+					memset(event_cache, 0, MAX_EVENT_CACHE*sizeof(framework_event_cache));
+					return SUCCESS;
+				}
+			}
 			IPACMERR("no previous upstream set before\n");
 			return FAIL_INPUT_CHECK;
 		}