diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-10-04 08:44:01 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-10-04 08:44:01 +0200 |
| commit | e875941dfeabb7645f469058d3396474dbe2b2f2 (patch) | |
| tree | ee7c698d5ee874f61f33898ad1ad6836d71003ec /data | |
| parent | 954afbf43c52460c4c7385a8b5cb44af66835064 (diff) | |
| download | vyos-1x-e875941dfeabb7645f469058d3396474dbe2b2f2.tar.gz vyos-1x-e875941dfeabb7645f469058d3396474dbe2b2f2.zip | |
pppoe: T9395: render default routes via FRR only
Deleting a PPPoE interface shortly after its session came up could fail the
commit with "% could not lock candidate DS". The default routes were installed
via vtysh both from the commit and from the asynchronous ppp ip-up hook, so the
two FRR sessions raced for the mgmtd lock. The IPv6 default route was also
missing from the rendered FRR configuration, so an FRR reload could remove it.
Both default routes are now part of the rendered FRR configuration, which
vyos-configd applies at the end of every commit. PPPoE no longer calls vtysh.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/frr/staticd.frr.j2 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/templates/frr/staticd.frr.j2 b/data/templates/frr/staticd.frr.j2 index 18d300dae..0530b274b 100644 --- a/data/templates/frr/staticd.frr.j2 +++ b/data/templates/frr/staticd.frr.j2 @@ -90,10 +90,14 @@ vrf {{ vrf }} {% endif %} {% endfor %} {% endif %} -{# IPv4 default routes from PPPoE interfaces #} +{# IPv4 and IPv6 default routes from PPPoE interfaces #} {% if pppoe is vyos_defined %} {% for interface, interface_config in pppoe.items() if interface_config.no_default_route is not vyos_defined %} -{{ ip_prefix }} route 0.0.0.0/0 {{ interface }} tag 210 {{ interface_config.default_route_distance if interface_config.default_route_distance is vyos_defined }} +{% set distance = interface_config.default_route_distance if interface_config.default_route_distance is vyos_defined else '' %} +{{ ip_prefix }} route 0.0.0.0/0 {{ interface }} tag 210 {{ distance }} +{% if interface_config.ipv6 is vyos_defined %} +{{ ipv6_prefix }} route ::/0 {{ interface }} tag 210 {{ distance }} +{% endif %} {% endfor %} {% endif %} {# IPv6 routing #} |
