summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-17 19:14:37 +0100
committerChristian Poessinger <christian@poessinger.com>2021-03-17 19:18:17 +0100
commit6bab80fe4a74da0066a1fa0a02ea233d85ca4bfe (patch)
treeee75f84929facd5e32bbe8b17814dee8e3f41b59 /src/conf_mode
parent0f3def974fbaa4a26e6ad590ee37dd965bc2358f (diff)
downloadvyos-1x-6bab80fe4a74da0066a1fa0a02ea233d85ca4bfe.tar.gz
vyos-1x-6bab80fe4a74da0066a1fa0a02ea233d85ca4bfe.zip
vrf: ospf: T2271: when removing the entire process cleanup all interfaces
During assembly of the required config changes we also must move the interfaces_removed assignemnt to an earlier stage so the value is also populated when the entire process is removed to cleanup all remaining OSPF process assigned interfaces. This was yet not the case and when deleting OSPF I still got my "interface eth0" with the area key configured.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/protocols_ospf.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py
index ef2aeda7f..30246594a 100755
--- a/src/conf_mode/protocols_ospf.py
+++ b/src/conf_mode/protocols_ospf.py
@@ -57,6 +57,14 @@ def get_config(config=None):
# instead of the VRF instance.
if vrf: ospf['vrf'] = vrf
+ # As we no re-use this Python handler for both VRF and non VRF instances for
+ # OSPF we need to find out if any interfaces changed so properly adjust
+ # the FRR configuration and not by acctident change interfaces from a
+ # different VRF.
+ interfaces_removed = node_changed(conf, base + ['interface'])
+ if interfaces_removed:
+ ospf['interface_removed'] = list(interfaces_removed)
+
# Bail out early if configuration tree does not exist
if not conf.exists(base):
ospf.update({'deleted' : ''})
@@ -119,14 +127,6 @@ def get_config(config=None):
ospf['interface'][interface] = dict_merge(default_values,
ospf['interface'][interface])
- # As we no re-use this Python handler for both VRF and non VRF instances for
- # OSPF we need to find out if any interfaces changed so properly adjust
- # the FRR configuration and not by acctident change interfaces from a
- # different VRF.
- interfaces_removed = node_changed(conf, base + ['interface'])
- if interfaces_removed:
- ospf['interface_removed'] = list(interfaces_removed)
-
# We also need some additional information from the config, prefix-lists
# and route-maps for instance. They will be used in verify()
base = ['policy']