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 Import dhcpcd-7.0.0-beta2 with th...



details:   https://anonhg.NetBSD.org/src/rev/c69fe53babc4
branches:  ROY
changeset: 455199:c69fe53babc4
user:      roy <roy%NetBSD.org@localhost>
date:      Sun Apr 02 18:54:20 2017 +0000

description:
Import dhcpcd-7.0.0-beta2 with the following changes:
  *  Builds without AUTH now compile.
  *  Builds without IPv4LL now compile.
     Thanks to Joerg Sonnenberger.
  *  BPF no longer uses a variable length buffer for stack protector.
  *  Minor documentation fix for duid file location.
     Thanks to Peter Colberg.

diffstat:

 external/bsd/dhcpcd/dist/src/bpf.c            |   2 +-
 external/bsd/dhcpcd/dist/src/defs.h           |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp.c           |  10 ++++++----
 external/bsd/dhcpcd/dist/src/dhcp6.c          |  13 +++++++++----
 external/bsd/dhcpcd/dist/src/dhcpcd.8.in      |   4 ++--
 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in |   4 ++--
 external/bsd/dhcpcd/dist/src/ipv4ll.h         |   8 ++++----
 7 files changed, 25 insertions(+), 18 deletions(-)

diffs (192 lines):

diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/bpf.c
--- a/external/bsd/dhcpcd/dist/src/bpf.c        Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/bpf.c        Sun Apr 02 18:54:20 2017 +0000
@@ -424,7 +424,7 @@
 int
 bpf_arp(struct interface *ifp, int fd)
 {
-       size_t bpf_hw = ((((size_t)ifp->hwlen / 4) + 2) * 2) + 1;
+       size_t bpf_hw = (((sizeof(ifp->hwaddr) / 4) + 2) * 2) + 1;
        struct bpf_insn bpf[3 + bpf_arp_filter_len + bpf_hw + bpf_arp_extra];
        struct bpf_insn *bp;
        struct iarp_state *state;
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Sun Apr 02 18:54:20 2017 +0000
@@ -28,7 +28,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "7.0.0-beta1"
+#define VERSION                        "7.0.0-beta2"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/dhcp.c
--- a/external/bsd/dhcpcd/dist/src/dhcp.c       Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp.c       Sun Apr 02 18:54:20 2017 +0000
@@ -2741,8 +2741,8 @@
        unsigned int i;
        char *msg;
        bool bootp_copied;
+#ifdef AUTH
        const uint8_t *auth;
-#ifdef AUTH
        size_t auth_len;
 #endif
 #ifdef IN_IFF_DUPLICATED
@@ -2812,8 +2812,6 @@
                }
                LOGDHCP0(LOG_WARNING, "no authentication");
        }
-#else
-       auth = NULL;
 #endif
 
        /* RFC 3203 */
@@ -2824,8 +2822,9 @@
                        LOGDHCP(LOG_ERR, "discarding Force Renew");
                        return;
                }
+#ifdef AUTH
                if (auth == NULL) {
-                       LOGDHCP(LOG_ERR, "unauthenticated Force Renew");
+                       LOGDHCP(LOG_ERR, "unauthenticated force renew");
                        if (ifo->auth.options & DHCPCD_AUTH_REQUIRE)
                                return;
                }
@@ -2843,6 +2842,9 @@
                            send_inform, ifp);
                        dhcp_inform(ifp);
                }
+#else
+               LOGDHCP(LOG_ERR, "unauthenticated force renew");
+#endif
                return;
        }
 
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/dhcp6.c
--- a/external/bsd/dhcpcd/dist/src/dhcp6.c      Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp6.c      Sun Apr 02 18:54:20 2017 +0000
@@ -635,9 +635,11 @@
                if (ifo->mudurl[0])
                        len += sizeof(o) + ifo->mudurl[0];
 
+#ifdef AUTH
                if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
                    DHCPCD_AUTH_SENDREQUIRE)
                        len += sizeof(o); /* Reconfigure Accept */
+#endif
        }
 
        len += sizeof(*state->send);
