diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-10 01:51:07 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2018-09-10 01:51:07 -0700 |
| commit | 9c0881adef58369f33c92b11e14a79c46a8eb0cb (patch) | |
| tree | 43fe4e39a42087f7b2229fbb623182b0247f6f8c | |
| parent | 5cc6bfeefab4f1320fde66d84b1b858ca6069966 (diff) | |
| parent | b3759152baa1d860e87d0104af97e889e2ee8891 (diff) | |
Merge b3759152baa1d860e87d0104af97e889e2ee8891 on remote branch
Change-Id: I049d315187ee877c61881affc8203652c9be85ea
| -rw-r--r-- | ipacm/src/IPACM_Iface.cpp | 28 | ||||
| -rw-r--r-- | ipacm/src/IPACM_Netlink.cpp | 6 | ||||
| -rw-r--r-- | ipacm/src/IPACM_OffloadManager.cpp | 8 |
3 files changed, 12 insertions, 30 deletions
diff --git a/ipacm/src/IPACM_Iface.cpp b/ipacm/src/IPACM_Iface.cpp index d05cefd..512846f 100644 --- a/ipacm/src/IPACM_Iface.cpp +++ b/ipacm/src/IPACM_Iface.cpp @@ -854,29 +854,13 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) #ifdef FEATURE_IPA_ANDROID /* Add the ipv6 tcp fragment filtering rule. */ - memset(&flt_rule_entry, 0, sizeof(struct ipa_flt_rule_add)); - flt_rule_entry.at_rear = true; - flt_rule_entry.flt_rule_hdl = -1; - flt_rule_entry.status = -1; - flt_rule_entry.rule.retain_hdr = 1; - flt_rule_entry.rule.to_uc = 0; - flt_rule_entry.rule.eq_attrib_type = 1; - flt_rule_entry.rule.action = IPA_PASS_TO_EXCEPTION; -#ifdef FEATURE_IPA_V3 - flt_rule_entry.rule.hashable = true; -#endif - flt_rule_entry.rule.eq_attrib.rule_eq_bitmap |= (1<<1); - flt_rule_entry.rule.eq_attrib.protocol_eq_present = 1; - flt_rule_entry.rule.eq_attrib.protocol_eq = IPACM_FIREWALL_IPPROTO_TCP; - flt_rule_entry.rule.attrib.u.v6.next_hdr = (uint8_t)IPACM_FIREWALL_IPPROTO_TCP; - /* Configuring Fragment Filtering Rule */ - memcpy(&flt_rule_entry.rule.attrib, - &rx_prop->rx[0].attrib, - sizeof(flt_rule_entry.rule.attrib)); - /* remove meta data mask since we only install default flt rules once for all modem - PDN*/ - flt_rule_entry.rule.attrib.attrib_mask &= ~((uint32_t)IPA_FLT_META_DATA); + IPACMDBG_H("Adding IPv6 TCP fragment filter rule\n"); + + flt_rule_entry.rule.attrib.attrib_mask &= ~((uint32_t)IPA_FLT_DST_ADDR); + + flt_rule_entry.rule.attrib.attrib_mask |= IPA_FLT_NEXT_HDR; + flt_rule_entry.rule.attrib.u.v6.next_hdr = IPACM_FIREWALL_IPPROTO_TCP; flt_rule_entry.rule.attrib.attrib_mask |= IPA_FLT_FRAGMENT; diff --git a/ipacm/src/IPACM_Netlink.cpp b/ipacm/src/IPACM_Netlink.cpp index 9c35497..fa4b8b7 100644 --- a/ipacm/src/IPACM_Netlink.cpp +++ b/ipacm/src/IPACM_Netlink.cpp @@ -686,7 +686,8 @@ static int ipa_nl_decode_nlmsg evt_data.evt_data = data_fid; IPACM_EvtDispatcher::PostEvt(&evt_data); } - + /* Andorid platform will use events from usb-driver directly */ +#ifndef FEATURE_IPA_ANDROID /* Add IPACM support for ECM plug-in/plug_out */ /*-------------------------------------------------------------------------- Check if the interface is running.If its a RTM_NEWLINK and the interface @@ -723,7 +724,7 @@ static int ipa_nl_decode_nlmsg ---------------------------------------------------------------------------*/ evt_data.event = IPA_USB_LINK_UP_EVENT; evt_data.evt_data = data_fid; - IPACMDBG_H("Posting usb IPA_LINK_UP_EVENT with if index: %d\n", + IPACMDBG_H("Posting usb IPA_USB_LINK_UP_EVENT with if index: %d\n", data_fid->if_index); IPACM_EvtDispatcher::PostEvt(&evt_data); } @@ -754,6 +755,7 @@ static int ipa_nl_decode_nlmsg data_fid->if_index); IPACM_EvtDispatcher::PostEvt(&evt_data); } +#endif /* not defined(FEATURE_IPA_ANDROID)*/ } break; diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp index a343b86..1359d49 100644 --- a/ipacm/src/IPACM_OffloadManager.cpp +++ b/ipacm/src/IPACM_OffloadManager.cpp @@ -234,11 +234,6 @@ RET IPACM_OffloadManager::addDownstream(const char * downstream_name, const Pref { IPACMDBG_H("addDownstream name(%s) currently not support in ipa \n", downstream_name); -#ifdef FEATURE_IPACM_RESTART - /* add ipacm restart support */ - push_iface_up(downstream_name, false); -#endif - /* copy to the cache */ for(int i = 0; i < MAX_EVENT_CACHE ;i++) { @@ -892,7 +887,8 @@ bool IPACM_OffloadManager::push_framework_event(const char * if_name, _ipacm_off for(int i = 0; i < MAX_EVENT_CACHE ;i++) { - if(event_cache[latest_cache_index].valid == false) + if((latest_cache_index >= 0) && (latest_cache_index < MAX_EVENT_CACHE) && + (event_cache[latest_cache_index].valid == false)) { //do the copy event_cache[latest_cache_index].valid = true; |
