diff options
author | Bruno Martins <bgcngm@gmail.com> | 2016-12-04 16:15:12 +0000 |
---|---|---|
committer | davidevinavil <davidevinavil@gmail.com> | 2017-01-21 18:22:42 +0100 |
commit | 06852dbddd5a722d965e6a211916027cb97de6bf (patch) | |
tree | 8453619818a941d032d1ae1f0106ab6ea27fce34 /data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp | |
parent | 818d87b312de5d56937381b551abe084bba72c9f (diff) |
z2_plus: Update IPACM from upstream
* Tag: LA.UM.5.5.r1-01300-8x96.0
Change-Id: I3891d0c62c622fd0a0f43f25f63deb4d4ba508d6
Diffstat (limited to 'data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp')
-rw-r--r-- | data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp b/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp index 04cb162..84132c9 100644 --- a/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp +++ b/data-ipa-cfg-mgr/ipacm/src/IPACM_Iface.cpp @@ -642,48 +642,6 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) const char *dev_wlan1="wlan1"; const char *dev_ecm0="ecm0"; - /* update the iface ip-type to be IPA_IP_v4, IPA_IP_v6 or both*/ - if (iptype == IPA_IP_v4) - { - - if ((ip_type == IPA_IP_v4) || (ip_type == IPA_IP_MAX)) - { - IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type); - return res; - } - - if (ip_type == IPA_IP_v6) - { - ip_type = IPA_IP_MAX; - } - else - { - ip_type = IPA_IP_v4; - } - - IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type); - } - else - { - - if ((ip_type == IPA_IP_v6) || (ip_type == IPA_IP_MAX)) - { - IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type); - return res; - } - - if (ip_type == IPA_IP_v4) - { - ip_type = IPA_IP_MAX; - } - else - { - ip_type = IPA_IP_v6; - } - - IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type); - } - /* ADD corresponding ipa_rm_resource_name of RX-endpoint before adding all IPV4V6 FT-rules */ if((IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].if_cat== WAN_IF) || (IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].if_cat== EMBMS_IF)) { @@ -991,3 +949,47 @@ int IPACM_Iface::ipa_get_if_index close(fd); return IPACM_SUCCESS; } + +void IPACM_Iface::config_ip_type(ipa_ip_type iptype) +{ + /* update the iface ip-type to be IPA_IP_v4, IPA_IP_v6 or both*/ + if (iptype == IPA_IP_v4) + { + if ((ip_type == IPA_IP_v4) || (ip_type == IPA_IP_MAX)) + { + IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type); + return; + } + + if (ip_type == IPA_IP_v6) + { + ip_type = IPA_IP_MAX; + } + else + { + ip_type = IPA_IP_v4; + } + IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type); + } + else + { + if ((ip_type == IPA_IP_v6) || (ip_type == IPA_IP_MAX)) + { + IPACMDBG_H(" interface(%s:%d) already in ip-type %d\n", dev_name, ipa_if_num, ip_type); + return; + } + + if (ip_type == IPA_IP_v4) + { + ip_type = IPA_IP_MAX; + } + else + { + ip_type = IPA_IP_v6; + } + + IPACMDBG_H(" interface(%s:%d) now ip-type is %d\n", dev_name, ipa_if_num, ip_type); + } + + return; +} |