diff options
| author | Roy Marples <roy@marples.name> | 2016-05-25 10:32:39 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-05-25 10:32:39 +0000 |
| commit | eeb8d62f485b39c1e4e9ad789123fd8050dfab34 (patch) | |
| tree | 144f99c757c5fe264959396d7a30911a1b8baf48 | |
| parent | f6bdf24c69d370e959e571289c12e9d55ca2f1d0 (diff) | |
| download | dhcpcd-eeb8d62f485b39c1e4e9ad789123fd8050dfab34.tar.xz | |
Fix some routing issues for POINTOPOINT interfaces.
| -rw-r--r-- | ipv4.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; |
