Skip to content

Commit

Permalink
tlm_teamd: Filter portchannel subinterface events from STATE_DB LAG_T…
Browse files Browse the repository at this point in the history
…ABLE (sonic-net#2408)

* Fix for issue sonic-net#11218
Avoid processing portchannel subinterfaces in teamd
  • Loading branch information
preetham-singh authored Aug 26, 2022
1 parent a4b8992 commit 486939a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tlm_teamd/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INCLUDES = -I $(top_srcdir)
INCLUDES = -I $(top_srcdir) -I$(top_srcdir)/lib

bin_PROGRAMS = tlm_teamd

Expand Down
6 changes: 6 additions & 0 deletions tlm_teamd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "teamdctl_mgr.h"
#include "values_store.h"
#include "subintf.h"


bool g_run = true;
Expand All @@ -30,6 +31,11 @@ void update_interfaces(swss::SubscriberStateTable & table, TeamdCtlMgr & mgr)
const auto & lag_name = kfvKey(entry);
const auto & op = kfvOp(entry);

if (lag_name.find(VLAN_SUB_INTERFACE_SEPARATOR) != std::string::npos)
{
SWSS_LOG_INFO("Skip subintf %s statedb event", lag_name.c_str());
continue;
}
if (op == "SET")
{
mgr.add_lag(lag_name);
Expand Down

0 comments on commit 486939a

Please sign in to comment.