summaryrefslogtreecommitdiffstats
path: root/src/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-04-19 05:33:53 +0100
committerRoy Marples <roy@marples.name>2020-04-19 05:33:53 +0100
commit9823ded7ab5c3ba2650274738763521e3e277666 (patch)
tree85e4594d7f4b4f3a0d68f278d72a495a898849ee /src/if-bsd.c
parentaab713261e1ca792b4bf9228317c77ccc300f392 (diff)
downloaddhcpcd-9823ded7ab5c3ba2650274738763521e3e277666.tar.xz
BSD: Dont warn if the kernel does not support flushing routers
As the implemention might be removed one day.
Diffstat (limited to 'src/if-bsd.c')
-rw-r--r--src/if-bsd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/if-bsd.c b/src/if-bsd.c
index ee84f3ee..7361669a 100644
--- a/src/if-bsd.c
+++ b/src/if-bsd.c
@@ -1946,7 +1946,7 @@ if_setup_inet6(const struct interface *ifp)
logerr("%s: set_ifxflags", ifp->name);
#endif
-#if defined(IPV6CTL_ACCEPT_RTADV) || defined(ND6_IFF_ACCEPT_RTADV)
+#ifdef SIOCSRTRFLUSH_IN6
/* Flush the kernel knowledge of advertised routers
* and prefixes so the kernel does not expire prefixes
* and default routes we are trying to own. */
@@ -1957,12 +1957,14 @@ if_setup_inet6(const struct interface *ifp)
strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name));
if (if_ioctl6(ifp->ctx, SIOCSRTRFLUSH_IN6,
&ifr, sizeof(ifr)) == -1 &&
- errno != ENOTSUP)
- logwarn("SIOCSRTRFLUSH_IN6");
+ errno != ENOTSUP && errno != ENOTTY)
+ logwarn("SIOCSRTRFLUSH_IN6 %d", errno);
+#ifdef SIOCSPFXFLUSH_IN6
if (if_ioctl6(ifp->ctx, SIOCSPFXFLUSH_IN6,
&ifr, sizeof(ifr)) == -1 &&
- errno != ENOTSUP)
+ errno != ENOTSUP && errno != ENOTTY)
logwarn("SIOCSPFXFLUSH_IN6");
+#endif
}
#endif
}