summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-26 19:55:33 +0100
committerGitHub <noreply@github.com>2021-02-26 19:55:33 +0100
commitc2650c041261244052c9ff3b8f653c98fd2bfefc (patch)
treeacb3a7bd015253add682df9e5dfed5e486c21dc8 /src/conf_mode
parentd879d4354b2003b89e3321d6ea7f76d9534959fe (diff)
parent3c0db1b5b574778f82ebb5a4a5084f558ac8ec53 (diff)
downloadvyos-1x-c2650c041261244052c9ff3b8f653c98fd2bfefc.tar.gz
vyos-1x-c2650c041261244052c9ff3b8f653c98fd2bfefc.zip
Merge pull request #746 from sever-sever/T3324
bgp: T3324: Add checks for peer password
Diffstat (limited to 'src/conf_mode')
-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 127ad0932..1f93ceb54 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -103,6 +103,10 @@ def verify(bgp):
if 'ebgp_multihop' in peer_config and 'ttl_security' in peer_config:
raise ConfigError('You can\'t set both ebgp-multihop and ttl-security hops')
+ # Check spaces in the password
+ if 'password' in peer_config and ' ' in peer_config['password']:
+ raise ConfigError('You can\'t use spaces in the password')
+
# Some checks can/must only be done on a neighbor and not a peer-group
if neighbor == 'neighbor':
# remote-as must be either set explicitly for the neighbor