From: Roy Marples Date: Sun, 14 Jun 2015 14:42:24 +0000 (+0000) Subject: Allow IPv4LL to qualify an added address. X-Git-Tag: v6.9.1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20db67458942a4732da4ee50dd81d46162b26af8;p=thirdparty%2Fdhcpcd.git Allow IPv4LL to qualify an added address. --- diff --git a/ipv4.c b/ipv4.c index 657a3089..9dc5f1ac 100644 --- a/ipv4.c +++ b/ipv4.c @@ -160,12 +160,15 @@ ipv4_findaddr(struct dhcpcd_ctx *ctx, const struct in_addr *addr) int ipv4_hasaddr(const struct interface *ifp) { - const struct dhcp_state *state; - - state = D_CSTATE(ifp); - return (state && - state->added == STATE_ADDED && - state->addr.s_addr != INADDR_ANY); + const struct dhcp_state *dstate; + const struct ipv4ll_state *istate; + + dstate = D_CSTATE(ifp); + istate = IPV4LL_CSTATE(ifp); + return ((dstate && + dstate->added == STATE_ADDED && + dstate->addr.s_addr != INADDR_ANY) || + (istate && istate->addr.s_addr != INADDR_ANY)); } void