summaryrefslogtreecommitdiff
path: root/python/vyos/configdict.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-05-02 17:03:56 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-05-02 17:03:56 +0100
commit37a9b478a5f37229394bed37ac506ccf3e2f1403 (patch)
treec1204784456206380b091f0452cfe7e58f2680b5 /python/vyos/configdict.py
parent932657a64a7faa0c51124f87a301057d1df297bd (diff)
downloadvyos-1x-37a9b478a5f37229394bed37ac506ccf3e2f1403.tar.gz
vyos-1x-37a9b478a5f37229394bed37ac506ccf3e2f1403.zip
dictconfig: T2372: fix interfaces disable bug
off-by one line where the IP were added to the add list and not the remove list
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r--python/vyos/configdict.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index dea8a5d01..e1b704a31 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -312,31 +312,31 @@ def intf_to_dict(conf, default):
if disabled == disable.both:
# was and is still disabled
intf['disable'] = True
- intf['address_remove'] = []
intf['address'] = []
+ intf['address_remove'] = []
intf['ipv6_eui64_prefix'] = []
intf['ipv6_eui64_prefix_remove'] = []
elif disabled == disable.now:
# it is now disable but was not before
intf['disable'] = True
- intf['address_remove'] = eff_addr
intf['address'] = []
- intf['ipv6_eui64_prefix'] = eff_eui
- intf['ipv6_eui64_prefix_remove'] = []
+ intf['address_remove'] = eff_addr
+ intf['ipv6_eui64_prefix'] = []
+ intf['ipv6_eui64_prefix_remove'] = eff_eui
elif disabled == disable.was:
# it was disable but not anymore
intf['disable'] = False
- intf['address_remove'] = []
intf['address'] = act_addr
- intf['ipv6_eui64_prefix'] = []
- intf['ipv6_eui64_prefix_remove'] = act_eui
+ intf['address_remove'] = []
+ intf['ipv6_eui64_prefix'] = act_eui
+ intf['ipv6_eui64_prefix_remove'] = []
else:
# normal change
intf['disable'] = False
- intf['address_remove'] = list_diff(eff_addr, act_addr)
intf['address'] = act_addr
- intf['ipv6_eui64_prefix_remove'] = list_diff(eff_eui, act_eui)
+ intf['address_remove'] = list_diff(eff_addr, act_addr)
intf['ipv6_eui64_prefix'] = act_eui
+ intf['ipv6_eui64_prefix_remove'] = list_diff(eff_eui, act_eui)
# Remove the default link-local address if set.
if conf.exists('ipv6 address no-default-link-local'):