Skip to content

Commit 193b028

Browse files
sumukhatvqiluo-msft
authored andcommitted
[neighbor-advertiser] delete the tunnel maps appropriately (sonic-net#1663)
1 parent 2c82bcf commit 193b028

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
@@ -523,8 +523,12 @@ def remove_vxlan_tunnel():
523523

524524

525525
def remove_vxlan_tunnel_map():
526+
vxlan_tunnel_name = VXLAN_TUNNEL_NAME
527+
vxlan_tunnel = config_db.get_table('VXLAN_TUNNEL')
528+
if len(vxlan_tunnel):
529+
vxlan_tunnel_name = list(vxlan_tunnel.keys())[0]
526530
for (index, _) in enumerate(get_vlan_interfaces(), 1):
527-
config_db.set_entry('VXLAN_TUNNEL_MAP', (VXLAN_TUNNEL_NAME, VXLAN_TUNNEL_MAP_PREFIX + str(index)), None)
531+
config_db.set_entry('VXLAN_TUNNEL_MAP', (vxlan_tunnel_name, VXLAN_TUNNEL_MAP_PREFIX + str(index)), None)
528532

529533

530534
def reset_vxlan_tunnel():

0 commit comments

Comments
 (0)