From 53651ec918d69d4c0ef83777753c2a3a20feb362 Mon Sep 17 00:00:00 2001 From: liorghub Date: Sun, 18 Feb 2024 14:34:44 +0200 Subject: [PATCH] Skip EVPN routes with invalid VNI or router mac field --- orchagent/routeorch.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/orchagent/routeorch.cpp b/orchagent/routeorch.cpp index 041a988d5c..dea3d10262 100644 --- a/orchagent/routeorch.cpp +++ b/orchagent/routeorch.cpp @@ -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;