Skip to content

Commit

Permalink
swss/orchagent : Fixed the case of removing ip address from the inter…
Browse files Browse the repository at this point in the history
…face.

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 <[email protected]>
  • Loading branch information
Denys Haryachyy authored and Shuotian Cheng committed Apr 4, 2016
1 parent 46f33d3 commit 2b6997c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}
}
}
Expand Down

0 comments on commit 2b6997c

Please sign in to comment.