diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-16 18:04:15 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-16 18:08:06 +0200 |
commit | 9bae7536bb6b512e6e35664bb3ebef2236011a7c (patch) | |
tree | 62d8dc239c525017a3b62774d152c7947b94c9f6 /src/conf_mode/protocols_ospf.py | |
parent | 0dd9037036c6b4909bfcb10c50b587a4456a9c27 (diff) | |
download | vyos-1x-9bae7536bb6b512e6e35664bb3ebef2236011a7c.tar.gz vyos-1x-9bae7536bb6b512e6e35664bb3ebef2236011a7c.zip |
ospf: T3757: verify() bugfix for interface area
Commit 6f87d8c9 ("ospf: T3757: support to configure area at an interface level")
did not allow the old way an area and netwokr was set-up as the if
expression was missing a check if 'area' was set in both the interface and the
ospf process.
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index a21ea6c9f..06a29106d 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -149,18 +149,18 @@ def verify(ospf): if route_map_name: verify_route_map(route_map_name, ospf) if 'interface' in ospf: - for interface in ospf['interface']: + for interface, interface_config in ospf['interface'].items(): verify_interface_exists(interface) # One can not use dead-interval and hello-multiplier at the same # time. FRR will only activate the last option set via CLI. - if {'hello_multiplier', 'dead_interval'} <= set(ospf['interface'][interface]): + if {'hello_multiplier', 'dead_interval'} <= set(interface_config): raise ConfigError(f'Can not use hello-multiplier and dead-interval ' \ f'concurrently for {interface}!') # One can not use the "network <prefix> area <id>" command and an # per interface area assignment at the same time. FRR will error # out using: "Please remove all network commands first." - if 'area' in ospf: + if 'area' in ospf and 'area' in interface_config: for area, area_config in ospf['area'].items(): if 'network' in area_config: raise ConfigError('Can not use OSPF interface area and area ' \ |