mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-12-04 15:34:33 +08:00
Don't explicity create an IPV4LL route if we have a routeable address - the host system should make this choice.
This commit is contained in:
parent
9b7874c7ae
commit
833f739efa
9
config.h
9
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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user