Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/dhcpcd/dist/src Upate to dhcpcd-9.3.4 with the ...



details:   https://anonhg.NetBSD.org/src/rev/8a02c491bf37
branches:  trunk
changeset: 978649:8a02c491bf37
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Nov 28 14:26:16 2020 +0000

description:
Upate to dhcpcd-9.3.4 with the following changes:

With the following changes:
 * DHCP: If error adding the address in oneshot, exit with failure
 * DHCP: Only listen to the address if we successfully added it
 * DHCP6: Fix segfault introduced in dhcpcd-9.3.3
 * DHCP6: Abort in test mode when an error is returned by server
 * options: allow --ia_na=1 and --ia_pd=2 on the command line
 * options: Allow duid to take a value

diffstat:

 external/bsd/dhcpcd/dist/src/defs.h           |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in |  14 +++++++++++---
 external/bsd/dhcpcd/dist/src/ipv4.c           |  15 ++++++++-------
 external/bsd/dhcpcd/dist/src/ipv4.h           |   2 +-
 external/bsd/dhcpcd/dist/src/route.c          |   5 ++++-
 5 files changed, 25 insertions(+), 13 deletions(-)

diffs (147 lines):

diff -r f307fb5325c6 -r 8a02c491bf37 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Sat Nov 28 14:08:37 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Sat Nov 28 14:26:16 2020 +0000
@@ -29,7 +29,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "9.3.3"
+#define VERSION                        "9.3.4"
 
 #ifndef PRIVSEP_USER
 # define PRIVSEP_USER          "_" PACKAGE
diff -r f307fb5325c6 -r 8a02c491bf37 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in     Sat Nov 28 14:08:37 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in     Sat Nov 28 14:26:16 2020 +0000
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 25, 2020
+.Dd November 25, 2020
 .Dt DHCPCD.CONF 5
 .Os
 .Sh NAME
@@ -211,7 +211,7 @@
 sends a default
 .Ar clientid
 of the hardware family and the hardware address.
-.It Ic duid Op ll | lt | uuid
+.It Ic duid Op ll | lt | uuid | value
 Use a DHCP Unique Identifier.
 If a system UUID is available, that will be used to create a DUID-UUID,
 otheriwse if persistent storage is available then a DUID-LLT
@@ -220,12 +220,20 @@
 The DUID type can be hinted as an optional parameter if the file
 .Pa @DBDIR@/duid
 does not exist.
+If not
+.Va ll ,
+.Va lt
+or
+.Va uuid
+then
+.Va value
+will be converted from 00:11:22:33 format.
 This, plus the IAID will be used as the
 .Ic clientid .
 The DUID generated will be held in
 .Pa @DBDIR@/duid
 and should not be copied to other hosts.
-This file also takes precedence over the above rules.
+This file also takes precedence over the above rules except for setting a value.
 .It Ic iaid Ar iaid
 Set the Interface Association Identifier to
 .Ar iaid .
diff -r f307fb5325c6 -r 8a02c491bf37 external/bsd/dhcpcd/dist/src/ipv4.c
--- a/external/bsd/dhcpcd/dist/src/ipv4.c       Sat Nov 28 14:08:37 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv4.c       Sat Nov 28 14:26:16 2020 +0000
@@ -728,7 +728,7 @@
        return 0;
 }
 
-void
+struct ipv4_addr *
 ipv4_applyaddr(void *arg)
 {
        struct interface *ifp = arg;
@@ -738,7 +738,7 @@
        struct ipv4_addr *ia;
 
        if (state == NULL)
-               return;
+               return NULL;
 
        lease = &state->lease;
        if (state->new == NULL) {
@@ -757,7 +757,7 @@
                        script_runreason(ifp, state->reason);
                } else
                        rt_build(ifp->ctx, AF_INET);
-               return;
+               return NULL;
        }
 
        ia = ipv4_iffindaddr(ifp, &lease->addr, NULL);
@@ -783,22 +783,22 @@
 #endif
 #ifndef IP_LIFETIME
                if (ipv4_daddaddr(ifp, lease) == -1 && errno != EEXIST)
-                       return;
+                       return NULL;
 #endif
        }
 #ifdef IP_LIFETIME
        if (ipv4_daddaddr(ifp, lease) == -1 && errno != EEXIST)
-               return;
+               return NULL;
 #endif
 
        ia = ipv4_iffindaddr(ifp, &lease->addr, NULL);
        if (ia == NULL) {
                logerrx("%s: added address vanished", ifp->name);
-               return;
+               return NULL;
        }
 #if defined(ARP) && defined(IN_IFF_NOTUSEABLE)
        if (ia->addr_flags & IN_IFF_NOTUSEABLE)
-               return;
+               return NULL;
 #endif
 
        /* Delete the old address if different */
@@ -820,6 +820,7 @@
                script_runreason(ifp, state->reason);
                dhcpcd_daemonise(ifp->ctx);
        }
+       return ia;
 }
 
 void
diff -r f307fb5325c6 -r 8a02c491bf37 external/bsd/dhcpcd/dist/src/ipv4.h
--- a/external/bsd/dhcpcd/dist/src/ipv4.h       Sat Nov 28 14:08:37 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv4.h       Sat Nov 28 14:26:16 2020 +0000
@@ -135,7 +135,7 @@
 struct ipv4_addr *ipv4_addaddr(struct interface *,
     const struct in_addr *, const struct in_addr *, const struct in_addr *,
     uint32_t, uint32_t);
-void ipv4_applyaddr(void *);
+struct ipv4_addr *ipv4_applyaddr(void *);
 
 struct ipv4_addr *ipv4_iffindaddr(struct interface *,
     const struct in_addr *, const struct in_addr *);
diff -r f307fb5325c6 -r 8a02c491bf37 external/bsd/dhcpcd/dist/src/route.c
--- a/external/bsd/dhcpcd/dist/src/route.c      Sat Nov 28 14:08:37 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/route.c      Sat Nov 28 14:26:16 2020 +0000
@@ -713,7 +713,10 @@
 #endif
 
        RB_TREE_FOREACH_SAFE(rt, &routes, rtn) {
-               if (!(rt->rt_ifp->options->options & DHCPCD_CONFIGURE))
+               if (rt->rt_ifp->active) {
+                       if (!(rt->rt_ifp->options->options & DHCPCD_CONFIGURE))
+                               continue;
+               } else if (!(ctx->options & DHCPCD_CONFIGURE))
                        continue;
 #ifdef BSD
                if (rt_is_default(rt) &&



Home | Main Index | Thread Index | Old Index