From: Roy Marples Date: Thu, 29 May 2008 08:26:57 +0000 (+0000) Subject: DISABLE_FEATURE defines now don't enable automatic ENABLE_FEATURE defines. X-Git-Tag: v4.0.2~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26b48f9559fc47a3c98372c9ccf3a2789e67ab5c;p=thirdparty%2Fdhcpcd.git DISABLE_FEATURE defines now don't enable automatic ENABLE_FEATURE defines. --- diff --git a/client.c b/client.c index 502fc1e1..f3791e84 100644 --- a/client.c +++ b/client.c @@ -938,8 +938,10 @@ handle_timeout(struct if_state *state, const struct options *options) state->timeout = options->timeout; iface->start_uptime = uptime (); if (lease->addr.s_addr == 0) { +#ifdef ENABLE_IPV4LL if (IN_LINKLOCAL(ntohl(iface->addr.s_addr))) state->timeout = DEFEND_INTERVAL; +#endif logger(LOG_INFO, "broadcasting for a lease"); send_message (state, DHCP_DISCOVER, options); } else if (state->options & DHCPCD_INFORM) { diff --git a/config.h b/config.h index 4415b89c..0198d55a 100644 --- a/config.h +++ b/config.h @@ -33,11 +33,17 @@ /* You can enable/disable various chunks of optional code here. * You would only do this to try and shrink the end binary if dhcpcd * was running on a low memory device */ -#define ENABLE_ARP +#ifndef DISABLE_ARP +# define ENABLE_ARP +#endif /* IPV4LL, aka ZeroConf, aka APIPA, aka RFC 3927. * Needs ARP. */ -#define ENABLE_IPV4LL +#ifndef DISABLE_IPV4LL +# ifdef ENABLE_ARP +# define ENABLE_IPV4LL +# endif +#endif /* * By default we don't add a local link route if we got a routeable address. @@ -54,7 +60,9 @@ * You can always create your own DUID file that just contains the * hex string that represents the DUID. * See RFC 3315 for details on this. */ -#define ENABLE_DUID +#ifndef DISABLE_DUID +# define ENABLE_DUID +#endif /* Some systems do not have a working fork. */ /* #define THERE_IS_NO_FORK */