Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/roy]: src/external/bsd/dhcpcd/dist/src Update to dhcpcd-8.1.5 with the f...



details:   https://anonhg.NetBSD.org/src/rev/151ab7d21e0f
branches:  roy
changeset: 466850:151ab7d21e0f
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Jan 03 12:38:14 2020 +0000

description:
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

diffstat:

 external/bsd/dhcpcd/dist/src/defs.h       |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.c     |  14 --------------
 external/bsd/dhcpcd/dist/src/if-options.c |  15 +++++++++++++++
 external/bsd/dhcpcd/dist/src/ipv4.c       |   5 ++++-
 external/bsd/dhcpcd/dist/src/ipv6nd.c     |   2 +-
 5 files changed, 21 insertions(+), 17 deletions(-)

diffs (93 lines):

diff -r 605982f0f16c -r 151ab7d21e0f external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Fri Jan 03 12:38:14 2020 +0000
@@ -29,7 +29,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "8.1.4"
+#define VERSION                        "8.1.5"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 605982f0f16c -r 151ab7d21e0f external/bsd/dhcpcd/dist/src/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.c     Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.c     Fri Jan 03 12:38:14 2020 +0000
@@ -467,25 +467,11 @@
                if (!(ifo->options & (DHCPCD_INFORM | DHCPCD_WANTDHCP)))
                        ifo->options |= DHCPCD_STATIC;
        }
-       if (!(ifo->options & DHCPCD_ARP) ||
-           ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC))
-               ifo->options &= ~DHCPCD_IPV4LL;
 
        if (ifo->metric != -1)
                ifp->metric = (unsigned int)ifo->metric;
 
-       if (!(ifo->options & DHCPCD_IPV4))
-               ifo->options &= ~(DHCPCD_DHCP | DHCPCD_IPV4LL | DHCPCD_WAITIP4);
-
 #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. */
        if (ifp->active == IF_ACTIVE_USER &&
            ifo->options & DHCPCD_IPV6 &&
diff -r 605982f0f16c -r 151ab7d21e0f external/bsd/dhcpcd/dist/src/if-options.c
--- a/external/bsd/dhcpcd/dist/src/if-options.c Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/if-options.c Fri Jan 03 12:38:14 2020 +0000
@@ -2231,6 +2231,21 @@
                 * guard should suffice */
                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.
diff -r 605982f0f16c -r 151ab7d21e0f external/bsd/dhcpcd/dist/src/ipv4.c
--- a/external/bsd/dhcpcd/dist/src/ipv4.c       Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv4.c       Fri Jan 03 12:38:14 2020 +0000
@@ -429,7 +429,10 @@
                in.s_addr = INADDR_ANY;
                sa_in_init(&rth->rt_gateway, &in);
                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. */
                while ((rtp = RB_TREE_MAX(routes)) != NULL) {
diff -r 605982f0f16c -r 151ab7d21e0f external/bsd/dhcpcd/dist/src/ipv6nd.c
--- a/external/bsd/dhcpcd/dist/src/ipv6nd.c     Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv6nd.c     Fri Jan 03 12:38:14 2020 +0000
@@ -622,7 +622,7 @@
                return;
 
        state->retrans = rap->retrans;
-       if (if_applyra(rap) == -1)
+       if (if_applyra(rap) == -1 && errno != ENOENT)
                logerr(__func__);
 }
 



Home | Main Index | Thread Index | Old Index