diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-28 08:59:42 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-28 08:59:42 +0000 |
commit | 6cffe2aa820461f7e1dd4c99ee070a7184ff36e8 (patch) | |
tree | 0867d8d65d0e6e0c2d3ba37cbd41bb6346284a05 /src/conf_mode/protocols_bgp.py | |
parent | f75da014ae295e6cdf352754bfd998a453e81743 (diff) | |
download | vyos-1x-6cffe2aa820461f7e1dd4c99ee070a7184ff36e8.tar.gz vyos-1x-6cffe2aa820461f7e1dd4c99ee070a7184ff36e8.zip |
bgp: T4490: Add informational message for peer withour AFI
As we don't use addresss-family ipv4-unicast by default we
should to send informational message about AFI for peer is required
Diffstat (limited to 'src/conf_mode/protocols_bgp.py')
-rwxr-xr-x | src/conf_mode/protocols_bgp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index cd46cbcb4..aa77850a9 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -198,6 +198,9 @@ def verify(bgp): if 'source_interface' in peer_config['interface']: raise ConfigError(f'"source-interface" option not allowed for neighbor "{peer}"') + if 'address_family' not in peer_config: + print(f'Neighbor "{peer}" requires address-family!') + for afi in ['ipv4_unicast', 'ipv4_multicast', 'ipv4_labeled_unicast', 'ipv4_flowspec', 'ipv6_unicast', 'ipv6_multicast', 'ipv6_labeled_unicast', 'ipv6_flowspec', 'l2vpn_evpn']: |