summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-20 18:17:54 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-20 18:18:26 +0200
commitf7e3f5562458da4d80b272f1524c27727799e57b (patch)
tree3f59f88f308af28e9ef9c0addc355b37806935ef /src/conf_mode/protocols_bgp.py
parent2591adc9ad25906bf58b42a70409d40d8b339ed6 (diff)
downloadvyos-1x-f7e3f5562458da4d80b272f1524c27727799e57b.tar.gz
vyos-1x-f7e3f5562458da4d80b272f1524c27727799e57b.zip
bgp: T3759: add IPv4/IPv6 unicast AFI route-map for VPN import/export
This adds the following new commands: set protocols bgp address-family ipv4-unicast route-map vpn export foo-map-out set protocols bgp address-family ipv4-unicast route-map vpn import foo-map-in set protocols bgp address-family ipv6-unicast route-map vpn export foo-map-out set protocols bgp address-family ipv6-unicast route-map vpn import foo-map-in
Diffstat (limited to 'src/conf_mode/protocols_bgp.py')
-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 bc7acaf6c..7d05eed9f 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -250,6 +250,11 @@ def verify(bgp):
raise ConfigError('Please unconfigure VPN to VRF commands before '\
'using "import vrf" commands!')
+ # Verify that the export/import route-maps do exist
+ for export_import in ['export', 'import']:
+ tmp = dict_search(f'route_map.vpn.{export_import}', afi_config)
+ if tmp: verify_route_map(tmp, bgp)
+
if afi in ['l2vpn_evpn'] and 'vrf' not in bgp:
# Some L2VPN EVPN AFI options are only supported under VRF
if 'vni' in afi_config: