Skip to content

Commit

Permalink
[config]: Use mod_entry when editing VLAN_INTERFACE (sonic-net#1602)
Browse files Browse the repository at this point in the history
Replace set_entry with mod_entry when setting the proxy_arp value for a VLAN.

Using set_entry will delete any other fields set for the key used, which is not desirable.

Signed-off-by: Lawrence Lee <[email protected]>
  • Loading branch information
theasianpianist authored May 10, 2021
1 parent 8c2980a commit 331c5a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def config_proxy_arp(db, vid, mode):
if not clicommon.is_valid_vlan_interface(db.cfgdb, vlan):
ctx.fail("Interface {} does not exist".format(vlan))

db.cfgdb.set_entry('VLAN_INTERFACE', vlan, {"proxy_arp": mode})
db.cfgdb.mod_entry('VLAN_INTERFACE', vlan, {"proxy_arp": mode})
click.echo('Proxy ARP setting saved to ConfigDB')
restart_ndppd()
#
Expand Down

0 comments on commit 331c5a5

Please sign in to comment.