summaryrefslogtreecommitdiffstats
path: root/ipv6.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 /ipv6.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 'ipv6.c')
-rw-r--r--ipv6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ipv6.c b/ipv6.c
index 6998c5ae..c7a515b6 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -373,13 +373,15 @@ ipv6_handleifa(int cmd, struct if_head *ifs, const char *ifname,
dhcp6_handleifa(cmd, ifname, addr, flags);
}
-int
-ipv6_interfacehaslinklocal(const struct interface *ifp)
+const struct ll_addr *
+ipv6_linklocal(const struct interface *ifp)
{
const struct ipv6_state *state;
state = IPV6_CSTATE(ifp);
- return (state && TAILQ_FIRST(&state->ll_addrs)) ? 1 : 0;
+ if (state)
+ return TAILQ_FIRST(&state->ll_addrs);
+ return NULL;
}
int ipv6_addlinklocalcallback(struct interface *ifp,