bearer mbim: ipv6_config set to dhcp when no ipv6 is available

Reinhard Speyerer rspmn at arcor.de
Tue Oct 9 20:27:41 UTC 2018


On Sun, Oct 07, 2018 at 08:27:58PM +0200, Andreas Fett wrote:
> Hi,
> 
> On Sat, Oct 06, 2018 at 02:49:32PM +0200, Aleksander Morgado wrote:
> > > I could be mis-remembering, but I don't think this was intentional and
> > > if MBIM says IPv6 isn't available, then MM shouldn't say it's available
> > > either.
> > > 
> > > Bjorn or Aleksander, do you have more experience here that you could
> > > share?
> > 
> > I agree that this could be a bug, so the patch would be very welcome.
> 
> I reread the mbim specification and things seem to be a bit more
> complicated than I imagined, as they always are :-) So sorry for not
> doing the reading before sending my first mail.
> 
> Essentially the standard says in 10.5.20 (MBIM_CID_IP_CONFIGURATION)
> That the ip info can be aquired either via the ip configuration message
> or via "the hosts ip stack" which would dhcp or SLAAC in the v6 case.
> For DNS it allows a combination of the two.
> 
> So the code in ip_configuration_query_ready() seems to be correct
> in advertising MM_BEARER_IP_METHOD_DHCP even when none of the bits in
> ipv6configurationavailable are set.
> 
> There seems however to be a problem with the way the context ip type
> is represented in the bearer. It just reflects the attribute as send in
> MBIM_SET_CONNECT (10.5.12.4).
> 
> There is however an MBIM_CONNECT_INFO (10.5.12.6) which seems to report
> the available ip type back. If I'm not mistaken that one is parsed
> in connect_set_ready() using mbim_message_connect_response_parse().
> The ip_type there however is ignored. A comment in the same function
> mentions that it is only relevant for MBIM_CONTEXT_IP_TYPE_DEFAULT but
> I wonder if that is true for ip4+ipv6 contexts.
> 
> Any thoughts on this?

Hi Andreas,

for IPType IPv4v6 the IPType returned may be IPv4 or IPv6 instead of IPv4v6
in the case where PDP context activation is accepted by the network but it
returns a SM Cause 2 IE like this:

GSM A-I/F DTAP - Activate PDP Context Request
    Protocol Discriminator: GPRS session management messages (10)
        .... 1010 = Protocol discriminator: GPRS session management messages (0xa)
        0... .... = TI flag: allocated by sender
        .000 .... = TIO: 0
    01.. .... = Sequence number: 1
    DTAP GPRS Session Management Message Type: Activate PDP Context Request (0x41)
    Network Service Access Point Identifier - Requested NSAPI
        NSAPI: 0x05 (5) 
    LLC Service Access Point Identifier - Requested LLC SAPI
        0000 .... = Spare bit(s): 0
        .... 0011 = LLC SAPI: SAPI 3 (3)
    Quality Of Service - Requested QoS
      [...]
    Packet Data Protocol Address - Requested PDP address
        Length: 2
        0000 .... = Spare bit(s): 0
        .... 0001 = PDP type organization: IETF allocated address (1)
        PDP type number: IPv4v6 address (141)
        Dynamic addressing
    Access Point Name
        Element ID: 0x28
        Length: 22
        APN: pinternet.interkom.de
    Protocol Configuration Options
      [...]

GSM A-I/F DTAP - Activate PDP Context Accept
    Protocol Discriminator: GPRS session management messages (10)
        .... 1010 = Protocol discriminator: GPRS session management messages (0xa)
        1... .... = TI flag: allocated by receiver
        .000 .... = TIO: 0
    01.. .... = Sequence number: 1
    DTAP GPRS Session Management Message Type: Activate PDP Context Accept (0x42)
    LLC Service Access Point Identifier - Negotiated LLC SAPI
        0000 .... = Spare bit(s): 0
        .... 0011 = LLC SAPI: SAPI 3 (3)
    Quality Of Service - Negotiated QoS
      [...]
    Radio Priority
        .... .010 = Radio Priority (PDP or SMS): priority level 2 (2)
    Packet Data Protocol Address - PDP address
        Element ID: 0x2b
        Length: 6
        0000 .... = Spare bit(s): 0
        .... 0001 = PDP type organization: IETF allocated address (1)
        PDP type number: IPv4 address (33)
        IPv4 address: 10.x.y.z
    Protocol Configuration Options
      [...]
    SM Cause 2 - SM cause
        Element ID: 0x39
        Length: 1
        SM Cause 2: PDP type IPv4 only allowed (50)

Regards,
Reinhard


More information about the ModemManager-devel mailing list