Skip to content

Commit 0f476a7

Browse files
authored
[config]: Flush the neighbor table when removing the router interface (sonic-net#606)
Manually trigger the flush command to remove the deprecated neighbors that are associated with the removed router interface. Signed-off-by: Shu0T1an ChenG <[email protected]>
1 parent ff3154c commit 0f476a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/main.py

+3
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,9 @@ def remove(ctx, interface_name, ip_addr):
13421342
config_db.set_entry("LOOPBACK_INTERFACE", (interface_name, ip_addr), None)
13431343
else:
13441344
ctx.fail("'interface_name' is not valid. Valid names [Ethernet/PortChannel/Vlan/Loopback]")
1345+
1346+
command = "ip neigh flush {}".format(ip_addr)
1347+
run_command(command)
13451348
except ValueError:
13461349
ctx.fail("'ip_addr' is not valid.")
13471350

0 commit comments

Comments
 (0)