Hi

We found that for connman to offer dnsproxy the resolver init needs to be
called after the plugin_init. This is because as a part of plugin_init, the
loopback plugin init would be called and would set up 127.0.0.1 and ::1
address to "lo" interface. Since in the current code these functions are
called in reverse order, by the time we call resolver_init lo interface
does not have any IP address. Hence it resorts back to resolv.conf file
which will have nameserver entries set by connected service.

I am attaching a simple patch for this fix. This has been tested at our end.

Regards
Naveen
--- src/main.c.orig	2015-06-26 07:47:05.909168154 -0700
+++ src/main.c	2015-06-26 07:49:41.587516075 -0700
@@ -676,7 +676,6 @@ int main(int argc, char *argv[])
 	__connman_stats_init();
 	__connman_clock_init();
 
-	__connman_resolver_init(option_dnsproxy);
 	__connman_ipconfig_init();
 	__connman_rtnl_init();
 	__connman_task_init();
@@ -688,6 +687,7 @@ int main(int argc, char *argv[])
 
 	__connman_plugin_init(option_plugin, option_noplugin);
 
+	__connman_resolver_init(option_dnsproxy);
 	__connman_rtnl_start();
 	__connman_dhcp_init();
 	__connman_dhcpv6_init();
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to