summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorKyle McClammy <kylem@serverforge.org>2023-02-04 00:54:35 +0000
committerKyle McClammy <kylem@serverforge.org>2023-02-04 00:54:35 +0000
commit8a75e92d9172309f76b3a292f4419d68b5ed5eb8 (patch)
tree68750aa8984581708e666a152ee9758c611ab965 /src/conf_mode/protocols_bgp.py
parentbcee46aaed5b612f39e3b34776d3353a2fd1d42e (diff)
downloadvyos-1x-8a75e92d9172309f76b3a292f4419d68b5ed5eb8.tar.gz
vyos-1x-8a75e92d9172309f76b3a292f4419d68b5ed5eb8.zip
T4817 added support for RFC 9234
Diffstat (limited to 'src/conf_mode/protocols_bgp.py')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index c410258ee..4f05957fa 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -235,6 +235,11 @@ def verify(bgp):
raise ConfigError(f'Specified peer-group "{peer_group}" for '\
f'neighbor "{neighbor}" does not exist!')
+ if 'local_role' in peer_config:
+ #Ensure Local Role has only one value.
+ if len(peer_config['local_role']) > 1:
+ raise ConfigError(f'Only one local role can be specified for peer "{peer}"!')
+
if 'local_as' in peer_config:
if len(peer_config['local_as']) > 1:
raise ConfigError(f'Only one local-as number can be specified for peer "{peer}"!')