From d2864a67a497f2ab9663a0849e385787c2fc048e Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Tue, 29 Mar 2016 20:31:09 +0300 Subject: [PATCH] swss/orchagent : Fixed the case of removing ip address from the interface. 1. Incorrect ip prefix parsing is fixed. 2. IntfsTable map is updated after removal of ip address from the interface. Signed-off-by: Denys Haryachyy --- orchagent/intfsorch.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index a4ff2c662b..1e062c62b9 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -123,16 +123,6 @@ void IntfsOrch::doTask() continue; } - IpPrefix ip_prefix; - for (auto it = kfvFieldsValues(t).begin(); - it != kfvFieldsValues(t).end(); it++) - { - if (fvField(*it) == "ip_prefix") - { - ip_prefix = IpPrefix(fvValue(*it)); - } - } - sai_unicast_route_entry_t unicast_route_entry; unicast_route_entry.vr_id = gVirtualRouterId; unicast_route_entry.destination.addr_family = SAI_IP_ADDR_FAMILY_IPV4; @@ -159,7 +149,11 @@ void IntfsOrch::doTask() it++; } else + { + SWSS_LOG_NOTICE("Remove packet action trap route ip:%s\n", ip_prefix.getIp().to_string().c_str()); + m_intfs.erase(alias); it = m_toSync.erase(it); + } } } }