Regression regarding ip_type when updating from 1.10.4 to 1.12.0

Aleksander Morgado aleksander at aleksander.es
Thu Nov 14 17:57:54 UTC 2019


Hey,

>
> Previous versions:
>
> - ModemManager 1.10.4
> - libmbim 1.18.2
>
> New versions:
>
> - ModemManager 1.12.0
> - libmbim 1.20.2
>
> The test device is a Lenovo T470s with a Sierra Wireless EM7455. The provider is vodafone.de
>
> We configure our bearer with the ip_type MM_BEARER_IP_FAMILY_IPV4V6. We assumed this means that IPv4 or IPv6 or both should be configured, whatever provided by the network.
>

This is a bit more complicated I'm afraid. On MBIM devices, like the
one you're using, we pass the IP family type down to the modem during
the connection request, and if you request ipv4v6 (dual stack), that
is what the modem will try to manage with the network.

> In our tests this worked correctly with the version 1.10.4 of ModemManager, when using a SIM from vodafone we got IPv4 connectivitiy, with a SIM from telekom we got both IPv4 and IPv6 connectivity.
>
> However, after updating to version 1.12.0 strange behaviour occured. The first view connections after a cold boot of the device failed with:
>
> 2019-11-08 09:54:31.286 modem-manager.service: [/dev/cdc-wdm0] Received message (translated)...
>                                                >>>>>> Header:
>                                                >>>>>>   length      = 84
>                                                >>>>>>   type        = command-done (0x80000003)
>                                                >>>>>>   transaction = 45
>                                                >>>>>> Fragment header:
>                                                >>>>>>   total   = 1
>                                                >>>>>>   current = 0
>                                                >>>>>> Contents:
>                                                >>>>>>   status error = 'None' (0x00000000)
>                                                >>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>                                                >>>>>>   cid          = 'connect' (0x0000000c)
>                                                >>>>>> Fields:
>                                                >>>>>>   SessionId = '0'
>                                                >>>>>>   ActivationState = 'activated'
>                                                >>>>>>   VoiceCallState = 'none'
>                                                >>>>>>   IpType = 'ipv4'
>                                                >>>>>>   ContextType = '7e5e2a7e-4e6f-7272-736b-656e7e5e2a7e'
>                                                >>>>>>   NwError = '50'
> 2019-11-08 09:54:31.286 modem-manager.service: [1573206871.286147] Couldn't connect bearer '/org/freedesktop/ModemManager1/Bearer/0': 'Unknown error (50)'
>
> At this moment the access tech was shown as: HSDPA | HSUPA
>

This could mean network doesn't allow dual-stack setup on 3G?

> A little later the access tech changed to LTE and I was able to connect with this setting:
>
> 2019-11-08 09:55:12.822 modem-manager.service: [1573206912.822471] IPv4 configuration available: 'address, gateway, dns, mtu'
> 2019-11-08 09:55:12.822 modem-manager.service: [1573206912.822519]   IP addresses (1)
> 2019-11-08 09:55:12.823 modem-manager.service: [1573206912.822576]     IP [0]: '100.96.188.174/30'
> 2019-11-08 09:55:12.823 modem-manager.service: [1573206912.822625]   Gateway: '100.96.188.173'
> 2019-11-08 09:55:12.823 modem-manager.service: [1573206912.822660]   DNS addresses (2)
> 2019-11-08 09:55:12.823 modem-manager.service: [1573206912.822706]     DNS [0]: '139.7.30.126'
> 2019-11-08 09:55:12.823 modem-manager.service: [1573206912.822753]     DNS [1]: '139.7.30.125'
> 2019-11-08 09:55:12.824 modem-manager.service: [1573206912.822784]   MTU: '1500'
> 2019-11-08 09:55:12.824 modem-manager.service: [1573206912.822812] IPv6 configuration available: 'none'
> 2019-11-08 09:55:12.824 modem-manager.service: [1573206912.822961] (wwan0): port now connected
> 2019-11-08 09:55:12.824 modem-manager.service: [1573206912.823046] Connected bearer '/org/freedesktop/ModemManager1/Bearer/2'
>

In this case, I can see how you request a dual-stack ipv4v6 connection
setup, but the modem replies a ipv4-only connection success. MM
ignores that field and assumes the connection setup is ipv4v6 instead,
so tries to load ipv6 settings and finds none.

2019-11-08 09:55:12.630 modem-manager.service: [1573206912.630053]
Launching ipv4v6 connection with APN 'web.vodafone.de'...
2019-11-08 09:55:12.630 modem-manager.service: [/dev/cdc-wdm0] Sent message...
                                               <<<<<< RAW:
                                               <<<<<<   length = 140
                                               <<<<<<   data   =
03:00:00:00:8C:00:00:00:37:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:01:00:00:00:5C:00:00:00:00:00:00:00:01:00:00:00:3C:00:00:00:1E:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E:77:00:65:00:62:00:2E:00:76:00:6F:00:64:00:61:00:66:00:6F:00:6E:00:65:00:2E:00:64:00:65:00:00:00
2019-11-08 09:55:12.631 modem-manager.service: [/dev/cdc-wdm0] Sent
message (translated)...
                                               <<<<<< Header:
                                               <<<<<<   length      = 140
                                               <<<<<<   type        =
command (0x00000003)
                                               <<<<<<   transaction = 55
                                               <<<<<< Fragment header:
                                               <<<<<<   total   = 1
                                               <<<<<<   current = 0
                                               <<<<<< Contents:
                                               <<<<<<   service =
