diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index 8bfc31809eeb..c5f46d01d3fa 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -38,7 +38,6 @@ const int intfsorch_pri = 35; #define RIF_FLEX_STAT_COUNTER_POLL_MSECS "1000" #define UPDATE_MAPS_SEC 1 -#define LOOPBACK_PREFIX "Loopback" static const vector rifStatIds = { @@ -57,7 +56,7 @@ IntfsOrch::IntfsOrch(DBConnector *db, string tableName, VRFOrch *vrf_orch) : { SWSS_LOG_ENTER(); - /* Initialize DB connectors */ + /* Initialize DB connectors */ m_counter_db = shared_ptr(new DBConnector("COUNTERS_DB", 0)); m_flex_db = shared_ptr(new DBConnector("FLEX_COUNTER_DB", 0)); m_asic_db = shared_ptr(new DBConnector("ASIC_DB", 0)); @@ -576,7 +575,7 @@ void IntfsOrch::doTask(Consumer &consumer) SWSS_LOG_ERROR("Invalid mac argument %s to %s()", value.c_str(), e.what()); continue; } - } + } else if (field == "nat_zone") { try diff --git a/orchagent/routeorch.cpp b/orchagent/routeorch.cpp index 86ee569fb671..d8ba2b48249f 100644 --- a/orchagent/routeorch.cpp +++ b/orchagent/routeorch.cpp @@ -557,7 +557,13 @@ void RouteOrch::doTask(Consumer& consumer) for (auto alias : alsv) { - if (alias == "eth0" || alias == "lo" || alias == "docker0") + /* skip route to management, docker, loopback + * TODO: for route to loopback interface, the proper + * way is to create loopback interface and then create + * route pointing to it, so that we can traps packets to + * CPU */ + if (alias == "eth0" || alias == "docker0" || + alias == "lo" || !alias.compare(0, strlen(LOOPBACK_PREFIX), LOOPBACK_PREFIX)) { excp_intfs_flag = true; break; @@ -1231,7 +1237,7 @@ bool RouteOrch::addRoute(RouteBulkContext& ctx, const NextHopGroupKey &nextHops) && vrf_id == gVirtualRouterId) { /* Only support the default vrf for Fine Grained ECMP */ - SWSS_LOG_INFO("Reroute %s:%s to fgNhgOrch", ipPrefix.to_string().c_str(), + SWSS_LOG_INFO("Reroute %s:%s to fgNhgOrch", ipPrefix.to_string().c_str(), nextHops.to_string().c_str()); return m_fgNhgOrch->addRoute(vrf_id, ipPrefix, nextHops); } diff --git a/orchagent/routeorch.h b/orchagent/routeorch.h index e57bcddde4fd..214c2bd4ae99 100644 --- a/orchagent/routeorch.h +++ b/orchagent/routeorch.h @@ -21,6 +21,8 @@ /* Length of the Interface Id value in EUI64 format */ #define EUI64_INTF_ID_LEN 8 +#define LOOPBACK_PREFIX "Loopback" + typedef std::map NextHopGroupMembers; struct NextHopGroupEntry