On Fri, 2014-12-19 at 11:25 +0000, Pasi Sjöholm wrote:
> The nameservers 1/2 are not included in the new message received when
> the context is re-activated/connected after the pdp-type has been
> changed to dual/ipv4v6.

At start:
 char *nameservers = NULL

If and only if "DomainNameServers" is set:
 nameservers = extract_nameservers(&value)

Independent of "DomainNameServers":
 g_free(context->ipv6_nameservers)
 context->ipv6_nameservers = nameservers

At this point nameservers is NULL, if nothing was sent from oFono. At
this point nameservers is non-NULL if oFono sent something.

Looking once more at patch 3/6 makes it clear that the DHCPv6 case
detected by address being NULL, avoids setting context nameservers
altogether. The original code sets non-NULL nameservers only if they are
supplied by the "DomainNameServers" property. Thus it is oFono that is
sending supposedly "outdated" information while ConnMan believes
whatever oFono tells it, "outdated" or not. If the information really is
"outdated", oFono needs to be fixed.

If the nameservers indeed are not attached to the message from oFono
while ConnMan keeps on using them, some other part of the code needs
fixing. Patch 3/6 may seem to work simply because some other patch in
the series causes nameservers to be removed later on. This especially if
all of them are tested at the same time.


HTH,

        Patrik


_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to