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 Sync



details:   https://anonhg.NetBSD.org/src/rev/c35d0bf056ab
branches:  trunk
changeset: 333695:c35d0bf056ab
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Nov 14 12:00:54 2014 +0000

description:
Sync

diffstat:

 external/bsd/dhcpcd/dist/arp.c        |  10 ++++++++--
 external/bsd/dhcpcd/dist/auth.c       |   3 +--
 external/bsd/dhcpcd/dist/auth.h       |   4 ++--
 external/bsd/dhcpcd/dist/common.c     |   6 +-----
 external/bsd/dhcpcd/dist/config.h     |   3 ++-
 external/bsd/dhcpcd/dist/defs.h       |   4 ++--
 external/bsd/dhcpcd/dist/dhcp.c       |  10 +++++++---
 external/bsd/dhcpcd/dist/dhcpcd.c     |   9 +++++----
 external/bsd/dhcpcd/dist/dhcpcd.h     |   4 ++--
 external/bsd/dhcpcd/dist/eloop.c      |   7 ++++---
 external/bsd/dhcpcd/dist/if-options.c |   3 +--
 external/bsd/dhcpcd/dist/ipv4.c       |   3 +--
 external/bsd/dhcpcd/dist/ipv4ll.c     |  28 ++++++++++++++++++++--------
 external/bsd/dhcpcd/dist/ipv4ll.h     |   3 ++-
 external/bsd/dhcpcd/dist/ipv6.h       |   4 ++--
 external/bsd/dhcpcd/dist/ipv6nd.h     |   5 ++---
 16 files changed, 62 insertions(+), 44 deletions(-)

diffs (truncated from 397 to 300 lines):

diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/arp.c
--- a/external/bsd/dhcpcd/dist/arp.c    Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/arp.c    Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: arp.c,v 1.6 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: arp.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -320,8 +320,10 @@
                eloop_timeout_delete(astate->iface->ctx->eloop, NULL, astate);
                state = D_STATE(astate->iface);
                TAILQ_REMOVE(&state->arp_states, astate, next);
-               if (state->arp_ipv4ll == astate)
+               if (state->arp_ipv4ll == astate) {
+                       ipv4ll_stop(astate->iface);
                        state->arp_ipv4ll = NULL;
+               }
                free(astate);
        }
 }
@@ -355,6 +357,10 @@
        }
 
        while ((astate = TAILQ_FIRST(&state->arp_states))) {
+#ifndef __clang_analyzer__
+               /* clang guard needed for a more compex variant on this bug:
+                * http://llvm.org/bugs/show_bug.cgi?id=18222 */
                arp_free(astate);
+#endif
        }
 }
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/auth.c
--- a/external/bsd/dhcpcd/dist/auth.c   Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/auth.c   Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: auth.c,v 1.6 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: auth.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -29,7 +29,6 @@
  */
 
 #include <sys/file.h>
-#include <sys/queue.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/auth.h
--- a/external/bsd/dhcpcd/dist/auth.h   Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/auth.h   Fri Nov 14 12:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auth.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: auth.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -30,7 +30,7 @@
 #ifndef AUTH_H
 #define AUTH_H
 
-#include <sys/queue.h>
+#include "config.h"
 
 #define DHCPCD_AUTH_SEND       (1 << 0)
 #define DHCPCD_AUTH_REQUIRE    (1 << 1)
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/common.c
--- a/external/bsd/dhcpcd/dist/common.c Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/common.c Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: common.c,v 1.6 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: common.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -33,10 +33,6 @@
 #  define _GNU_SOURCE
 #endif
 
-#ifndef __sun
-#  include <sys/cdefs.h>
-#endif
-
 #ifdef __APPLE__
 #  include <mach/mach_time.h>
 #  include <mach/kern_return.h>
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/config.h
--- a/external/bsd/dhcpcd/dist/config.h Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/config.h Fri Nov 14 12:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: config.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /* netbsd */
 #define SYSCONFDIR     "/etc"
@@ -7,6 +7,7 @@
 #define LIBEXECDIR     "/libexec"
 #define DBDIR          "/var/db"
 #define RUNDIR         "/var/run"
+#include               <sys/queue.h>
 #define HAVE_SPAWN_H
 #define HAVE_MD5_H
 #define SHA2_H         <sha2.h>
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/defs.h
--- a/external/bsd/dhcpcd/dist/defs.h   Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/defs.h   Fri Nov 14 12:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: defs.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -30,7 +30,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "6.6.1"
+#define VERSION                        "6.6.2"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/dhcp.c
--- a/external/bsd/dhcpcd/dist/dhcp.c   Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp.c   Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp.c,v 1.22 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: dhcp.c,v 1.23 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -2175,8 +2175,12 @@
                eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
                return;
        }
