[PATCH 0/2] DNS proxy removal - take two

Sameer Naik sameer.subscriptions at damagehead.com
Wed Nov 21 23:18:31 PST 2012


Hello Patrik,

I applied the two patches and found the issue is gone. dnsproxy is
able to resolve DNS addresses between wifi dongle hotplugs.
I have attached the log generated of the whole sequence in case it is
of any use.

Regards
~Sameer

On Wed, Nov 21, 2012 at 7:55 PM,  <patrik.flykt at linux.intel.com> wrote:
> From: Patrik Flykt <patrik.flykt at linux.intel.com>
>
>         Hi,
>
> From one of the logs submitted (thanks!), I picked up the following debug
> output sequence:
>
> connmand[3519]: src/service.c:service_indicate_state() service 0x92a8548 old association - new disconnect/disconnect => disconnect
> connmand[3519]: src/session.c:service_state_changed() service 0x92a8548 state 6
> connmand[3519]: src/provider.c:provider_service_changed() service 0x92a8548 cellular_255030604034779_context1 state 6 index 14/-1
> ...
> connmand[3519]: src/wispr.c:__connman_wispr_stop() service 0x92a8548
> connmand[3519]: src/wispr.c:free_connman_wispr_portal()
> connmand[3519]: src/wispr.c:free_connman_wispr_portal_context() context (nil)
> connmand[3519]: src/wispr.c:free_connman_wispr_portal_context() context (nil)
> connmand[3519]: src/wpad.c:__connman_wpad_stop() service 0x92a8548
> connmand[3519]: src/notifier.c:__connman_notifier_disconnect() type 6
>
> From the code in service.c, the following function calls are made:
>
>         service->state = new_state;
>         state_changed(service);
> ...
>         } else if (new_state == CONNMAN_SERVICE_STATE_DISCONNECT) {
>                 def_service = __connman_service_get_default();
>
>                 if (__connman_notifier_is_connected() == FALSE &&
>                         def_service != NULL &&
>                                 def_service->provider != NULL)
>                         __connman_provider_disconnect(def_service->provider);
>
>                 default_changed();
>
>                 __connman_wispr_stop(service);
>
>                 __connman_wpad_stop(service);
>
>                 update_nameservers(service);
>                 dns_changed(service);
>                 domain_changed(service);
>
>                 __connman_notifier_disconnect(service->type);
>
> After stopping wispr and wpad, nameservers are updated next. But as
> can be seen from the logs, no nameserver related information is printed
> and no nameservers removed. In update_nameservers(), the interface
> name is fetched with __connman_ipconfig_get_ifname(). This function in
> turn looks up the ipconfig, but if the interface itself is already down,
> no such info is available.
>
> The same happens with the earlier patch I sent. When trying to get
> the interface name using connman_inet_ifname(), the debug output
> stated that the interface name is NULL:
>
> connmand[1251]: src/service.c:update_nameservers() service 0x4d2778 index 5 ifname (null) ipconfig ipv4 0x4d26b8 ipv6 0x4d2730
>
> This happens when the interface already removed.
>
> It appears to be fixed by changing the code to use interface indexes
> instead of interface names in all places. With this kind of change
> there is no dependency on the already removed/cleared ipconfig structure
> nor the need to look up the interface name using an ioctl which fails
> with the interface being removed already.
>
> To test, apply both patches and see if the problem persists. The second
> patch is just there to help with any further debugging.
>
>
> Cheers,
>
>         Patrik
>
>
> Patrik Flykt (2):
>   core: Use interface index instead of interface name
>   service: Add debug messages to see the network index
>
>  include/resolver.h |    8 +--
>  src/connman.h      |   14 ++---
>  src/dnsproxy.c     |  160 ++++++++++++++++++++++++++++------------------------
>  src/resolver.c     |  133 ++++++++++++++++++++-----------------------
>  src/rtnl.c         |   17 ++----
>  src/service.c      |   75 +++++++++++-------------
>  src/tethering.c    |    7 ++-
>  7 files changed, 203 insertions(+), 211 deletions(-)
>
> --
> 1.7.10.4
>
> _______________________________________________
> connman mailing list
> connman at connman.net
> http://lists.connman.net/listinfo/connman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: connman.log.tar.xz
Type: application/octet-stream
Size: 10240 bytes
Desc: not available
URL: <http://lists.01.org/pipermail/connman/attachments/20121122/349d5f5d/attachment.obj>


More information about the connman mailing list