size is a concern, you can use the `--small` configure option to enable
a reduced feature set within dhcpcd.
Currently this just removes non important options out of
-`dhcpcd-definitions.conf`, the logfile option and
-support for DHCPv6 Prefix Delegation.
+`dhcpcd-definitions.conf`, the logfile option,
+DHCPv6 Prefix Delegation and IPv6 address announcement *(to prefer an
+address on another interface)*.
Other features maybe dropped as and when required.
dhcpcd can also be made smaller by removing the IPv4 or IPv6 stack:
* `--disable-inet`
if (valid)
dhcpcd_daemonise(ifp->ctx);
}
+#ifdef ND6_ADVERTISE
ipv6nd_advertise(ia);
+#endif
}
}
}
void
dhcp6_abort(struct interface *ifp)
{
+#ifdef ND6_ADVERTISE
struct dhcp6_state *state;
struct ipv6_addr *ia;
+#endif
eloop_timeout_delete(ifp->ctx->eloop, dhcp6_start1, ifp);
+#ifdef ND6_ADVERTISE
state = D6_STATE(ifp);
if (state == NULL)
return;
TAILQ_FOREACH(ia, &state->addrs, next) {
ipv6nd_advertise(ia);
}
+#endif
}
void
}
}
+#ifdef ND6_ADVERTISE
/* Advertise the address if it exists on another interface. */
ipv6nd_advertise(ia);
+#endif
}
static int
{
struct interface *ifp;
uint32_t pltime, vltime;
- bool vltime_was_zero;
__printflike(1, 2) void (*logfunc)(const char *, ...);
+#ifndef SMALL
+ bool vltime_was_zero;
+#endif
#ifdef __sun
struct ipv6_state *state;
struct ipv6_addr *ia2;
" seconds",
ifp->name, ia->prefix_pltime, ia->prefix_vltime);
+#ifndef SMALL
vltime_was_zero = ia->prefix_vltime == 0;
+#endif
if (if_address6(RTM_NEWADDR, ia) == -1) {
logerr(__func__);
/* Restore real pltime and vltime */
}
#endif
+#ifdef ND6_ADVERTISE
/* Re-advertise the preferred address to be safe. */
if (!vltime_was_zero)
ipv6nd_advertise(ia);
+#endif
return 0;
}
case RTM_DELADDR:
if (ia != NULL) {
TAILQ_REMOVE(&state->addrs, ia, next);
+#ifdef ND6_ADVERTISE
/* Advertise the address if it exists on
* another interface. */
ipv6nd_advertise(ia);
+#endif
/* We'll free it at the end of the function. */
}
break;
# define IN6_IFF_DETACHED 0
#endif
+#ifndef SMALL
+# define ND6_ADVERTISE
+#endif
+
#ifdef INET6
TAILQ_HEAD(ipv6_addrhead, ipv6_addr);
struct ipv6_addr {
}
}
+#ifdef ND6_ADVERTISE
static void
ipv6nd_sendadvertisement(void *arg)
{
eloop_timeout_delete(ctx->eloop, ipv6nd_sendadvertisement, iaf);
ipv6nd_sendadvertisement(iaf);
}
+#endif /* ND6_ADVERTISE */
static void
ipv6nd_expire(void *arg)
return;
}
}
+#ifdef ND6_ADVERTISE
ipv6nd_advertise(ia);
+#endif
}
}