mbim Bearer reports IP_METHOD_DHCP when namesservers are missing
Dan Williams
dcbw at redhat.com
Thu Dec 3 08:54:54 PST 2015
On Thu, 2015-12-03 at 12:22 +0100, Aleksander Morgado wrote:
> On Thu, Dec 3, 2015 at 11:18 AM, Andreas Fett <
> andreas.fett at secunet.com> wrote:
> > In src/mm-bearer-mbim.c: ip_configuration_query_ready()
> > the bearer will set IP_METHOD_DHCP if ipv4dnsservercount is zero,
> > it does so regardless of any present IP configuration (which is
> > visible
> > in the bearer object).
> >
> > Unfortunately some (or all?) mbim modems do not support DHCP, and I
> > have
> > a scenario at hand where the provider does not supply any DNS
> > servers.
> >
>
> Not all, just some.
>
> > I noticed that other bearer implementations (eg.
> > mm-broadband-bearer-mbm) will report IP_METHOD_STATIC even if no
> > nameserver info could be acquired.
> >
> > Which is the correct way to deal with this? Patch the mibm bearer
> > to report IP_METHOD_STATIC if it gets at least ip and gateway or
> > just ignore the IP_METHOD_XXX if we find all info we need in the
> > bearer?
>
> Gateway should also not be mandatory. Should we maybe just say STATIC
> if we get an IP address reported by the modem?
Yeah.
> What do others think? Is there any MBIM modem out there not reporting
> any IP settings when queried and therefore do require DHCP?
>
> One thing we could do is to expose in the bearer IP config all the
> available fields, even if we end up requesting DHCP, but with the
> new
> logic we would only be requesting DHCP if there's no IP, and not sure
> if the modem will ever report any other setting when IP is not even
> reported.
I see that our API docs should be updated, but see commit
33eba0393d259b6dc97e991be6c1dc4585e15f5d for some background at least
for IPv6. Some of that may/should apply to IPv4 too.
For IPv6 MM should report "DHCP" if there is *any* information missing
(DNS or Gateway) because that may have to be acquired via SLAAC or
DHCPv6. MM should also fill in any information it already has, even if
it sets DHCP as the method, since this information may not be able to
be retrieved from SLAAC or DHCPv6. Also sometimes there is an IPv6LL
address that should be assigned to the modem before performing
SLAAC/DHCPv6 which needs to be reported in the IP config.
For IPv4 though, I think MM should only require an IP address to report
STATIC; clients already have to handle missing gateway and DNS servers
since some modems don't give those (or give wrong ones) so this
wouldn't be any different.
Dan
More information about the ModemManager-devel
mailing list