Skip to content

Commit

Permalink
Skip EVPN routes with invalid VNI or router mac field
Browse files Browse the repository at this point in the history
  • Loading branch information
liorghub committed Feb 18, 2024
1 parent 1221eae commit 53651ec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,18 @@ void RouteOrch::doTask(Consumer& consumer)
}
else
{
if(ipv.size() != rmacv.size()){
SWSS_LOG_ERROR("Skip route %s, it has an invalid router mac field %s", key.c_str(), remote_macs.c_str());
it = consumer.m_toSync.erase(it);
continue;
}

if(ipv.size() != vni_labelv.size()){
SWSS_LOG_ERROR("Skip route %s, it has an invalid vni label field %s", key.c_str(), vni_labels.c_str());
it = consumer.m_toSync.erase(it);
continue;
}

for (uint32_t i = 0; i < ipv.size(); i++)
{
if (i) nhg_str += NHG_DELIMITER;
Expand Down

0 comments on commit 53651ec

Please sign in to comment.