diff options
author | Sivan Reinstein <sivanr@codeaurora.org> | 2015-11-05 17:30:06 +0200 |
---|---|---|
committer | Skylar Chang <chiaweic@codeaurora.org> | 2016-04-11 14:51:56 -0700 |
commit | b81a3893c0a0dc161310507c3eb11b5d058fce0c (patch) | |
tree | 9b40c6d988383eadcd465a0d30ffb0b7559a52ef /ipacm/src/IPACM_Iface.cpp | |
parent | bbb3c92ca1c764e7515f0412b6878f87d42b2ee8 (diff) | |
download | ipacfg-mgr-b81a3893c0a0dc161310507c3eb11b5d058fce0c.tar.gz |
IPACM: Fix hashable fields to behave in boolean form
This change fixes an incorrect assignment of values in the
hashable fields. The current version of the code relies
on an enum definition which does not conform to the required
boolean values of the fields.
Change-Id: I4c0a44b97e3b99a51adb573e7eb32ef08bfb6133
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Diffstat (limited to 'ipacm/src/IPACM_Iface.cpp')
-rw-r--r-- | ipacm/src/IPACM_Iface.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ipacm/src/IPACM_Iface.cpp b/ipacm/src/IPACM_Iface.cpp index 7b5a795..04cb162 100644 --- a/ipacm/src/IPACM_Iface.cpp +++ b/ipacm/src/IPACM_Iface.cpp @@ -133,6 +133,9 @@ int IPACM_Iface::handle_software_routing_enable(void) flt_rule_entry.flt_rule_hdl = -1; flt_rule_entry.status = -1; flt_rule_entry.rule.action = IPA_PASS_TO_EXCEPTION; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.rule.hashable = true; +#endif memcpy(&flt_rule_entry.rule.attrib, &rx_prop->rx[0].attrib, sizeof(flt_rule_entry.rule.attrib)); @@ -746,7 +749,7 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) flt_rule_entry.rule.action = IPA_PASS_TO_EXCEPTION; #ifdef FEATURE_IPA_V3 flt_rule_entry.at_rear = false; - flt_rule_entry.rule.hashable = IPA_RULE_NON_HASHABLE; + flt_rule_entry.rule.hashable = false; #endif IPACMDBG_H("rx property attrib mask:0x%x\n", rx_prop->rx[0].attrib.attrib_mask); memcpy(&flt_rule_entry.rule.attrib, @@ -763,11 +766,19 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) flt_rule_entry.rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR; flt_rule_entry.rule.attrib.u.v4.dst_addr_mask = 0xF0000000; flt_rule_entry.rule.attrib.u.v4.dst_addr = 0xE0000000; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.at_rear = true; + flt_rule_entry.rule.hashable = true; +#endif memcpy(&(m_pFilteringTable->rules[1]), &flt_rule_entry, sizeof(struct ipa_flt_rule_add)); /* Configuring Broadcast Filtering Rule */ flt_rule_entry.rule.attrib.u.v4.dst_addr_mask = 0xFFFFFFFF; flt_rule_entry.rule.attrib.u.v4.dst_addr = 0xFFFFFFFF; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.at_rear = true; + flt_rule_entry.rule.hashable = true; +#endif memcpy(&(m_pFilteringTable->rules[2]), &flt_rule_entry, sizeof(struct ipa_flt_rule_add)); if (false == m_filtering.AddFilteringRule(m_pFilteringTable)) @@ -832,6 +843,10 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) flt_rule_entry.rule.attrib.u.v6.dst_addr[1] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[2] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[3] = 0X00000000; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.at_rear = true; + flt_rule_entry.rule.hashable = true; +#endif memcpy(&(m_pFilteringTable->rules[0]), &flt_rule_entry, sizeof(struct ipa_flt_rule_add)); /* Configuring fe80::/10 Link-Scoped Unicast Filtering Rule */ @@ -843,6 +858,10 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) flt_rule_entry.rule.attrib.u.v6.dst_addr[1] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[2] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[3] = 0X00000000; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.at_rear = true; + flt_rule_entry.rule.hashable = true; +#endif memcpy(&(m_pFilteringTable->rules[1]), &flt_rule_entry, sizeof(struct ipa_flt_rule_add)); /* Configuring fec0::/10 Reserved by IETF Filtering Rule */ @@ -854,6 +873,10 @@ int IPACM_Iface::init_fl_rule(ipa_ip_type iptype) flt_rule_entry.rule.attrib.u.v6.dst_addr[1] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[2] = 0x00000000; flt_rule_entry.rule.attrib.u.v6.dst_addr[3] = 0X00000000; +#ifdef FEATURE_IPA_V3 + flt_rule_entry.at_rear = true; + flt_rule_entry.rule.hashable = true; +#endif memcpy(&(m_pFilteringTable->rules[2]), &flt_rule_entry, sizeof(struct ipa_flt_rule_add)); #ifdef FEATURE_IPA_ANDROID |