}
#endif
+#if defined(BSD) && defined(INET6)
+ /* Disable the kernel RTADV sysctl as early as possible. */
+ if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS)
+ if_disable_rtadv();
+#endif
+
if (isatty(STDOUT_FILENO) &&
freopen(_PATH_DEVNULL, "r", stdout) == NULL)
logerr("%s: freopen stdout", __func__);
}
}
-#if defined(BSD) && defined(INET6)
- /* Disable the kernel RTADV sysctl as early as possible. */
- if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS)
- if_disable_rtadv();
-#endif
-
/* If we're not running in privsep, we need to create the DB
* directory here. */
if (!(ctx.options & DHCPCD_PRIVSEP)) {