From: Roy Marples Date: Tue, 24 May 2016 13:02:31 +0000 (+0000) Subject: We need to store INADDR_ANY addresses for Solaris. X-Git-Tag: v6.11.1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6be2c4f91ebd7a880b06a530195356b532bd6d47;p=thirdparty%2Fdhcpcd.git We need to store INADDR_ANY addresses for Solaris. --- diff --git a/ipv4.c b/ipv4.c index cebda0b9..09c65d7f 100644 --- a/ipv4.c +++ b/ipv4.c @@ -1212,10 +1212,6 @@ ipv4_handleifa(struct dhcpcd_ctx *ctx, errno = ESRCH; return; } - if (addr->s_addr == INADDR_ANY) { - errno = EINVAL; - return; - } if ((ifp = if_find(ifs, ifname)) == NULL) return; if ((state = ipv4_getstate(ifp)) == NULL) { @@ -1254,9 +1250,11 @@ ipv4_handleifa(struct dhcpcd_ctx *ctx, return; } - arp_handleifa(cmd, ia); - dhcp_handleifa(cmd, ia); - + if (addr->s_addr != INADDR_ANY && addr->s_addr != INADDR_BROADCAST) { + arp_handleifa(cmd, ia); + dhcp_handleifa(cmd, ia); + } + if (cmd == RTM_DELADDR) free(ia); }