Skip to content

Commit

Permalink
Disable arp_evict_nocarrier for vlan host intf
Browse files Browse the repository at this point in the history
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
  • Loading branch information
lolyu committed Jan 4, 2023
1 parent c9ca7c8 commit 27bc4c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cfgmgr/vlanmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ bool VlanMgr::addHostVlan(int vlan_id)
std::string res;
EXEC_WITH_ERROR_THROW(cmds, res);

res.clear();
const std::string echo_cmd = std::string("")
+ ECHO_CMD + " 0 > /proc/sys/net/ipv4/conf/" + VLAN_PREFIX + std::to_string(vlan_id) + "/arp_evict_nocarrier";
swss::exec(echo_cmd, res);

return true;
}

Expand Down

0 comments on commit 27bc4c7

Please sign in to comment.