Update to dhcpcd-8.1.5 with the following changes:

* inet: Allow forcing a host route from an interface without a lease
 * dhcpcd: Don't wait for an address family to complete if not using it
This commit is contained in:
roy 2020-01-03 12:38:14 +00:00
parent f31da2ae25
commit d4128c3af8
5 changed files with 21 additions and 17 deletions

View File

@ -29,7 +29,7 @@
#define CONFIG_H #define CONFIG_H
#define PACKAGE "dhcpcd" #define PACKAGE "dhcpcd"
#define VERSION "8.1.4" #define VERSION "8.1.5"
#ifndef CONFIG #ifndef CONFIG
# define CONFIG SYSCONFDIR "/" PACKAGE ".conf" # define CONFIG SYSCONFDIR "/" PACKAGE ".conf"

View File

@ -467,25 +467,11 @@ configure_interface1(struct interface *ifp)
if (!(ifo->options & (DHCPCD_INFORM | DHCPCD_WANTDHCP))) if (!(ifo->options & (DHCPCD_INFORM | DHCPCD_WANTDHCP)))
ifo->options |= DHCPCD_STATIC; ifo->options |= DHCPCD_STATIC;
} }
if (!(ifo->options & DHCPCD_ARP) ||
ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC))
ifo->options &= ~DHCPCD_IPV4LL;
if (ifo->metric != -1) if (ifo->metric != -1)
ifp->metric = (unsigned int)ifo->metric; ifp->metric = (unsigned int)ifo->metric;
if (!(ifo->options & DHCPCD_IPV4))
ifo->options &= ~(DHCPCD_DHCP | DHCPCD_IPV4LL | DHCPCD_WAITIP4);
#ifdef INET6 #ifdef INET6
if (!(ifo->options & DHCPCD_IPV6))
ifo->options &=
~(DHCPCD_IPV6RS | DHCPCD_DHCP6 | DHCPCD_WAITIP6);
if (!(ifo->options & DHCPCD_IPV6RS))
ifo->options &=
~(DHCPCD_IPV6RA_AUTOCONF | DHCPCD_IPV6RA_REQRDNSS);
/* We want to setup INET6 on the interface as soon as possible. */ /* We want to setup INET6 on the interface as soon as possible. */
if (ifp->active == IF_ACTIVE_USER && if (ifp->active == IF_ACTIVE_USER &&
ifo->options & DHCPCD_IPV6 && ifo->options & DHCPCD_IPV6 &&

View File

@ -2231,6 +2231,21 @@ finish_config(struct if_options *ifo)
* guard should suffice */ * guard should suffice */
ifo->options |= DHCPCD_VENDORRAW; ifo->options |= DHCPCD_VENDORRAW;
} }
if (!(ifo->options & DHCPCD_ARP) ||
ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC))
ifo->options &= ~DHCPCD_IPV4LL;
if (!(ifo->options & DHCPCD_IPV4))
ifo->options &= ~(DHCPCD_DHCP | DHCPCD_IPV4LL | DHCPCD_WAITIP4);
if (!(ifo->options & DHCPCD_IPV6))
ifo->options &=
~(DHCPCD_IPV6RS | DHCPCD_DHCP6 | DHCPCD_WAITIP6);
if (!(ifo->options & DHCPCD_IPV6RS))
ifo->options &=
~(DHCPCD_IPV6RA_AUTOCONF | DHCPCD_IPV6RA_REQRDNSS);
} }
/* Handy routine to read very long lines in text files. /* Handy routine to read very long lines in text files.

View File

@ -429,7 +429,10 @@ inet_routerhostroute(rb_tree_t *routes, struct interface *ifp)
in.s_addr = INADDR_ANY; in.s_addr = INADDR_ANY;
sa_in_init(&rth->rt_gateway, &in); sa_in_init(&rth->rt_gateway, &in);
rth->rt_mtu = dhcp_get_mtu(ifp); rth->rt_mtu = dhcp_get_mtu(ifp);
sa_in_init(&rth->rt_ifa, &state->addr->addr); if (state->addr != NULL)
sa_in_init(&rth->rt_ifa, &state->addr->addr);
else
rth->rt_ifa.sa_family = AF_UNSPEC;
/* We need to insert the host route just before the router. */ /* We need to insert the host route just before the router. */
while ((rtp = RB_TREE_MAX(routes)) != NULL) { while ((rtp = RB_TREE_MAX(routes)) != NULL) {

View File

@ -622,7 +622,7 @@ ipv6nd_applyra(struct dhcpcd_ctx *ctx, struct interface *ifp)
return; return;
state->retrans = rap->retrans; state->retrans = rap->retrans;
if (if_applyra(rap) == -1) if (if_applyra(rap) == -1 && errno != ENOENT)
logerr(__func__); logerr(__func__);
} }