diff options
author | Daniil Baturin <daniil@vyos.io> | 2025-06-10 15:52:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-10 15:52:07 +0100 |
commit | a3b5108391bc457e741a21ed0121af52928489f1 (patch) | |
tree | 5b554103cb406fa9e1535cf017c4db1aef79ec86 /src/conf_mode/protocols_ospf.py | |
parent | 09f63fb975daaefe843641c5ffbec34ddf6b18de (diff) | |
parent | 323ef231bd06650de1405daf6d04b59c1b7b4285 (diff) | |
download | vyos-1x-a3b5108391bc457e741a21ed0121af52928489f1.tar.gz vyos-1x-a3b5108391bc457e741a21ed0121af52928489f1.zip |
Merge pull request #4536 from ig0rb/fix/T7510-ospf-nssa-translation-error
T7510: ospfd.frr.j2 ospf nssa translation error - fix template
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index c06c0aafc..467c9611b 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021-2024 VyOS maintainers and contributors +# Copyright (C) 2021-2025 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -17,6 +17,7 @@ from sys import exit from sys import argv +from vyos.base import Warning from vyos.config import Config from vyos.configverify import verify_common_route_maps from vyos.configverify import verify_route_map @@ -62,6 +63,16 @@ def verify(config_dict): if 'area' in ospf: networks = [] for area, area_config in ospf['area'].items(): + # Implemented as warning to not break existing configurations + if area == '0' and dict_search('area_type.nssa', area_config) != None: + Warning('You cannot configure NSSA to backbone!') + # Implemented as warning to not break existing configurations + if area == '0' and dict_search('area_type.stub', area_config) != None: + Warning('You cannot configure STUB to backbone!') + # Implemented as warning to not break existing configurations + if len(area_config['area_type']) > 1: + Warning(f'Only one area-type is supported for area "{area}"!') + if 'import_list' in area_config: acl_import = area_config['import_list'] if acl_import: verify_access_list(acl_import, ospf) |