IPACM: Fix the logic of inter-interface communication
Fix the logic of inter-interface communication in LanToLan
controller such that the peer info between two interfaces
is added only when both interfaces support inter-interface
communication.
Change-Id: I29b3c6670354d52f8a98ea1131906dfdcccfbc4b
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
diff --git a/ipacm/src/IPACM_LanToLan.cpp b/ipacm/src/IPACM_LanToLan.cpp
index bf47a82..d77f389 100644
--- a/ipacm/src/IPACM_LanToLan.cpp
+++ b/ipacm/src/IPACM_LanToLan.cpp
@@ -205,11 +205,15 @@
{
for(it = ++m_iface.begin(); it != m_iface.end(); it++)
{
- /* populate hdr_proc_ctx and routing table handle */
- handle_new_iface_up(&front_iface, &(*it));
+ /* add peer info only when both interfaces support inter-interface communication */
+ if(it->get_m_support_inter_iface_offload())
+ {
+ /* populate hdr_proc_ctx and routing table handle */
+ handle_new_iface_up(&front_iface, &(*it));
- /* add client specific routing rule on existing interface */
- it->add_client_rt_rule_for_new_iface();
+ /* add client specific routing rule on existing interface */
+ it->add_client_rt_rule_for_new_iface();
+ }
}
/* add client specific filtering rule on new interface */