]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DISABLE_FEATURE defines now don't enable automatic ENABLE_FEATURE defines.
authorRoy Marples <roy@marples.name>
Thu, 29 May 2008 08:26:57 +0000 (08:26 +0000)
committerRoy Marples <roy@marples.name>
Thu, 29 May 2008 08:26:57 +0000 (08:26 +0000)
client.c
config.h

index 502fc1e1eb45da8e064907fb7867f1e167054c46..f3791e84f0022e78376398e2a03ca503c417fba0 100644 (file)
--- 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) {
index 4415b89c105e12b4dacea5532afd7dd7b3b592af..0198d55ae11effc95ccadc309b834b44e379d5e7 100644 (file)
--- a/config.h
+++ b/config.h
 /* 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 */