summaryrefslogtreecommitdiffstats
path: root/ipv6rs.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-05-30 12:07:25 +0000
committerRoy Marples <roy@marples.name>2013-05-30 12:07:25 +0000
commit0e906716c515061199e4d24a2503daa853a48862 (patch)
tree3486923ad8f1e1326042b5c7ec5b4d070779380e /ipv6rs.c
parent078c99e5e49e2560efe5d82bedb81b504dad1371 (diff)
downloaddhcpcd-0e906716c515061199e4d24a2503daa853a48862.tar.xz
It's possible to receive an RA for an interface that has not yet
obtained a local link address to send an RS. If this happens, we should process the RA.
Diffstat (limited to 'ipv6rs.c')
-rw-r--r--ipv6rs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ipv6rs.c b/ipv6rs.c
index bc151c79..29d4d94d 100644
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -232,7 +232,7 @@ ipv6rs_sendprobe(void *arg)
struct in6_pktinfo pi;
int hoplimit = HOPLIMIT;
- if (!ipv6_interfacehaslinklocal(ifp)) {
+ if (ipv6_linklocal(ifp) == NULL) {
syslog(LOG_DEBUG,
"%s: delaying Router Soliciation for LL address",
ifp->name);
@@ -596,6 +596,16 @@ ipv6rs_handledata(__unused void *arg)
#endif
return;
}
+
+ /* We could recieve a RA before we sent a RS*/
+ if (ipv6_linklocal(ifp) == NULL) {
+#ifdef DEBUG_RS
+ syslog(LOG_DEBUG, "%s: received RA from %s (no link-local)",
+ ifp->name, sfrom);
+#endif
+ return;
+ }
+
TAILQ_FOREACH(rap, &ipv6_routers, next) {
if (ifp == rap->iface &&
memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,