From: Pasi Sjöholm <[email protected]>

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.
---
 src/rtnl.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/rtnl.c b/src/rtnl.c
index 634b523..bebcef7 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);
+               }
        }
 }
 
-- 
2.1.0

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

Reply via email to