From 97d46c8fe96bcf4b7deb89a4cedce2da2c73dbf4 Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Thu, 17 Sep 2026 01:53:39 +0000 Subject: wwan: T9326: fix dual-stack connect on single-PDN-context networks Some networks only ever admit a single combined IPv4+IPv6 PDN context per APN and reject a standalone IPv6 "Start Network" request outright (QMI CallEndReason: ip-version-mismatch) once an IPv4 session already exists for that APN. This means "interfaces wwan " with both * "address dhcp" * "address dhcpv6" or "ipv6 address autoconf" never gets an IPv6 address on such networks, even though the modem and network both genuinely support dual-stack. Authored-by: Adam Smith Co-Authored-by: Christian Breunig --- src/conf_mode/interfaces_wwan.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/conf_mode/interfaces_wwan.py b/src/conf_mode/interfaces_wwan.py index 59303196d..87ced1c6f 100755 --- a/src/conf_mode/interfaces_wwan.py +++ b/src/conf_mode/interfaces_wwan.py @@ -195,6 +195,23 @@ def apply(wwan): if 'authentication' in wwan: options += ',user={username},password={password}'.format(**wwan['authentication']) + # Some networks only ever admit a single combined IPv4+IPv6 PDN context + # per APN and reject a standalone IPv6 "Start Network" request outright + # (QMI CallEndReason ip-version-mismatch) once an IPv4 session already + # exists for that APN. ModemManager's --simple-connect with + # ip-type=ipv4v6 opens two separate WDS sessions (one per family) rather + # than negotiating both together, which is what a normal handset attach + # does and why this is invisible on most other devices. + # + # Pre-negotiating the attach-time PDN type upfront avoids the rejection; + # the resulting bearer only sets up what the *next* --simple-connect is + # allowed to request and can't be connected directly, so a failure here + # isn't fatal - unsupported modems simply proceed to --simple-connect + # exactly as before. + if ip_type in ('ipv4v6', 'ipv6'): + call(f'{base_cmd} --3gpp-set-initial-eps-bearer-settings="{options}"', + stdout=DEVNULL) + command = f'{base_cmd} --simple-connect="{options}"' call(command, stdout=DEVNULL) -- cgit v1.2.3