summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-24 19:27:45 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-24 19:27:45 +0100
commit73cc357b757eb6129db286709812996ebcc4fd19 (patch)
tree365e994f15d38586c635b6de7bef669f932f5fb3 /python
parente4f22fbb5133a00e4b087ef602f4b84c60b0f295 (diff)
downloadvyos-1x-73cc357b757eb6129db286709812996ebcc4fd19.tar.gz
vyos-1x-73cc357b757eb6129db286709812996ebcc4fd19.zip
ospf(v3): T3236: T3244: adjust to route-map converted name (_ for -)
A hyphen in a route-map name will be converted to _, take care about this effect during validation.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configverify.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index de88310e8..abd91583d 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -323,7 +323,9 @@ def verify_route_maps(config):
if 'redistribute' in config:
for protocol, protocol_config in config['redistribute'].items():
if 'route_map' in protocol_config:
- route_map = protocol_config['route_map']
+ # A hyphen in a route-map name will be converted to _, take care
+ # about this effect during validation
+ route_map = protocol_config['route_map'].replace('-','_')
# Check if the specified route-map exists, if not error out
if dict_search(f'policy.route_map.{route_map}', config) == None:
raise ConfigError(f'Redistribution route-map "{route_map}" ' \