summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-02-26 21:30:15 +0700
committerGitHub <noreply@github.com>2021-02-26 21:30:15 +0700
commitd879d4354b2003b89e3321d6ea7f76d9534959fe (patch)
tree1e961bc4793ad8fd55edd05e0b04d88c553c88b9 /src/conf_mode/protocols_bgp.py
parent77a16626802aa1986daa0cbfdb05e0427e49ccd6 (diff)
parentdd29614d1e055cce714c0e65e216aef83286a1ae (diff)
downloadvyos-1x-d879d4354b2003b89e3321d6ea7f76d9534959fe.tar.gz
vyos-1x-d879d4354b2003b89e3321d6ea7f76d9534959fe.zip
Merge pull request #745 from sever-sever/T3323
bgp: T3323: Add verify for ttl-security and ebgp-multihop
Diffstat (limited to 'src/conf_mode/protocols_bgp.py')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index baf5c4159..127ad0932 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -99,6 +99,9 @@ def verify(bgp):
raise ConfigError(f'Specified peer-group "{peer_group}" for '\
f'neighbor "{neighbor}" does not exist!')
+ # ttl-security and ebgp-multihop can't be used in the same configration
+ 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')
# Some checks can/must only be done on a neighbor and not a peer-group
if neighbor == 'neighbor':