diff --git a/portsyncd/linksync.cpp b/portsyncd/linksync.cpp index 4a2b351ee0..fc400b5bfc 100644 --- a/portsyncd/linksync.cpp +++ b/portsyncd/linksync.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "logger.h" #include "netmsg.h" #include "dbconnector.h" @@ -212,12 +213,18 @@ void LinkSync::onMsg(int nlmsg_type, struct nl_object *obj) return; } - /* If netlink for this port has master, we ignore that for now - * This could be the case where the port was removed from VLAN bridge - */ + /* Ignore netlink on interfaces belong to VLAN bridge */ if (master) { - return; + LinkCache &linkCache = LinkCache::getInstance(); + string masterName = linkCache.ifindexToName(master); + struct rtnl_link *masterLink = linkCache.getLinkByName(masterName.c_str()); + bool isBridge = rtnl_link_is_bridge(masterLink); + + if(isBridge) + { + return; + } } /* In the event of swss restart, it is possible to get netlink messages during bridge