summaryrefslogtreecommitdiffstats
path: root/ipv6rs.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-05-17 23:09:36 +0000
committerRoy Marples <roy@marples.name>2013-05-17 23:09:36 +0000
commit5331b839c9a0feac60ae563b051609eba9a066ab (patch)
tree584fe9f5aafc9250c154618e987c49db0579374e /ipv6rs.c
parent21701103539f281964a5ccd2ba9ff75b497dae04 (diff)
downloaddhcpcd-5331b839c9a0feac60ae563b051609eba9a066ab.tar.xz
Store IPv6 link local addresses per interface.
Listen to kernel messages to account them. If we don't have a local link address, delay IPv6RS as it just won#t work until we have a local link address.
Diffstat (limited to 'ipv6rs.c')
-rw-r--r--ipv6rs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ipv6rs.c b/ipv6rs.c
index ca69fe2a..34473b43 100644
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -232,6 +232,14 @@ ipv6rs_sendprobe(void *arg)
struct in6_pktinfo pi;
int hoplimit = HOPLIMIT;
+ if (!ipv6_interfacehaslinklocal(ifp)) {
+ syslog(LOG_DEBUG,
+ "%s: delaying Router Soliciation for LL address",
+ ifp->name);
+ ipv6_addlinklocalcallback(ifp, ipv6rs_sendprobe, ifp);
+ return;
+ }
+
dst = allrouters;
dst.sin6_scope_id = ifp->index;
@@ -730,7 +738,7 @@ ipv6rs_handledata(__unused void *arg)
if (pi->nd_opt_pi_flags_reserved &
ND_OPT_PI_FLAG_AUTO)
{
- ipv6_makeaddr(&ap->addr, ifp->name,
+ ipv6_makeaddr(&ap->addr, ifp,
&ap->prefix,
pi->nd_opt_pi_prefix_len);
cbp = inet_ntop(AF_INET6,