Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cfgmgr/intfmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,12 @@ bool IntfMgr::doIntfGeneralTask(const vector<string>& keys,

if (is_lo)
{
addLoopbackIntf(alias);
if (m_loopbackIntfList.find(alias) == m_loopbackIntfList.end())
{
addLoopbackIntf(alias);
m_loopbackIntfList.insert(alias);
SWSS_LOG_INFO("Added %s loopback interface", alias.c_str());
}
}
else
{
Expand Down Expand Up @@ -598,6 +603,7 @@ bool IntfMgr::doIntfGeneralTask(const vector<string>& keys,
if (is_lo)
{
delLoopbackIntf(alias);
m_loopbackIntfList.erase(alias);
}

if (!subIntfAlias.empty())
Expand Down
1 change: 1 addition & 0 deletions cfgmgr/intfmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class IntfMgr : public Orch
Table m_statePortTable, m_stateLagTable, m_stateVlanTable, m_stateVrfTable, m_stateIntfTable;

std::set<std::string> m_subIntfList;
std::set<std::string> m_loopbackIntfList;

void setIntfIp(const std::string &alias, const std::string &opCmd, const IpPrefix &ipPrefix);
void setIntfVrf(const std::string &alias, const std::string &vrfName);
Expand Down