]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Tweak unicast a little
authorRoy Marples <roy@marples.name>
Fri, 13 Dec 2013 14:54:14 +0000 (14:54 +0000)
committerRoy Marples <roy@marples.name>
Fri, 13 Dec 2013 14:54:14 +0000 (14:54 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index cb349d226096c86c041e1bb12366087b4fb2e2b9..46248eb8c84d8125dc16f76f7dd5758440594f9e 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -716,12 +716,10 @@ dhcp6_sendmessage(struct interface *ifp, void (*callback)(void *))
        /* We need to ensure we have sufficient scope to unicast the address */
        /* XXX FIXME: We should check any added addresses we have like from
         * a Router Advertisement */
-       if (!IN6_IS_ADDR_UNSPECIFIED(&state->unicast) &&
-           state->state == DH6S_REQUEST &&
-           (!IN6_IS_ADDR_LINKLOCAL(&state->unicast) || !ipv6_linklocal(ifp)))
-               state->unicast = in6addr_any;
-
-       if (IN6_IS_ADDR_UNSPECIFIED(&state->unicast)) {
+       if (IN6_IS_ADDR_UNSPECIFIED(&state->unicast) ||
+           (state->state == DH6S_REQUEST &&
+           (!IN6_IS_ADDR_LINKLOCAL(&state->unicast) || !ipv6_linklocal(ifp))))
+       {
                to.sin6_addr = in6addr_linklocal_alldhcp;
                broad_uni = "broadcasting";
        } else {