summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-01-12 16:24:23 +0000
committerGitHub <noreply@github.com>2024-01-12 16:24:23 +0000
commit4c29922cc0baa9c127391b58e82b76f69e1e2dce (patch)
treeeb53f2944d730f005e750d027ddb3c6fb3456078 /src
parentcd227a71ad752db9de2d2088125d07d51242b946 (diff)
parent12e81dbb47b942b3d9a7a69189adefb5b176c4ef (diff)
downloadvyos-1x-4c29922cc0baa9c127391b58e82b76f69e1e2dce.tar.gz
vyos-1x-4c29922cc0baa9c127391b58e82b76f69e1e2dce.zip
Merge pull request #2809 from c-po/bgp-t5306
bgp: T5306: fix verify_remote_as() to support v6only interface with peer-group
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index bf807fa5f..89e2aab8c 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -206,6 +206,10 @@ def verify_remote_as(peer_config, bgp_config):
if 'v6only' in peer_config['interface']:
if 'remote_as' in peer_config['interface']['v6only']:
return peer_config['interface']['v6only']['remote_as']
+ if 'peer_group' in peer_config['interface']['v6only']:
+ peer_group_name = peer_config['interface']['v6only']['peer_group']
+ tmp = dict_search(f'peer_group.{peer_group_name}.remote_as', bgp_config)
+ if tmp: return tmp
return None