summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-10-12 17:57:42 +0200
committerGitHub <noreply@github.com>2022-10-12 17:57:42 +0200
commita057a5c1388a980f9eba126ab5bda00ce76cf23d (patch)
treee70c3c7b2555e9b3a001bdbeb81a52606fa32ce6
parent1c16a56e7b29da98e9e753d6e64d2417359a4ced (diff)
parentf6d9749892029d46dab0851c738ef6eb9f70ba36 (diff)
downloadvyos-1x-a057a5c1388a980f9eba126ab5bda00ce76cf23d.tar.gz
vyos-1x-a057a5c1388a980f9eba126ab5bda00ce76cf23d.zip
Merge pull request #1586 from sever-sever/T4744
bgp: T4744: Directly connected neighbors and ebgp-multihop check
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 87456f00b..ff568d470 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -159,6 +159,11 @@ def verify(bgp):
if 'ebgp_multihop' in peer_config and 'ttl_security' in peer_config:
raise ConfigError('You can not set both ebgp-multihop and ttl-security hops')
+ # interface and ebgp-multihop can't be used in the same configration
+ if 'ebgp_multihop' in peer_config and 'interface' in peer_config:
+ raise ConfigError(f'Ebgp-multihop can not be used with directly connected '\
+ f'neighbor "{peer}"')
+
# Check if neighbor has both override capability and strict capability match
# configured at the same time.
if 'override_capability' in peer_config and 'strict_capability_match' in peer_config: