summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-09-06 10:43:49 +0000
committerRoy Marples <roy@marples.name>2016-09-06 10:43:49 +0000
commit375aae4fbb63cdea339b93e83e2ad5d3b2f72c64 (patch)
tree0e62128b567a3b8cef17b25b2a2478666b54fffd /ipv6.c
parent527a983d2667effb8998bdbde6149b48501da6ee (diff)
downloaddhcpcd-375aae4fbb63cdea339b93e83e2ad5d3b2f72c64.tar.xz
Remove the POLLADDR check out of if-bsd.c and into ipv6.c for other OS's
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipv6.c b/ipv6.c
index 9a391774..4b1d9225 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -1611,6 +1611,20 @@ ipv6_startstatic(struct interface *ifp)
int
ipv6_start(struct interface *ifp)
{
+#ifdef IPV6_POLLADDRFLAG
+ struct ipv6_state *state;
+
+ /* We need to update the address flags. */
+ if ((state = IPV6_STATE(ifp)) != NULL) {
+ struct ipv6_addr *ia;
+ int flags;
+
+ TAILQ_FOREACH(ia, &state->addrs, next) {
+ if ((flags = if_addrflags6(ia)) != -1)
+ ia->addr_flags = flags;
+ }
+ }
+#endif
if (ipv6_tryaddlinklocal(ifp) == -1)
return -1;