Skip to content

Commit bfba0ad

Browse files
authored
[vlanmgr]Fix for STATE_DB port check logic (sonic-net#1980)
* Updated checks for PORT entry in STATE_DB in vlanmgrd additionally check for presence of "state" attribute. This is to add Vlanmgrd check similar to sonic-net#1936 Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
1 parent 9ef2ba4 commit bfba0ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cfgmgr/vlanmgr.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "tokenize.h"
88
#include "shellcmd.h"
99
#include "warm_restart.h"
10+
#include <swss/redisutility.h>
1011

1112
using namespace std;
1213
using namespace swss;
@@ -461,6 +462,11 @@ bool VlanMgr::isMemberStateOk(const string &alias)
461462
}
462463
else if (m_statePortTable.get(alias, temp))
463464
{
465+
auto state_opt = swss::fvsGetValue(temp, "state", true);
466+
if (!state_opt)
467+
{
468+
return false;
469+
}
464470
SWSS_LOG_DEBUG("%s is ready", alias.c_str());
465471
return true;
466472
}

0 commit comments

Comments
 (0)