From 172f26b97e22cdbf10c2b6db05d138ab1421d5d3 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 13 Dec 2013 14:54:14 +0000 Subject: [PATCH] Tweak unicast a little --- dhcp6.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 { -- 2.47.3