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 <Denys.Haryachyy@caviumnetworks.com>
  • Loading branch information
Denys Haryachyy authored and Denys Haryachyy committed Mar 29, 2016
1 parent f8e245c commit d2864a6
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 d2864a6

Please sign in to comment.