Skip to content

Commit

Permalink
Update oper_status of LAG_TABLE in state_db (#3195)
Browse files Browse the repository at this point in the history
What I did
Update oper_status of LAG_TABLE in state_db (#3195) - Fix for #3192

How I did it
In teamSync::addLag method, update lag "oper_status" status in state_db.
  • Loading branch information
super-jiying authored Jun 25, 2024
1 parent 78af15d commit 1b87ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion teamsyncd/teamsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ void TeamSync::addLag(const string &lagName, int ifindex, bool admin_state,
if (m_teamSelectables.find(lagName) != m_teamSelectables.end())
{
auto tsync = m_teamSelectables[lagName];
if (tsync->admin_state == admin_state && tsync->mtu == mtu)
if (tsync->admin_state == admin_state && tsync->oper_state == oper_state && tsync->mtu == mtu)
return;
tsync->admin_state = admin_state;
tsync->oper_state = oper_state;
tsync->mtu = mtu;
lag_update = false;
}
Expand Down
1 change: 1 addition & 0 deletions teamsyncd/teamsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class TeamSync : public NetMsg
/* member_name -> enabled|disabled */
std::map<std::string, bool> m_lagMembers;
bool admin_state;
bool oper_state;
unsigned int mtu;
protected:
int onChange();
Expand Down

0 comments on commit 1b87ce9

Please sign in to comment.