summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_ospf.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-20 09:24:51 +0100
committerGitHub <noreply@github.com>2022-03-20 09:24:51 +0100
commitf2ebdfa4b856c2801dbdd177095220a27e408e1f (patch)
tree98d2124e9981d1ef73548414c07b363cf2be7e1d /src/conf_mode/protocols_ospf.py
parent71805191d1e663af47ac1c2c11f7861d84677525 (diff)
parent496d2a5fd8c3bcbd0e7102c88eaf66d432cbb678 (diff)
downloadvyos-1x-f2ebdfa4b856c2801dbdd177095220a27e408e1f.tar.gz
vyos-1x-f2ebdfa4b856c2801dbdd177095220a27e408e1f.zip
Merge pull request #1250 from fett0/T4304
OSPF : T4304: Set import/export filter inter-area prefix
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-xsrc/conf_mode/protocols_ospf.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py
index 4895cde6f..26d491838 100755
--- a/src/conf_mode/protocols_ospf.py
+++ b/src/conf_mode/protocols_ospf.py
@@ -25,6 +25,7 @@ from vyos.configdict import node_changed
from vyos.configverify import verify_common_route_maps
from vyos.configverify import verify_route_map
from vyos.configverify import verify_interface_exists
+from vyos.configverify import verify_access_list
from vyos.template import render_to_string
from vyos.util import dict_search
from vyos.util import get_interface_config
@@ -159,6 +160,16 @@ def verify(ospf):
route_map_name = dict_search('default_information.originate.route_map', ospf)
if route_map_name: verify_route_map(route_map_name, ospf)
+ # Validate if configured Access-list exists
+ if 'area' in ospf:
+ for area, area_config in ospf['area'].items():
+ if 'import_list' in area_config:
+ acl_import = area_config['import_list']
+ if acl_import: verify_access_list(acl_import, ospf)
+ if 'export_list' in area_config:
+ acl_export = area_config['export_list']
+ if acl_export: verify_access_list(acl_export, ospf)
+
if 'interface' in ospf:
for interface, interface_config in ospf['interface'].items():
verify_interface_exists(interface)