diff options
| author | Roy Marples <roy@marples.name> | 2019-01-06 10:10:59 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-01-06 10:10:59 +0000 |
| commit | 12489da256cfd51afb736b278b88510e5e4303e7 (patch) | |
| tree | 4acf18d0785a17a5d59f857e3ee8525e39d4f06d /src/ipv6nd.c | |
| parent | 2f2db8dcf1a3acd87accc71951cae044118edcbf (diff) | |
| download | dhcpcd-12489da256cfd51afb736b278b88510e5e4303e7.tar.xz | |
ip6: Install not on link routes with a gateway of the router
This allows a secondary router to broadcast prefixes it controls
without being a default router itself.
Diffstat (limited to 'src/ipv6nd.c')
| -rw-r--r-- | src/ipv6nd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c index d6dc749d..9a53fc92 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -1096,12 +1096,6 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, struct interface *ifp, if (ap == NULL) { unsigned int flags; - if (!(pi.nd_opt_pi_flags_reserved & - ND_OPT_PI_FLAG_AUTO) && - !(pi.nd_opt_pi_flags_reserved & - ND_OPT_PI_FLAG_ONLINK)) - continue; - flags = IPV6_AF_RAPFX; if (pi.nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_AUTO && @@ -1114,7 +1108,8 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, struct interface *ifp, if (ap == NULL) break; ap->prefix = pi_prefix; - ap->dadcallback = ipv6nd_dadcallback; + if (flags & IPV6_AF_AUTOCONF) + ap->dadcallback = ipv6nd_dadcallback; ap->created = ap->acquired = rap->acquired; TAILQ_INSERT_TAIL(&rap->addrs, ap, next); @@ -1124,7 +1119,8 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, struct interface *ifp, * temporary address also exists then * extend the existing one rather than * create a new one */ - if (ipv6_iffindaddr(ifp, &ap->addr, + if (flags & IPV6_AF_AUTOCONF && + ipv6_iffindaddr(ifp, &ap->addr, IN6_IFF_NOTUSEABLE) && ipv6_settemptime(ap, 0)) new_ap = 0; |
