logger(ifp->ctx, LOG_ERR, "ipv6_init: %m");
ifo->options &= ~DHCPCD_IPV6RS;
}
-
- /* Add our link-local address before upping the interface
- * so our RFC7217 address beats the hwaddr based one.
- * This needs to happen before PREINIT incase a hook script
- * inadvertently ups the interface. */
- if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) {
- logger(ifp->ctx, LOG_ERR, "%s: ipv6_start: %m", ifp->name);
- ifo->options &= ~DHCPCD_IPV6;
- }
}
static void
ifp->name, ifn->name);
}
-static void
-pre_start(struct interface *ifp)
-{
-
- /* Add our link-local address before upping the interface
- * so our RFC7217 address beats the hwaddr based one.
- * This is also a safety check incase it was ripped out
- * from under us. */
- if (ifp->options->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) {
- logger(ifp->ctx, LOG_ERR, "%s: ipv6_start: %m", ifp->name);
- ifp->options->options &= ~DHCPCD_IPV6;
- }
-}
-
void
dhcpcd_startinterface(void *arg)
{
}
}
+ if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) {
+ logger(ifp->ctx, LOG_ERR, "%s: ipv6_start: %m", ifp->name);
+ ifo->options &= ~DHCPCD_IPV6;
+ }
if (ifo->options & DHCPCD_IPV6) {
ipv6_startstatic(ifp);
{
struct interface *ifp = arg;
- pre_start(ifp);
if ((!(ifp->ctx->options & DHCPCD_MASTER) ||
ifp->options->options & DHCPCD_IF_UP) &&
if_up(ifp) == -1)
run_preinit(struct interface *ifp)
{
- pre_start(ifp);
if (ifp->ctx->options & DHCPCD_TEST)
return;
#else
#define CAN_DROP_LLADDR(ifp) (1)
#endif
-#elif defined(__NetBSD__)
-/* Earlier versions of NetBSD don't add duplicate LLADDR's if the interface
- * is brought up and one already exists. */
-#define CAN_ADD_LLADDR(ifp) (1)
-#define CAN_DROP_LLADDR(ifp) (1)
#else
/* We have no control over the OS adding the LLADDR, so just let it do it
* as we cannot force our own view on it. */
/* Load existing routes */
if_initrt6(ifp->ctx);
- if (!IN6_IS_ADDR_UNSPECIFIED(&ifp->options->req_addr6))
- ipv6_buildroutes(ifp->ctx);
return 0;
}