@@ -906,11 +908,12 @@
                if (ifo->mudurl[0])
                        COPYIN(D6_OPTION_MUDURL,
                            ifo->mudurl + 1, ifo->mudurl[0]);
-               
-
+
+#ifdef AUTH
                if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
                    DHCPCD_AUTH_SENDREQUIRE)
                        COPYIN1(D6_OPTION_RECONF_ACCEPT, 0);
+#endif
 
                if (n_options) {
                        o_lenp = NEXTLEN;
@@ -2885,8 +2888,6 @@
                syslog(LOG_WARNING, "%s: no authentication from %s",
                    ifp->name, ctx->sfrom);
        }
-#else
-       auth = NULL;
 #endif
 
        op = dhcp6_get_op(r->type);
@@ -2996,11 +2997,14 @@
                        return;
                break;
        case DHCP6_RECONFIGURE:
+#ifdef AUTH
                if (auth == NULL) {
+#endif
                        syslog(LOG_ERR, "%s: unauthenticated %s from %s",
                            ifp->name, op, ctx->sfrom);
                        if (ifo->auth.options & DHCPCD_AUTH_REQUIRE)
                                return;
+#ifdef AUTH
                }
                syslog(LOG_INFO, "%s: %s from %s",
                    ifp->name, op, ctx->sfrom);
@@ -3041,6 +3045,7 @@
                        break;
                }
                return;
+#endif
        default:
                syslog(LOG_ERR, "%s: invalid DHCP6 type %s (%d)",
                    ifp->name, op, r->type);
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/dhcpcd.8.in
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.8.in  Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.8.in  Sun Apr 02 18:54:20 2017 +0000
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 28, 2017
+.Dd April 2, 2017
 .Dt DHCPCD 8
 .Os
 .Sh NAME
@@ -259,7 +259,7 @@
 is not enabled by default.
 .Nm
 generates the DUID and stores it in
-.Pa @SYSCONFDIR@/dhcpcd.duid .
+.Pa @DBDIR@/dhcpcd.duid .
 This file should not be copied to other hosts.
 .It Fl d , Fl Fl debug
 Echo debug messages to the stderr and syslog.
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in     Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in     Sun Apr 02 18:54:20 2017 +0000
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 28, 2017
+.Dd April 2, 2017
 .Dt DHCPCD.CONF 5
 .Os
 .Sh NAME
@@ -191,7 +191,7 @@
 This, plus the IAID will be used as the
 .Ic clientid .
 The DUID-LLT generated will be held in
-.Pa @SYSCONFDIR@/dhcpcd.duid
+.Pa @DBDIR@/dhcpcd.duid
 and should not be copied to other hosts.
 .It Ic iaid Ar iaid
 Set the Interface Association Identifier to
diff -r 1e7ffc800350 -r c69fe53babc4 external/bsd/dhcpcd/dist/src/ipv4ll.h
--- a/external/bsd/dhcpcd/dist/src/ipv4ll.h     Fri Mar 31 20:51:15 2017 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv4ll.h     Sun Apr 02 18:54:20 2017 +0000
@@ -66,13 +66,13 @@
 int ipv4ll_recvrt(int, const struct rt *);
 #endif
 
-#define        ipv4ll_free(ifp) ipv4ll_freedrop((ifp), 0);
-#define        ipv4ll_drop(ifp) ipv4ll_freedrop((ifp), 1);
+#define        ipv4ll_free(ifp)                ipv4ll_freedrop((ifp), 0);
+#define        ipv4ll_drop(ifp)                ipv4ll_freedrop((ifp), 1);
 void ipv4ll_freedrop(struct interface *, int);
 #else
 #define        IPV4LL_STATE_RUNNING(ifp)       (0)
-#define        ipv4ll_subnet_route(ifp)        (NULL)
-#define        ipv4ll_default_route(ifp)       (NULL)
+#define        ipv4ll_subnetroute(route, ifp)  (0)
+#define        ipv4ll_defaultroute(route, ifp) (0)
 #define        ipv4ll_handlert(a, b, c)        (0)
 #define        ipv4ll_free(a)                  {}
 #define        ipv4ll_drop(a)                  {}



Home | Main Index | Thread Index | Old Index