summaryrefslogtreecommitdiff
path: root/python
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 /python
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 'python')
-rw-r--r--python/vyos/configdict.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 0fc3a179b..89488126f 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -508,14 +508,14 @@ def get_wwan_interfaces(conf, vrf=None):
continue
# get_interface_dict() drops dhcp_options unless "address dhcp" is
- # configured, but the distance applies to the IPv6 route as well
+ # configured, but both options apply to the IPv6 route as well
from vyos.xml_ref import default_value
path = ['interfaces', 'wwan', ifname, 'dhcp-options', 'default-route-distance']
tmp = conf.return_value(path) if conf.exists(path) else default_value(path)
if tmp is not None:
options.update({'default_route_distance': tmp})
- if dict_search('dhcp_options.no_default_route', ifconfig) is not None:
+ if conf.exists(['interfaces', 'wwan', ifname, 'dhcp-options', 'no-default-route']):
options.update({'no_default_route': {}})
if 'vrf' in ifconfig:
if vrf == ifconfig['vrf']: