summaryrefslogtreecommitdiffstats
path: root/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-01-19 13:24:39 +0000
committerRoy Marples <roy@marples.name>2015-01-19 13:24:39 +0000
commit727cd92aaf72203d29fb5125d30a0328d4e502f3 (patch)
treedbf4ece537c6f27d6a81b15a5d90239b43638954 /ipv6nd.c
parent70193d0a9a178e0e7d2ad8d586b4d63277b09785 (diff)
downloaddhcpcd-727cd92aaf72203d29fb5125d30a0328d4e502f3.tar.xz
Change define KERNEL_MANAGETEMPADD to IPV6_MANAGETEMPADDR.
Use this to block out actual address additions so we don't get bogus errors about not being able to create temporary addresses.
Diffstat (limited to 'ipv6nd.c')
-rw-r--r--ipv6nd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ipv6nd.c b/ipv6nd.c
index ed9bb2cc..d296dda4 100644
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -691,7 +691,10 @@ ipv6nd_handlera(struct ipv6_ctx *ctx, struct interface *ifp,
struct ipv6_addr *ap;
char *opt, *opt2, *tmp;
struct timeval expire;
- uint8_t new_rap, new_data, new_ap;
+ uint8_t new_rap, new_data;
+#ifdef IPV6_MANAGETEMPADDR
+ uint8_t new_ap;
+#endif
if (len < sizeof(struct nd_router_advert)) {
syslog(LOG_ERR, "IPv6 RA packet too short from %s", ctx->sfrom);
@@ -898,6 +901,7 @@ ipv6nd_handlera(struct ipv6_ctx *ctx, struct interface *ifp,
ap->created = ap->acquired = rap->received;
TAILQ_INSERT_TAIL(&rap->addrs, ap, next);
+#ifdef IPV6_MANAGETEMPADDR
/* New address to dhcpcd RA handling.
* If the address already exists and a valid
* temporary address also exists then
@@ -908,8 +912,11 @@ ipv6nd_handlera(struct ipv6_ctx *ctx, struct interface *ifp,
new_ap = 0;
else
new_ap = 1;
+#endif
} else {
+#ifdef IPV6_MANAGETEMPADDR
new_ap = 0;
+#endif
ap->flags &= ~IPV6_AF_STALE;
ap->acquired = rap->received;
}
@@ -932,6 +939,7 @@ ipv6nd_handlera(struct ipv6_ctx *ctx, struct interface *ifp,
}
}
+#ifdef IPV6_MANAGETEMPADDR
/* RFC4941 Section 3.3.3 */
if (ap->flags & IPV6_AF_AUTOCONF &&
ap->iface->options->options & DHCPCD_IPV6RA_OWN &&
@@ -948,6 +956,7 @@ ipv6nd_handlera(struct ipv6_ctx *ctx, struct interface *ifp,
"ipv6_createtempaddr: %m");
}
}
+#endif
lifetime = ap->prefix_vltime;
break;
@@ -1100,7 +1109,9 @@ extra_opt:
goto handle_flag;
}
ipv6_addaddrs(&rap->addrs);
+#ifdef IPV6_MANAGETEMPADDR
ipv6_addtempaddrs(ifp, &rap->received);
+#endif
ipv6_buildroutes(ifp->ctx);
if (ipv6nd_scriptrun(rap))
return;