WWAN Fallback to IPv4 only if IPv4v6 Bearer connection fails
Hi!
We are using an EG25-G modem and when using LTE everything is working very nicely. When we only have 3G connectivity though, the data connection fails for some mobile network cells with "ipv4-only-allowed" (our APN does not support IPv6 at all so I don't know why we don't get this error on other 3G or even LTE cells when the IPv6 WDS fails via QMI but only for some 3G cells).
According to the modem-manager developers the fallback to IPv4-only should be handled by NetworkManager and the code for this seems to exist (https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/wwan/nm-modem.c#L414, https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/wwan/nm-modem-broadband.c#L417 and https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/wwan/nm-modem-broadband.c#L644) if I interpret this correctly. But when running a USB packet capture while reproducing the error shows only dual stack connection attempts via QMI to the modem. When setting IPv6 to disabled in the NetworkManager connection properties, this problem does not happen so modem-manager seems to correctly handle this when told so by NetworkManager.
While we are running a rather old version of NetworkManager (1.22.10), it also has the relevant pieces of code as far as I can tell.
With their "replacement" for NetworkManager + modem-manager (Quectel-CM) this also does not seem to happen and the only thing they do differently is first configuring both WDS clients and then starting them (beginning with the IPv4 one) while modem-manager configures and starts IPv6 first and then configures and starts IPv4 but this probably is not relevant for you but rather the modem-manager devs.
How would I start to debug this further? Is there a better way than to add debug prints to the code?