diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-05-02 18:09:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 18:09:28 +0200 |
commit | b47e7ebab5b9a871ce7d37e57193692a043263a2 (patch) | |
tree | c1204784456206380b091f0452cfe7e58f2680b5 /python | |
parent | 932657a64a7faa0c51124f87a301057d1df297bd (diff) | |
parent | 37a9b478a5f37229394bed37ac506ccf3e2f1403 (diff) | |
download | vyos-1x-b47e7ebab5b9a871ce7d37e57193692a043263a2.tar.gz vyos-1x-b47e7ebab5b9a871ce7d37e57193692a043263a2.zip |
Merge pull request #387 from thomas-mangin/T2372
dictconfig: T2372: fix interfaces disable bug
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configdict.py | 18 |
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'): |