diff options
| author | Alex Kudentsov <43482574+alexk37@users.noreply.github.com> | 2026-10-18 16:31:05 +0700 |
|---|---|---|
| committer | Alex Kudentsov <43482574+alexk37@users.noreply.github.com> | 2026-10-19 01:02:39 +0700 |
| commit | 83c42081d3fb44982b903d032c54eec2beab89ef (patch) | |
| tree | 4a9567376dfcdedc73a8e79b648c84abc4d52a87 /data | |
| parent | c46b3c3f04e2b025cd40193d2665505f725de871 (diff) | |
| download | vyos-1x-83c42081d3fb44982b903d032c54eec2beab89ef.tar.gz vyos-1x-83c42081d3fb44982b903d032c54eec2beab89ef.zip | |
bgp: T9450: render EVPN route-target both as import+export
FRR never folds a VRF's l2vpn evpn route-targets back into "both"
(bgp_config_write_evpn_info(), bgpd/bgp_evpn_vty.c): it always prints
the import list and the export list separately, each from its own
flag. Unlike the per-VNI "route-target both" context, tools/frr-reload.py
has no special case that folds a matching VRF-wide import+export pair
back into "both", so the line was deleted and re-added, both RTs with
it, on every reload.
Render "route-target both" as its "import"+"export" equivalent so the
rendered config matches what FRR will echo back.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/frr/bgpd.frr.j2 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/data/templates/frr/bgpd.frr.j2 b/data/templates/frr/bgpd.frr.j2 index 867c08fcb..1088e737f 100644 --- a/data/templates/frr/bgpd.frr.j2 +++ b/data/templates/frr/bgpd.frr.j2 @@ -480,9 +480,18 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }} {{ 'as-nota rt vpn import {{ afi_config.route_target.vpn.import }} {% endif %} {% endif %} +{# T9450: FRR never folds a VRF's l2vpn evpn route-targets back into "both" #} +{# (bgp_config_write_evpn_info(), bgpd/bgp_evpn_vty.c: the import list and the #} +{# export list are each printed from their own flag/list, independently of #} +{# how they were set - unlike the per-VNI "route-target both" context, which #} +{# tools/frr-reload.py folds a matching import+export pair back into "both" #} +{# by a dedicated special case that does not exist for this, VRF-wide, #} +{# context). Rendering "route-target both" here makes frr-reload see it #} +{# missing from the running config and delete+re-add both RTs every reload. #} {% if afi_config.route_target.both is vyos_defined %} {% for route_target in afi_config.route_target.both %} - route-target both {{ route_target }} + route-target import {{ route_target }} + route-target export {{ route_target }} {% endfor %} {% endif %} {% if afi_config.route_target.export is vyos_defined %} |
