summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-11-04 17:21:33 +0000
committerRoy Marples <roy@marples.name>2019-11-04 17:21:33 +0000
commit8c94248fe45c03f0e03f418f5d4bf2dea68cb41f (patch)
treefb0b948734fc01d32426ed4475d3e53278bfc10c /src/dhcpcd.c
parent8830ff90cdef42d8c7e76295c51652e1ddca4e25 (diff)
downloaddhcpcd-8c94248fe45c03f0e03f418f5d4bf2dea68cb41f.tar.xz
BSD: Disable kernel RTADV sysctl earlier
Just makes life a bit easier.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 2b04bb3e..474b6abe 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -1995,6 +1995,12 @@ printpidfile:
ctx.options & DHCPCD_IPV4 ? " [ip4]" : "",
ctx.options & DHCPCD_IPV6 ? " [ip6]" : "");
+#ifdef BSD
+ /* Disable the kernel RTADV sysctl as early as possible. */
+ if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS)
+ if_disable_rtadv();
+#endif
+
if (if_opensockets(&ctx) == -1) {
logerr("%s: if_opensockets", __func__);
goto exit_failure;