diff options
author | Michael Adisumarta <madisuma@codeaurora.org> | 2020-12-08 02:17:05 -0800 |
---|---|---|
committer | Michael Adisumarta <madisuma@codeaurora.org> | 2020-12-08 02:17:05 -0800 |
commit | b2ee9443129e677851feb483dc7e1bc19a3fb3a3 (patch) | |
tree | 34514b2ec5334aa10a8f476a351d99a8fcd7b73c | |
parent | 45b1741dd55eabfe674dc8ce6fd3f825553c18ad (diff) | |
download | ipacfg-mgr-b2ee9443129e677851feb483dc7e1bc19a3fb3a3.tar.gz |
IPACM: fix the MHI icmpv6 exception rule
Clean the icmp v6 rule when backhaul
type is ipv6.
Change-Id: I5b158f5cbfb6846fc21a9556462c23a0d0f7b2d2
-rw-r--r-- | ipacm/src/IPACM_Lan.cpp | 2 | ||||
-rw-r--r-- | ipacm/src/IPACM_Wan.cpp | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp index a6b2b90..c97168d 100644 --- a/ipacm/src/IPACM_Lan.cpp +++ b/ipacm/src/IPACM_Lan.cpp @@ -4242,7 +4242,7 @@ int IPACM_Lan::handle_private_subnet_android(ipa_ip_type iptype) } else { - IPACMERR("MTU is 0"); + IPACMDBG_H("MTU is zero\n"); } } IPACMDBG_H("total %d MTU rules are needed\n", mtu_rule_cnt); diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp index 763e16a..2ee9f2c 100644 --- a/ipacm/src/IPACM_Wan.cpp +++ b/ipacm/src/IPACM_Wan.cpp @@ -4834,6 +4834,7 @@ int IPACM_Wan::handle_route_del_evt(ipa_ip_type iptype, bool delete_only) int fd_wwan_ioctl; memset(&wan_state, 0, sizeof(wan_state)); #endif + int ret = IPACM_SUCCESS; IPACMDBG_H("got handle_route_del_evt for STA-mode with ip-family:%d \n", iptype); @@ -4974,24 +4975,19 @@ int IPACM_Wan::handle_route_del_evt(ipa_ip_type iptype, bool delete_only) if(delete_offload_frag_rule()) { IPACMERR("Failed to delete DL frag rule \n"); - return IPACM_FAILURE; - } - /* Delete MHI icmpv6 exception rule */ - if(delete_icmpv6_exception_rule()) - { - IPACMERR("Failed to delete icmpv6 rule \n"); - return IPACM_FAILURE; + ret = IPACM_FAILURE; } + /* Delete tcp_fin_rst rule */ if(delete_tcp_fin_rst_exception_rule()) { IPACMERR("Failed to delete tcp_fin_rst rule \n"); - return IPACM_FAILURE; + ret = IPACM_FAILURE; } + return ret; } else { - wandown_data->backhaul_type = m_is_sta_mode; memcpy(wandown_data->ipv6_prefix, ipv6_prefix, sizeof(wandown_data->ipv6_prefix)); evt_data.event = IPA_HANDLE_WAN_DOWN_V6; @@ -5010,6 +5006,13 @@ int IPACM_Wan::handle_route_del_evt(ipa_ip_type iptype, bool delete_only) { memset(IPACM_Wan::wan_up_dev_name, 0, sizeof(IPACM_Wan::wan_up_dev_name)); } + /* Delete MHI icmpv6 exception rule */ + if(delete_icmpv6_exception_rule()) + { + IPACMERR("Failed to delete icmpv6 rule \n"); + return IPACM_FAILURE; + } + } } else |