]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
No need for this code when we can reliably work with IPv6 RTM_DELADDR messages
authorRoy Marples <roy@marples.name>
Tue, 4 Mar 2014 17:13:40 +0000 (17:13 +0000)
committerRoy Marples <roy@marples.name>
Tue, 4 Mar 2014 17:13:40 +0000 (17:13 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index 284c57a034129e87e9ea5145cfee77ee9625f210..51c8d66b684177f48a358dff7b10dbf63713a19e 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -488,8 +488,10 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop,
     const struct interface *ifd)
 {
        struct ipv6_addr *ap, *apn;
+#ifdef LISTEN_DAD
        struct ipv6_state *state;
        struct ipv6_addr_l *lap;
+#endif
 
        TAILQ_FOREACH_SAFE(ap, addrs, next, apn) {
                if (ifd && ap->delegating_iface != ifd)
@@ -512,7 +514,9 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop,
                            errno != EADDRNOTAVAIL && errno != ENXIO)
                                syslog(LOG_ERR, "del_address6 %m");
 
-                       /* Remove it from our internal state */
+#ifdef LISTEN_DAD
+                       /* Remove it from our internal state as we cannot
+                        * reliably listen to RTM messages */
                        state = IPV6_STATE(ap->iface);
                        if (state) {
                                TAILQ_FOREACH(lap, &state->addrs, next) {
@@ -526,6 +530,7 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop,
                                        }
                                }
                        }
+#endif
                }
                free(ap);
        }