]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't explicity create an IPV4LL route if we have a routeable address - the host...
authorRoy Marples <roy@marples.name>
Wed, 7 May 2008 09:07:28 +0000 (09:07 +0000)
committerRoy Marples <roy@marples.name>
Wed, 7 May 2008 09:07:28 +0000 (09:07 +0000)
config.h
configure.c

index d978a5d6edcd983ed81be8205f211a9afc839c39..a2a9b0779c6e08269a54ce85dbe8a1451d33811e 100644 (file)
--- a/config.h
+++ b/config.h
  * Needs ARP. */
 #define ENABLE_IPV4LL
 
+/*
+ * By default we don't add a local link route if we got a routeable address.
+ * This is because dhcpcd can't really decide which interface should allow
+ * link local routing when we have more than one interface.
+ * Ideally the host network scripts should add the link local route for us.
+ * If not, you can define this to get dhcpcd to always add the link local route.
+ */
+// #define ENABLE_IPV4LL_ALWAYSROUTE 
+
 /* We will auto create a DUID_LLT file if it doesn't exist.
  * You can always create your own DUID file that just contains the
  * hex string that represents the DUID.
index fd0bd941f41afd68adebf9a0979c55f2503ccaa8..5c1e50a29f629ff0ac6edfdfebe94ca1228b0cfb 100644 (file)
@@ -204,15 +204,15 @@ configure_routes(struct interface *iface, const struct dhcp_message *dhcp,
 
        ort = get_option_routes(dhcp);
 
-#ifdef ENABLE_IPV4LL
+#ifdef ENABLE_IPV4LL_ALWAYSROUTE
        if (options->options & DHCPCD_IPV4LL &&
            IN_PRIVATE(ntohl(dhcp->yiaddr)))
        {
                for (rt = ort; rt; rt = rt->next) {
-                       /* Check if we have already got a link locale route dished
-                        * out by the DHCP server */
+                       /* Check if we have already got a link locale route
+                        * dished out by the DHCP server */
                        if (rt->dest.s_addr == htonl(LINKLOCAL_ADDR) &&
-                                       rt->net.s_addr == htonl(LINKLOCAL_MASK))
+                           rt->net.s_addr == htonl(LINKLOCAL_MASK))
                                break;
                        rtn = rt;
                }