diff options
author | Viacheslav Hletenko <vgletenko@vyos.io> | 2022-03-13 12:48:46 +0000 |
---|---|---|
committer | Viacheslav Hletenko <vgletenko@vyos.io> | 2022-03-13 12:48:46 +0000 |
commit | a7a7e38049d4601d55dd032b7d3aecf96c7e8781 (patch) | |
tree | d4f8c5d5ca2e7c7ab002b0fc751d9f8ab73ea143 /src/conf_mode | |
parent | 56febd155792b579d88281940acc97f95a10a712 (diff) | |
download | vyos-1x-a7a7e38049d4601d55dd032b7d3aecf96c7e8781.tar.gz vyos-1x-a7a7e38049d4601d55dd032b7d3aecf96c7e8781.zip |
bgp: T4290: Add verify source-interface for none ip neighbor
When we use neighbor as interface we must not use option
'source-interface'
for example:
neighbor eth0 source-interface eth0
Such option can be used for IP/IPv6 neighbors
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/protocols_bgp.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index d8704727c..9e59177a8 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -166,6 +166,8 @@ def verify(bgp): raise ConfigError(f'peer-group must be set under the interface node of "{peer}"') if 'remote_as' in peer_config: raise ConfigError(f'remote-as must be set under the interface node of "{peer}"') + if 'source_interface' in peer_config['interface']: + raise ConfigError(f'"source-interface" option not allowed for neighbor "{peer}"') for afi in ['ipv4_unicast', 'ipv4_multicast', 'ipv4_labeled_unicast', 'ipv4_flowspec', 'ipv6_unicast', 'ipv6_multicast', 'ipv6_labeled_unicast', 'ipv6_flowspec', |