Skip to content

Commit 3ff68c4

Browse files
authored
[neighbor-advertiser] delete the tunnel maps appropriately (sonic-net#1663)
1 parent a425ca2 commit 3ff68c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/neighbor_advertiser

+5-1
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,12 @@ def remove_vxlan_tunnel():
546546

547547

548548
def remove_vxlan_tunnel_map():
549+
vxlan_tunnel_name = VXLAN_TUNNEL_NAME
550+
vxlan_tunnel = config_db.get_table('VXLAN_TUNNEL')
551+
if len(vxlan_tunnel):
552+
vxlan_tunnel_name = list(vxlan_tunnel.keys())[0]
549553
for (index, _) in enumerate(get_vlan_interfaces(), 1):
550-
config_db.set_entry('VXLAN_TUNNEL_MAP', (VXLAN_TUNNEL_NAME, VXLAN_TUNNEL_MAP_PREFIX + str(index)), None)
554+
config_db.set_entry('VXLAN_TUNNEL_MAP', (vxlan_tunnel_name, VXLAN_TUNNEL_MAP_PREFIX + str(index)), None)
551555

552556

553557
def reset_vxlan_tunnel():

0 commit comments

Comments
 (0)