From: Roy Marples Date: Thu, 16 Apr 2015 16:08:24 +0000 (+0000) Subject: BSD handles a subnet route for addresses of /32. X-Git-Tag: v6.8.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd1c213ebd13626f9815275e6e8592ef6f284bb9;p=thirdparty%2Fdhcpcd.git BSD handles a subnet route for addresses of /32. --- diff --git a/ipv4.c b/ipv4.c index feb48d27..9c5162c9 100644 --- a/ipv4.c +++ b/ipv4.c @@ -445,9 +445,13 @@ add_subnet_route(struct rt_head *rt, const struct interface *ifp) s = D_CSTATE(ifp); /* Don't create a subnet route for these addresses */ - if (s->net.s_addr == INADDR_BROADCAST || - s->net.s_addr == INADDR_ANY) + if (s->net.s_addr == INADDR_ANY) return rt; +#ifndef BSD + /* BSD adds a route in this instance */ + if (s->net.s_addr == INADDR_BROADCAST) + return rt; +#endif if ((r = malloc(sizeof(*r))) == NULL) { logger(ifp->ctx, LOG_ERR, "%s: %m", __func__);