diff options
author | Mohammed Javid <mjavid@codeaurora.org> | 2018-02-23 02:56:54 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-03-06 22:22:19 -0800 |
commit | 55d5b035bd4ff1014da622833d970c5514c42d5a (patch) | |
tree | 3023d753d0030bc189e6a3f16e0f4c36087f1f4f | |
parent | 4ae6d685e7fff9e8c058d4456a935aff47e84835 (diff) | |
download | ipacfg-mgr-55d5b035bd4ff1014da622833d970c5514c42d5a.tar.gz |
ipacm: set upstream flag if downstream IP addr event come later
If IPA_ADDR_EVENT for downstream event comes after IPA_WAN_UP_TETHER
event, upstream flag is not getting set. So later even after
receiving downstream event UL rules will not be installed. Set
upstream flag after receiving IPA_WAN_UP_TETHER event
Change-Id: I96c23b0e2e8aea20b5cdbf67a7f4d0d50b75e6db
-rw-r--r-- | ipacm/src/IPACM_Lan.cpp | 12 | ||||
-rw-r--r-- | ipacm/src/IPACM_Wlan.cpp | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp index 532269f..f7544e8 100644 --- a/ipacm/src/IPACM_Lan.cpp +++ b/ipacm/src/IPACM_Lan.cpp @@ -462,6 +462,18 @@ void IPACM_Lan::event_callback(ipa_cm_event_id event, void *param) } else { IPACMDBG_H("Wan_V6 haven't up yet\n"); } +#else + /* check if Upstream was set before */ + if (IPACM_Wan::isWanUP(ipa_if_num)) + { + IPACMDBG_H("Upstream was set previously for ipv4, change is_upstream_set flag\n"); + is_upstream_set[IPA_IP_v4] = true; + } + if (IPACM_Wan::isWanUP_V6(ipa_if_num)) + { + IPACMDBG_H("Upstream was set previously for ipv6, change is_upstream_set flag\n"); + is_upstream_set[IPA_IP_v6] = true; + } #endif /* Post event to NAT */ if (data->iptype == IPA_IP_v4) diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp index 0669b80..a97c0a0 100644 --- a/ipacm/src/IPACM_Wlan.cpp +++ b/ipacm/src/IPACM_Wlan.cpp @@ -323,6 +323,18 @@ void IPACM_Wlan::event_callback(ipa_cm_event_id event, void *param) } else { IPACMDBG_H("Wan_V6 haven't up yet \n"); } +#else + /* check if Upstream was set before */ + if (IPACM_Wan::isWanUP(ipa_if_num)) + { + IPACMDBG_H("Upstream was set previously for ipv4, change is_upstream_set flag\n"); + is_upstream_set[IPA_IP_v4] = true; + } + if (IPACM_Wan::isWanUP_V6(ipa_if_num)) + { + IPACMDBG_H("Upstream was set previously for ipv6, change is_upstream_set flag\n"); + is_upstream_set[IPA_IP_v6] = true; + } #endif /* checking if SW-RT_enable */ if (IPACM_Iface::ipacmcfg->ipa_sw_rt_enable == true) |