-       /* Don't reset DHCP state if we have an IPv4LL address and link is up */
-       if (state->state != DHS_IPV4LL_BOUND || ifp->carrier != LINK_UP) {
+       /* Don't reset DHCP state if we have an IPv4LL address and link is up,
+        * unless the interface is departing. */
+       if (state->state != DHS_IPV4LL_BOUND ||
+           ifp->carrier != LINK_UP ||
+           ifp->options->options & DHCPCD_DEPARTED)
+       {
                eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
                dhcp_auth_reset(&state->auth);
                dhcp_close(ifp);
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/dhcpcd.c Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd.c Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcpcd.c,v 1.16 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: dhcpcd.c,v 1.17 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -33,7 +33,6 @@
 #define _WITH_DPRINTF /* Stop FreeBSD bitching */
 
 #include <sys/file.h>
-#include <sys/queue.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -317,13 +316,15 @@
        ipv6nd_drop(ifp);
        dhcp_drop(ifp, "STOP");
        arp_close(ifp);
-       eloop_timeout_delete(ctx->eloop, NULL, ifp);
        if (ifp->options->options & DHCPCD_DEPARTED)
                script_runreason(ifp, "DEPARTED");
        else
                script_runreason(ifp, "STOPPED");
 
-       // Remove the interface from our list
+       /* Delete all timeouts for the interfaces */
+       eloop_q_timeout_delete(ctx->eloop, 0, NULL, ifp);
+
+       /* Remove the interface from our list */
        TAILQ_REMOVE(ifp->ctx->ifaces, ifp, next);
        if_free(ifp);
 
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/dhcpcd.h
--- a/external/bsd/dhcpcd/dist/dhcpcd.h Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd.h Fri Nov 14 12:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dhcpcd.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: dhcpcd.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -30,10 +30,10 @@
 #ifndef DHCPCD_H
 #define DHCPCD_H
 
-#include <sys/queue.h>
 #include <sys/socket.h>
 #include <net/if.h>
 
+#include "config.h"
 #include "defs.h"
 #include "control.h"
 #include "if-options.h"
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/eloop.c
--- a/external/bsd/dhcpcd/dist/eloop.c  Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/eloop.c  Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: eloop.c,v 1.6 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: eloop.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -31,7 +31,6 @@
 /* Needed for ppoll(2) */
 #define _GNU_SOURCE
 
-#include <sys/queue.h>
 #include <sys/time.h>
 
 #include <errno.h>
@@ -41,6 +40,7 @@
 #include <stdlib.h>
 #include <syslog.h>
 
+#include "config.h"
 #include "common.h"
 #include "dhcpcd.h"
 #include "eloop.h"
@@ -242,7 +242,8 @@
        struct eloop_timeout *t, *tt;
 
        TAILQ_FOREACH_SAFE(t, &ctx->timeouts, next, tt) {
-               if (t->queue == queue && t->arg == arg &&
+               if ((queue == 0 || t->queue == queue) &&
+                   t->arg == arg &&
                    (!callback || t->callback == callback))
                {
                        TAILQ_REMOVE(&ctx->timeouts, t, next);
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/if-options.c
--- a/external/bsd/dhcpcd/dist/if-options.c     Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/if-options.c     Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: if-options.c,v 1.17 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: if-options.c,v 1.18 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -32,7 +32,6 @@
 
 #include <sys/param.h>
 #include <sys/types.h>
-#include <sys/queue.h>
 
 #include <arpa/inet.h>
 
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/ipv4.c
--- a/external/bsd/dhcpcd/dist/ipv4.c   Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/ipv4.c   Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: ipv4.c,v 1.6 2014/11/07 20:51:02 roy Exp $");
+ __RCSID("$NetBSD: ipv4.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -28,7 +28,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
diff -r 81150e38e2ae -r c35d0bf056ab external/bsd/dhcpcd/dist/ipv4ll.c
--- a/external/bsd/dhcpcd/dist/ipv4ll.c Fri Nov 14 10:09:50 2014 +0000
+++ b/external/bsd/dhcpcd/dist/ipv4ll.c Fri Nov 14 12:00:54 2014 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: ipv4ll.c,v 1.6 2014/11/07 20:51:03 roy Exp $");
+ __RCSID("$NetBSD: ipv4ll.c,v 1.7 2014/11/14 12:00:54 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -90,7 +90,6 @@
                if (addr == astate->failed.s_addr)
                        continue;
 
-               state = D_CSTATE(astate->iface);
                /* Ensure we don't have the address on another interface */
                TAILQ_FOREACH(ifp, astate->iface->ctx->ifaces, next) {
                        state = D_CSTATE(ifp);
@@ -109,14 +108,19 @@
 ipv4ll_probed(struct arp_state *astate)
 {



Home | Main Index | Thread Index | Old Index