From: Roy Marples Date: Fri, 13 Dec 2013 14:54:14 +0000 (+0000) Subject: Tweak unicast a little X-Git-Tag: v6.2.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=172f26b97e22cdbf10c2b6db05d138ab1421d5d3;p=thirdparty%2Fdhcpcd.git Tweak unicast a little --- diff --git a/dhcp6.c b/dhcp6.c index cb349d22..46248eb8 100644 --- 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 {