From f6d9749892029d46dab0851c738ef6eb9f70ba36 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 12 Oct 2022 14:58:37 +0000 Subject: bgp: T4744: Directly connected neighbors and ebgp-multihop check BGP directly connected neighbors (interface neighbors) do not compatible with ebgp-multihop option --- src/conf_mode/protocols_bgp.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/conf_mode') 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: -- cgit v1.2.3