summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfett0 <fernando.gmaidana@gmail.com>2022-03-18 13:00:04 +0000
committerfett0 <fernando.gmaidana@gmail.com>2022-03-18 13:00:04 +0000
commit91d19038f9e31657e660a88cbfc1443e454177ef (patch)
tree53e21c4eb750facf16bec1dacae8b256bb0312fc
parentc29c6d3d654c7280fdd4ea9fa66b5e84ef267285 (diff)
downloadvyos-1x-91d19038f9e31657e660a88cbfc1443e454177ef.tar.gz
vyos-1x-91d19038f9e31657e660a88cbfc1443e454177ef.zip
OSPF : T4304: add check access-list is defined
-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)