Hi Elena,
On 05/21/2012 06:48 PM, Elena Tebesoi wrote:
When connman is restarted, DNS servers are removed and added again
with function __connman_resolver_redo_servers(). While removing a
DNS entry, one should also remove the resolver timer registered for it.
Not doing so, causes the timeout handler resolver_expire_cb to fire
without being explicitly set.
---
When implementing RDNSS refresh feature and executing connman restart,
the resolver_refresh_cb() handler is called before the timer
is actually started. This makes Connman to send Router Solicitation
in a case when this is not desired.
---
src/resolver.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/resolver.c b/src/resolver.c
index 58af2f7..421b12f 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -493,6 +493,13 @@ int __connman_resolver_redo_servers(const char *interface)
*/
__connman_dnsproxy_remove(entry->interface, entry->domain,
entry->server);
+ /*
+ * Remove also the resolver timer for the old server entry.
+ * A new timer will be set for the new server entry
+ * when the next Router Advertisement message arrives
+ * with RDNSS/DNSSL settings.
+ */
+ g_source_remove(entry->timeout);
__connman_dnsproxy_append(entry->interface, entry->domain,
entry->server);
ACK from me.
Cheers,
Jukka
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman