summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-05-24 13:02:31 +0000
committerRoy Marples <roy@marples.name>2016-05-24 13:02:31 +0000
commit6be2c4f91ebd7a880b06a530195356b532bd6d47 (patch)
tree775be69171ebddbff2370c2ff25ae4c7566dec7a
parent8aaaf0a2a80d0660227f12deabac725a5b759a54 (diff)
downloaddhcpcd-6be2c4f91ebd7a880b06a530195356b532bd6d47.tar.xz
We need to store INADDR_ANY addresses for Solaris.
-rw-r--r--ipv4.c12
1 files changed, 5 insertions, 7 deletions
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);
}