diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-10-12 14:58:37 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-10-12 14:58:37 +0000 |
commit | f6d9749892029d46dab0851c738ef6eb9f70ba36 (patch) | |
tree | e70c3c7b2555e9b3a001bdbeb81a52606fa32ce6 /src | |
parent | 1c16a56e7b29da98e9e753d6e64d2417359a4ced (diff) | |
download | vyos-1x-f6d9749892029d46dab0851c738ef6eb9f70ba36.tar.gz vyos-1x-f6d9749892029d46dab0851c738ef6eb9f70ba36.zip |
bgp: T4744: Directly connected neighbors and ebgp-multihop check
BGP directly connected neighbors (interface neighbors) do not
compatible with ebgp-multihop option
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/protocols_bgp.py | 5 |
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: |