summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraapostoliuk <a.apostoliuk@vyos.io>2025-05-12 17:24:03 +0300
committeraapostoliuk <a.apostoliuk@vyos.io>2025-05-12 20:33:29 +0300
commite35315a46dd86919c54c2cdddf443fc88dfec8ae (patch)
tree5c7d34659ec9f8442f49be7de6a3271e7284feb8 /src
parent324bc83fc4ce2050ff33b164b392219923d6ec5d (diff)
downloadvyos-1x-e35315a46dd86919c54c2cdddf443fc88dfec8ae.tar.gz
vyos-1x-e35315a46dd86919c54c2cdddf443fc88dfec8ae.zip
T7157: bgp: Added verification of the route-map existence in vrf import
Added verification of the route-map existence in the vrf route-leaking.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 99d8eb9d1..e29f3358a 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -527,6 +527,10 @@ def verify(config_dict):
raise ConfigError(
'Please unconfigure import vrf commands before using vpn commands in dependent VRFs!')
+ # Verify if the route-map exists
+ if dict_search('route_map.vrf.import', afi_config) is not None:
+ verify_route_map(afi_config['route_map']['vrf']['import'], bgp)
+
if (dict_search('route_map.vrf.import', afi_config) is not None
or dict_search('import.vrf', afi_config) is not None):
# FRR error: please unconfigure vpn to vrf commands before
@@ -541,7 +545,6 @@ def verify(config_dict):
raise ConfigError('Please unconfigure route-map VPN to VRF commands before '\
'using "import vrf" commands!')
-
# Verify that the export/import route-maps do exist
for export_import in ['export', 'import']:
tmp = dict_search(f'route_map.vpn.{export_import}', afi_config)