From: Roy Marples Date: Wed, 25 May 2016 10:32:39 +0000 (+0000) Subject: Fix some routing issues for POINTOPOINT interfaces. X-Git-Tag: v6.11.1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeb8d62f485b39c1e4e9ad789123fd8050dfab34;p=thirdparty%2Fdhcpcd.git Fix some routing issues for POINTOPOINT interfaces. --- diff --git a/ipv4.c b/ipv4.c index 09c65d7f..12945b34 100644 --- a/ipv4.c +++ b/ipv4.c @@ -548,6 +548,10 @@ add_subnet_route(struct rt_head *rt, const struct interface *ifp) if (rt == NULL) /* earlier malloc failed */ return NULL; + /* P2P interfaces don't have subnet routes as such. */ + if (ifp->flags & IFF_POINTOPOINT) + return rt; + state = D_CSTATE(ifp); /* Don't create a subnet route for these addresses */ if (state->addr->mask.s_addr == INADDR_ANY) @@ -677,6 +681,10 @@ add_router_host_route(struct rt_head *rt, const struct interface *ifp) if (rt == NULL) /* earlier malloc failed */ return NULL; + /* Don't add a host route for these interfaces. */ + if (ifp->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) + return rt; + TAILQ_FOREACH(rtp, rt, next) { if (rtp->dest.s_addr != INADDR_ANY) continue;