{
struct ipv6_addr *ap2;
+#ifdef SMALL
+ valid = true;
+#else
valid = (ap->delegating_prefix == NULL);
+#endif
TAILQ_FOREACH(ap2, &state->addrs, next) {
if (ap2->flags & IPV6_AF_ADDED &&
!(ap2->flags & IPV6_AF_DADCOMPLETED))
logdebugx("%s: DHCPv6 DAD completed",
ifp->name);
script_runreason(ifp,
- ap->delegating_prefix ?
- "DELEGATED6" : state->reason);
+#ifndef SMALL
+ ap->delegating_prefix ? "DELEGATED6" :
+#endif
+ state->reason);
if (valid)
dhcpcd_daemonise(ifp->ctx);
}
else
continue;
+#ifndef SMALL
/* If we delegated from this prefix, deprecate or remove
* the delegations. */
if (ia->flags & IPV6_AF_DELEGATEDPFX) {
if (touched)
ipv6_addaddrs(&ia->pd_pfxs);
}
+#endif
if (ia->flags & IPV6_AF_REQUEST) {
ia->prefix_vltime = ia->prefix_pltime = 0;
ipv6_iffindaddr(ap->iface, &ap->addr,
IN6_IFF_TENTATIVE))
ap->flags |= IPV6_AF_DADCOMPLETED;
- if ((ap->flags & IPV6_AF_DADCOMPLETED) == 0 &&
- ((delegated && ap->delegating_prefix) ||
- (!delegated && !ap->delegating_prefix)))
+ if ((ap->flags & IPV6_AF_DADCOMPLETED) == 0
+#ifndef SMALL
+ && ((delegated && ap->delegating_prefix) ||
+ (!delegated && !ap->delegating_prefix))
+#endif
+ )
{
completed = 0;
break;
char *pfx;
uint32_t en;
const struct dhcpcd_ctx *ctx;
+#ifndef SMALL
const struct dhcp6_state *state;
const struct ipv6_addr *ap;
char *v, *val;
+#endif
n = 0;
if (m == NULL)
free(pfx);
delegated:
+#ifndef SMALL
/* Needed for Delegated Prefixes */
state = D6_CSTATE(ifp);
i = 0;
}
if (i)
n++;
+#endif
return (ssize_t)n;
}
ipv6_deletedaddr(struct ipv6_addr *ia)
{
+#ifdef SMALL
+ UNUSED(ia);
+#else
/* NOREJECT is set if we delegated exactly the prefix to another
* address.
* This can only be one address, so just clear the flag.
* This should ensure the reject route will be restored. */
if (ia->delegating_prefix != NULL)
ia->delegating_prefix->flags &= ~IPV6_AF_NOREJECT;
+#endif
}
static void
ap->flags &= ~IPV6_AF_NEW;
ap->flags |= IPV6_AF_ADDED;
+#ifndef SMALL
if (ap->delegating_prefix != NULL)
ap->flags |= IPV6_AF_DELEGATED;
+#endif
#ifdef IPV6_POLLADDRFLAG
eloop_timeout_delete(ap->iface->ctx->eloop,
void
ipv6_freeaddr(struct ipv6_addr *ap)
{
+#ifndef SMALL
struct ipv6_addr *ia;
/* Forget the reference */
} else if (ap->delegating_prefix != NULL) {
TAILQ_REMOVE(&ap->delegating_prefix->pd_pfxs, ap, pd_next);
}
+#endif
eloop_q_timeout_delete(ap->iface->ctx->eloop, 0, NULL, ap);
free(ap);
struct ipv6_addr *ap, *apn, *apf;
struct timespec now;
+#ifdef SMALL
+ UNUSED(ifd);
+#endif
timespecclear(&now);
TAILQ_FOREACH_SAFE(ap, addrs, next, apn) {
+#ifndef SMALL
if (ifd != NULL &&
(ap->delegating_prefix == NULL ||
ap->delegating_prefix->iface != ifd))
continue;
+#endif
if (drop != 2)
TAILQ_REMOVE(addrs, ap, next);
if (drop && ap->flags & IPV6_AF_ADDED &&
uint8_t iaid[4];
uint16_t ia_type;
+#ifndef SMALL
struct ipv6_addr *delegating_prefix;
struct ipv6_addrhead pd_pfxs;
TAILQ_ENTRY(ipv6_addr) pd_next;
uint8_t prefix_exclude_len;
struct in6_addr prefix_exclude;
+#endif
void (*dadcallback)(void *);
int dadcounter;