summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-27 00:13:08 +0100
committerGitHub <noreply@github.com>2021-02-27 00:13:08 +0100
commit8732ebc46a2daddc6e4dfa05f3f70bf2ac9400af (patch)
treecdf542ba523b3da803f407bf7b6e8eec29a32975 /src/conf_mode
parent6342735d51ee057a55d7fb9f2a53ff0dfaa1febf (diff)
parent12d79d836dcd7b5e190f8fa6c54488a2d5188347 (diff)
downloadvyos-1x-8732ebc46a2daddc6e4dfa05f3f70bf2ac9400af.tar.gz
vyos-1x-8732ebc46a2daddc6e4dfa05f3f70bf2ac9400af.zip
Merge pull request #750 from sever-sever/T3320
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!')