len++;
if (D_STATE_RUNNING(ifp))
len++;
+#ifdef IPV4LL
if (IPV4LL_STATE_RUNNING(ifp))
len++;
+#endif
if (IPV6_STATE_RUNNING(ifp))
len++;
if (RS_STATE_RUNNING(ifp))
{
const struct dhcp_state *dstate;
+#ifdef IPV4LL
if (IPV4LL_STATE_RUNNING(ifp))
return 1;
+#endif
dstate = D_CSTATE(ifp);
return (dstate &&
inet_getroutes(struct dhcpcd_ctx *ctx, struct rt_head *routes)
{
struct interface *ifp;
+#ifdef IPV4LL
struct rt def;
bool have_default;
+#endif
TAILQ_FOREACH(ifp, ctx->ifaces, next) {
if (!ifp->active)
continue;
if (inet_dhcproutes(routes, ifp) == -1)
return false;
+#ifdef IPV4LL
if (ipv4ll_subnetroute(routes, ifp) == -1)
return false;
+#endif
if (inet_routerhostroute(routes, ifp) == -1)
return false;
}
+#ifdef IPV4LL
/* If there is no default route, see if we can use an IPv4LL one. */
memset(&def, 0, sizeof(def));
def.rt_dest.sa_family = AF_INET;
break;
}
}
+#endif
return true;
}
void ipv4ll_reset(struct interface *);
void ipv4ll_drop(struct interface *);
void ipv4ll_free(struct interface *);
-#else
-#define IPV4LL_STATE_RUNNING(ifp) (0)
-#define ipv4ll_subnetroute(route, ifp) (0)
-#define ipv4ll_defaultroute(route, ifp) (0)
-#define ipv4ll_handlert(a, b, c) (0)
-#define ipv4ll_free(a) {}
#endif
#endif