'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
                                               <<<<<<   cid     =
'connect' (0x0000000c)
                                               <<<<<<   type    =
'set' (0x00000001)
                                               <<<<<< Fields:
                                               <<<<<<   SessionId = '0'
                                               <<<<<<
ActivationCommand = 'activate'
                                               <<<<<<   AccessString =
'web.vodafone.de'
                                               <<<<<<   UserName = '(null)'
                                               <<<<<<   Password = '(null)'
                                               <<<<<<   Compression = 'none'
                                               <<<<<<   AuthProtocol = 'none'
                                               <<<<<<   IpType = 'ipv4v6'
                                               <<<<<<   ContextType =
'7e5e2a7e-4e6f-7272-736b-656e7e5e2a7e'
2019-11-08 09:55:12.693 modem-manager.service: [/dev/cdc-wdm0]
Received message...
                                               >>>>>> RAW:
                                               >>>>>>   length = 80
                                               >>>>>>   data   =
07:00:00:80:50:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:24:00:00:00:00:00:00:00:02:00:00:00:00:00:00:00:03:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E:00:00:00:00
2019-11-08 09:55:12.693 modem-manager.service: [/dev/cdc-wdm0]
Received message (translated)...
                                               >>>>>> Header:
                                               >>>>>>   length      = 80
                                               >>>>>>   type        =
indicate-status (0x80000007)
                                               >>>>>>   transaction = 0
                                               >>>>>> Fragment header:
                                               >>>>>>   total   = 1
                                               >>>>>>   current = 0
                                               >>>>>> Contents:
                                               >>>>>>   service =
'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
                                               >>>>>>   cid     =
'connect' (0x0000000c)
                                               >>>>>> Fields:
                                               >>>>>>   SessionId = '0'
                                               >>>>>>
ActivationState = 'activating'
                                               >>>>>>   VoiceCallState = 'none'
                                               >>>>>>   IpType = 'ipv4v6'
                                               >>>>>>   ContextType =
'7e5e2a7e-4e6f-7272-736b-656e7e5e2a7e'
                                               >>>>>>   NwError = '0'
2019-11-08 09:55:12.693 modem-manager.service: [1573206912.693757]
Received notification (service 'basic-connect', command 'connect')
2019-11-08 09:55:12.757 modem-manager.service: [/dev/cdc-wdm0]
Received message...
                                               >>>>>> RAW:
                                               >>>>>>   length = 84
                                               >>>>>>   data   =
03:00:00:80:54:00:00:00:37:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:00:00:00:00:24:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:01:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E:00:00:00:00
2019-11-08 09:55:12.758 modem-manager.service: [/dev/cdc-wdm0]
Received message (translated)...
                                               >>>>>> Header:
                                               >>>>>>   length      = 84
                                               >>>>>>   type        =
command-done (0x80000003)
                                               >>>>>>   transaction = 55
                                               >>>>>> Fragment header:
                                               >>>>>>   total   = 1
                                               >>>>>>   current = 0
                                               >>>>>> Contents:
                                               >>>>>>   status error =
'None' (0x00000000)
                                               >>>>>>   service      =
'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
                                               >>>>>>   cid          =
'connect' (0x0000000c)
                                               >>>>>> Fields:
                                               >>>>>>   SessionId = '0'
                                               >>>>>>
ActivationState = 'activated'
                                               >>>>>>   VoiceCallState = 'none'
                                               >>>>>>   IpType = 'ipv4'
                                               >>>>>>   ContextType =
'7e5e2a7e-4e6f-7272-736b-656e7e5e2a7e'
                                               >>>>>>   NwError = '0'
2019-11-08 09:55:12.758 modem-manager.service: [1573206912.757947]
Session ID '0': activated (IP type: ipv4v6)


> The strange thing is, when I change the ip_type in the bearer to MM_BEARER_IP_FAMILY_ANY the connection works on the first try:
>
> 2019-11-08 12:58:42.156 modem-manager.service: [1573217922.156045] IPv4 configuration available: 'address, gateway, dns, mtu'
> 2019-11-08 12:58:42.156 modem-manager.service: [1573217922.156101]   IP addresses (1)
> 2019-11-08 12:58:42.156 modem-manager.service: [1573217922.156164]     IP [0]: '100.83.127.55/28'
> 2019-11-08 12:58:42.156 modem-manager.service: [1573217922.156199]   Gateway: '100.83.127.56'
> 2019-11-08 12:58:42.157 modem-manager.service: [1573217922.156223]   DNS addresses (2)
> 2019-11-08 12:58:42.157 modem-manager.service: [1573217922.156254]     DNS [0]: '139.7.30.126'
> 2019-11-08 12:58:42.157 modem-manager.service: [1573217922.156285]     DNS [1]: '139.7.30.125'
> 2019-11-08 12:58:42.157 modem-manager.service: [1573217922.156307]   MTU: '1500'
> 2019-11-08 12:58:42.158 modem-manager.service: [1573217922.156326] IPv6 configuration available: 'none'
> 2019-11-08 12:58:42.158 modem-manager.service: [1573217922.156444] (wwan0): port now connected
> 2019-11-08 12:58:42.158 modem-manager.service: [1573217922.156476] Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
>

When ANY is requested, the logic falls back to IPv4 only.

>
> Has the interpretation of the ip_type MM_BEARER_IP_FAMILY_IPV4V6 changed when performing the connect?
>

No it hasn't really. I really think you need to know whether the
network supports ipv4v6 for a given APN before attempting to use it.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list