summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-11-07 22:14:35 +0100
committerChristian Breunig <christian@breunig.cc>2026-11-07 22:19:52 +0100
commit874dfe595378a679bfbd789af66d07bcdb62e71d (patch)
tree0cc7645846fd03ff969df5464cb83e4aeab5d1e7 /data
parent5da28d873cfbf41c56c3e6cb04154022456b5e32 (diff)
downloadvyos-1x-874dfe595378a679bfbd789af66d07bcdb62e71d.tar.gz
vyos-1x-874dfe595378a679bfbd789af66d07bcdb62e71d.zip
wwan: T9388: honour no-default-route for the IPv6 route of a bearer
"dhcp-options no-default-route" only suppressed the IPv4 default route of a static bearer, and only with "address dhcp" configured, as the option is dropped from the interface config otherwise. The IPv6 route was always installed. The option now suppresses both routes, as it does for PPPoE, regardless of which address family is configured.
Diffstat (limited to 'data')
-rw-r--r--data/templates/frr/staticd.frr.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/frr/staticd.frr.j2 b/data/templates/frr/staticd.frr.j2
index 0ee2dd631..434ea3881 100644
--- a/data/templates/frr/staticd.frr.j2
+++ b/data/templates/frr/staticd.frr.j2
@@ -105,9 +105,9 @@ vrf {{ vrf }}
{% endif %}
{# IPv4 and IPv6 default routes from WWAN interfaces with a static bearer #}
{% if wwan is vyos_defined %}
-{% for interface, interface_config in wwan.items() %}
+{% for interface, interface_config in wwan.items() if interface_config.no_default_route is not vyos_defined %}
{% set distance = interface_config.default_route_distance if interface_config.default_route_distance is vyos_defined else '' %}
-{% if interface_config.ipv4 is vyos_defined and interface_config.no_default_route is not vyos_defined %}
+{% if interface_config.ipv4 is vyos_defined %}
{% set next_hop = interface | get_wwan_router('ipv4') %}
{% if next_hop is vyos_defined %}
{{ ip_prefix }} route 0.0.0.0/0 {{ next_hop }} {{ interface }} tag 210 {{ distance }}