ipacm: Fix installing ipv6 coalescing rules
Make changes to ensure index is not going out of bounds
when installing ipv6 coalescing rules.
Change-Id: Ib35964152e71dd129431e5eece9629b69defe86d
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index 847e08d..a475894 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -7342,10 +7342,10 @@
rt_rule_entry = &rt_rule->rules[0];
rt_rule_entry->at_rear = false;
rt_rule_entry->rule.attrib.attrib_mask = IPA_FLT_DST_ADDR;
- rt_rule_entry->rule.attrib.u.v6.dst_addr[0] = ipv6_addr[num_dft_rt_v6][0];
- rt_rule_entry->rule.attrib.u.v6.dst_addr[1] = ipv6_addr[num_dft_rt_v6][1];
- rt_rule_entry->rule.attrib.u.v6.dst_addr[2] = ipv6_addr[num_dft_rt_v6][2];
- rt_rule_entry->rule.attrib.u.v6.dst_addr[3] = ipv6_addr[num_dft_rt_v6][3];
+ rt_rule_entry->rule.attrib.u.v6.dst_addr[0] = ipv6_addr[i][0];
+ rt_rule_entry->rule.attrib.u.v6.dst_addr[1] = ipv6_addr[i][1];
+ rt_rule_entry->rule.attrib.u.v6.dst_addr[2] = ipv6_addr[i][2];
+ rt_rule_entry->rule.attrib.u.v6.dst_addr[3] = ipv6_addr[i][3];
rt_rule_entry->rule.attrib.u.v6.dst_addr_mask[0] = 0xFFFFFFFF;
rt_rule_entry->rule.attrib.u.v6.dst_addr_mask[1] = 0xFFFFFFFF;
rt_rule_entry->rule.attrib.u.v6.dst_addr_mask[2] = 0xFFFFFFFF;