summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPasi Sjöholm <pasi.sjoholm@jollamobile.com>2015-03-03 21:01:42 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2015-03-05 11:01:14 (GMT)
commit5e41c642b0a5532001185118af3f2bb023264787 (patch)
treea07c64c8676fb4a100695b2a6b463189bb63d3ad
parentf0143b40b1c37362096291f4f65da556a53ead7c (diff)
downloadconnman-master.tar.gz
connman-master.tar.xz
rtln: Redo nameserver(s) only when ipaddress is previously unknownHEADmaster
Every RA causes process_newaddr() to be called with autoconfigured addresses and therefore removing/re-appending the dnsproxy servers is bit too radical thing to do if the address is already known/configured.
-rw-r--r--src/rtnl.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 634b523..b8b02c4 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -612,17 +612,18 @@ static void process_newaddr(unsigned char family, unsigned char prefixlen,
if (!inet_ntop(family, src, ip_string, INET6_ADDRSTRLEN))
return;
- __connman_ipconfig_newaddr(index, family, label,
- prefixlen, ip_string);
-
- if (family == AF_INET6) {
- /*
- * Re-create RDNSS configured servers if there are any
- * for this interface. This is done because we might
- * have now properly configured interface with proper
- * autoconfigured address.
- */
- __connman_resolver_redo_servers(index);
+ if (__connman_ipconfig_newaddr(index, family, label,
+ prefixlen, ip_string) >= 0) {
+ if (family == AF_INET6) {
+ /*
+ * Re-create RDNSS configured servers if there
+ * are any for this interface. This is done
+ * because we might have now properly
+ * configured interface with proper
+ * autoconfigured address.
+ */
+ __connman_resolver_redo_servers(index);
+ }
}
}