summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2021-02-26 22:06:01 +0000
committersever-sever <v.gletenko@vyos.io>2021-02-26 22:57:33 +0000
commit12d79d836dcd7b5e190f8fa6c54488a2d5188347 (patch)
tree4c304cfff5619aea6ed20eaa77e11f4db5a9dce3 /src/conf_mode
parentcaf6e392f025139f962395d162b433a4d038eeee (diff)
downloadvyos-1x-12d79d836dcd7b5e190f8fa6c54488a2d5188347.tar.gz
vyos-1x-12d79d836dcd7b5e190f8fa6c54488a2d5188347.zip
bgp: T3320: Add checks for peer-group
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 1ce2d3e7c..890196b31 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -96,7 +96,7 @@ def verify(bgp):
# Check if the configure peer-group exists
if 'peer_group' in peer_config:
peer_group = peer_config['peer_group']
- if peer_group not in asn_config['peer_group']:
+ if 'peer_group' not in asn_config or peer_group not in asn_config['peer_group']:
raise ConfigError(f'Specified peer-group "{peer_group}" for '\
f'neighbor "{neighbor}" does not exist!')