From: Roy Marples Date: Wed, 7 May 2008 09:07:28 +0000 (+0000) Subject: Don't explicity create an IPV4LL route if we have a routeable address - the host... X-Git-Tag: v4.0.2~434 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=833f739efa6231c604afe254f6bd32740e779350;p=thirdparty%2Fdhcpcd.git Don't explicity create an IPV4LL route if we have a routeable address - the host system should make this choice. --- diff --git a/config.h b/config.h index d978a5d6..a2a9b077 100644 --- a/config.h +++ b/config.h @@ -36,6 +36,15 @@ * 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. diff --git a/configure.c b/configure.c index fd0bd941..5c1e50a2 100644 --- a/configure.c +++ b/configure.c @@ -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; }