From 22165e8624c12e826ec860d1720ccea31b5cc834 Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Fri, 16 Oct 2026 14:45:59 +0000 Subject: wwan: T9388: request an IPv6 bearer for autoconf without an address node "ipv6 address autoconf" lives below "ipv6", so an interface which only gets its address by SLAAC has no "address" node at all. connect_options() only worked out the IP type when that node existed and fell back to ipv4 otherwise, which dialled an IPv4-only bearer and left the interface without any IPv6. Read the address list with a default instead. All other combinations of dhcp, dhcpv6 and autoconf give the same IP type as before. --- python/vyos/utils/wwan.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'python') diff --git a/python/vyos/utils/wwan.py b/python/vyos/utils/wwan.py index cf7d7b143..7b7c31d02 100644 --- a/python/vyos/utils/wwan.py +++ b/python/vyos/utils/wwan.py @@ -175,14 +175,14 @@ def connect_options(config: dict) -> str: context - both are key-mangled the same way, so both are accepted here. """ ip_type = 'ipv4' + address = config.get('address', []) slaac = dict_search('ipv6.address.autoconf', config) != None - if 'address' in config: - if 'dhcp' in config['address'] and ('dhcpv6' in config['address'] or slaac): - ip_type = 'ipv4v6' - elif 'dhcpv6' in config['address'] or slaac: - ip_type = 'ipv6' - elif 'dhcp' in config['address']: - ip_type = 'ipv4' + if 'dhcp' in address and ('dhcpv6' in address or slaac): + ip_type = 'ipv4v6' + elif 'dhcpv6' in address or slaac: + ip_type = 'ipv6' + elif 'dhcp' in address: + ip_type = 'ipv4' options = f'ip-type={ip_type},apn=' + config['apn'] if 'authentication' in config: -- cgit v1.2.3