diff options
| author | Roy Marples <roy@marples.name> | 2013-05-30 12:07:25 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-05-30 12:07:25 +0000 |
| commit | 0e906716c515061199e4d24a2503daa853a48862 (patch) | |
| tree | 3486923ad8f1e1326042b5c7ec5b4d070779380e /ipv6.c | |
| parent | 078c99e5e49e2560efe5d82bedb81b504dad1371 (diff) | |
| download | dhcpcd-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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, |
