Source-Changes-HG archive

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

[src/netbsd-8]: src/external/bsd/dhcpcd Catch up to current in external/bsd/d...



details:   https://anonhg.NetBSD.org/src/rev/cfff59107173
branches:  netbsd-8
changeset: 434859:cfff59107173
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 09 16:46:34 2018 +0000

description:
Catch up to current in external/bsd/dhcpcd/, requested by roy in ticket #707:

external/bsd/dhcpcd/dist/configure              up to 1.1.1.7
external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/15-timezone      up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/20-resolv.conf   up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/29-lookup-hostname up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/30-hostname      up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/50-ntp.conf      up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/50-yp.conf       up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/50-ypbind.in     up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in up to 1.1.1.4
external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in up to 1.1.1.4
external/bsd/dhcpcd/dist/src/arp.c              up to 1.1.1.6
external/bsd/dhcpcd/dist/src/common.h           up to 1.1.1.4
external/bsd/dhcpcd/dist/src/defs.h             up to 1.1.1.11
external/bsd/dhcpcd/dist/src/dhcp.c             up to 1.9
external/bsd/dhcpcd/dist/src/dhcp.h             up to 1.1.1.5
external/bsd/dhcpcd/dist/src/dhcp6.c            up to 1.1.1.10
external/bsd/dhcpcd/dist/src/dhcp6.h            up to 1.1.1.4
external/bsd/dhcpcd/dist/src/dhcpcd.8.in        up to 1.1.1.8
external/bsd/dhcpcd/dist/src/dhcpcd.c           up to 1.10
external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in   up to 1.1.1.7
external/bsd/dhcpcd/dist/src/dhcpcd.h           up to 1.1.1.5
external/bsd/dhcpcd/dist/src/if-bsd.c           up to 1.1.1.7
external/bsd/dhcpcd/dist/src/if-linux.c         up to 1.1.1.8
external/bsd/dhcpcd/dist/src/if-options.c       up to 1.8
external/bsd/dhcpcd/dist/src/if-options.h       up to 1.1.1.7
external/bsd/dhcpcd/dist/src/if-sun.c           up to 1.1.1.4
external/bsd/dhcpcd/dist/src/if.c               up to 1.1.1.8
external/bsd/dhcpcd/dist/src/if.h               up to 1.1.1.5
external/bsd/dhcpcd/dist/src/ipv4.c             up to 1.1.1.9
external/bsd/dhcpcd/dist/src/ipv4.h             up to 1.1.1.4
external/bsd/dhcpcd/dist/src/ipv6.c             up to 1.1.1.8
external/bsd/dhcpcd/dist/src/ipv6.h             up to 1.1.1.6
external/bsd/dhcpcd/dist/src/ipv6nd.c           up to 1.1.1.7
external/bsd/dhcpcd/dist/src/ipv6nd.h           up to 1.1.1.5
external/bsd/dhcpcd/dist/src/logerr.h           up to 1.1.1.3
external/bsd/dhcpcd/dist/src/route.c            up to 1.1.1.6
external/bsd/dhcpcd/dist/src/route.h            up to 1.1.1.4
external/bsd/dhcpcd/dist/src/dev/udev.c         up to 1.1.1.2
external/bsd/dhcpcd/dist/tests/eloop-bench/eloop-bench.c up to 1.1.1.3
external/bsd/dhcpcd/include/config.h            up to 1.3
external/bsd/dhcpcd/sbin/dhcpcd/Makefile        up to 1.43

Import dhcpcd-7.0.1 with the following changes:

  *  hooks: remove use of local builtin for better portability
  *  dhcpcd: don't log errors working out carrier for departed interfaces
  *  ipv4: allow configuration of static broadcast address
  *  if: don't set MTU during interface discovery
  *  if: don't activate non matching interfaces to commandline ones
  *  eloop-bench: fix hangs when using a large number of cycles
  *  dhcp: don't bind when we've just probed an address to inform

Import dhcpcd-7.0.2 with the following changes:

  *  Added support for setproctitle(3)
  *  Kernel RA is no longer disabled when IPv6 is disabled in dhcpcd
  *  DHCPv6 PD is no longer stopped if no Routers are found
  *  If the DHCP leased address is deleted, enter the reboot state
  *  DHCPv6 unicast is no longer performed when not in master mode
  *  dhcpcd will now detect netlink/route socket overflows ad re-sync

Import dhcpcd-7.0.3 with the following changes:

  *  dhcp6: fix a null termination overflow on status messages
  *  options: static routes can be setup in global context again
  *  routes: dhcpcd added host routes are now reported correctly

diffstat:

 external/bsd/dhcpcd/dist/configure                       |   83 +++-
 external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant         |    8 -
 external/bsd/dhcpcd/dist/hooks/15-timezone               |    3 +-
 external/bsd/dhcpcd/dist/hooks/20-resolv.conf            |    8 +-
 external/bsd/dhcpcd/dist/hooks/29-lookup-hostname        |    1 -
 external/bsd/dhcpcd/dist/hooks/30-hostname               |   30 +-
 external/bsd/dhcpcd/dist/hooks/50-ntp.conf               |    6 +-
 external/bsd/dhcpcd/dist/hooks/50-yp.conf                |    5 +-
 external/bsd/dhcpcd/dist/hooks/50-ypbind.in              |   11 +-
 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in     |   15 +-
 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in       |   36 +-
 external/bsd/dhcpcd/dist/src/arp.c                       |   32 +-
 external/bsd/dhcpcd/dist/src/common.h                    |   11 +-
 external/bsd/dhcpcd/dist/src/defs.h                      |    2 +-
 external/bsd/dhcpcd/dist/src/dev/udev.c                  |   23 +-
 external/bsd/dhcpcd/dist/src/dhcp.c                      |   17 +-
 external/bsd/dhcpcd/dist/src/dhcp.h                      |    2 +-
 external/bsd/dhcpcd/dist/src/dhcp6.c                     |   90 +++--
 external/bsd/dhcpcd/dist/src/dhcp6.h                     |    2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.8.in                 |    6 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.c                    |  204 ++++++++-----
 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in            |   13 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.h                    |    1 +
 external/bsd/dhcpcd/dist/src/if-bsd.c                    |  217 ++++++--------
 external/bsd/dhcpcd/dist/src/if-linux.c                  |   52 +--
 external/bsd/dhcpcd/dist/src/if-options.c                |   49 +-
 external/bsd/dhcpcd/dist/src/if-options.h                |    3 +-
 external/bsd/dhcpcd/dist/src/if-sun.c                    |   10 +-
 external/bsd/dhcpcd/dist/src/if.c                        |   54 ++-
 external/bsd/dhcpcd/dist/src/if.h                        |    4 +-
 external/bsd/dhcpcd/dist/src/ipv4.c                      |   77 ++++-
 external/bsd/dhcpcd/dist/src/ipv4.h                      |    7 +-
 external/bsd/dhcpcd/dist/src/ipv6.c                      |   62 ++-
 external/bsd/dhcpcd/dist/src/ipv6.h                      |    8 +-
 external/bsd/dhcpcd/dist/src/ipv6nd.c                    |   72 ++--
 external/bsd/dhcpcd/dist/src/ipv6nd.h                    |    2 +-
 external/bsd/dhcpcd/dist/src/logerr.h                    |    2 +-
 external/bsd/dhcpcd/dist/src/route.c                     |   44 ++-
 external/bsd/dhcpcd/dist/src/route.h                     |    3 +
 external/bsd/dhcpcd/dist/tests/eloop-bench/eloop-bench.c |   86 +++--
 external/bsd/dhcpcd/include/config.h                     |    1 +
 external/bsd/dhcpcd/sbin/dhcpcd/Makefile                 |    4 +-
 42 files changed, 776 insertions(+), 590 deletions(-)

diffs (truncated from 3152 to 300 lines):

diff -r da423f4a3404 -r cfff59107173 external/bsd/dhcpcd/dist/configure
--- a/external/bsd/dhcpcd/dist/configure        Mon Apr 09 16:41:35 2018 +0000
+++ b/external/bsd/dhcpcd/dist/configure        Mon Apr 09 16:46:34 2018 +0000
@@ -20,6 +20,7 @@
 HOST=
 HOSTCC=
 TARGET=
+INCLUDEDIR=
 DEBUG=
 FORK=
 STATIC=
@@ -71,6 +72,7 @@
        --mandir) MANDIR=$var;;
        --datadir) DATADIR=$var;;
        --with-ccopts|CFLAGS) CFLAGS=$var;;
+       -I|--includedir) INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }-I$var";;
        CC) CC=$var;;
        CPPFLAGS) CPPFLAGS=$var;;
        PKG_CONFIG) PKG_CONFIG=$var;;
@@ -264,7 +266,7 @@
        echo "$x=$t     $v" >>$CONFIG_MK
        unset t
        [ $l -gt 2 ] && t="     "
-       echo "#define $x$t      \"$v\"" >>$CONFIG_H
+       echo "#define   $x$t            \"$v\"" >>$CONFIG_H
 done
 echo "LIBDIR=          $LIBDIR" >>$CONFIG_MK
 echo "MANDIR=          $MANDIR" >>$CONFIG_MK
@@ -307,6 +309,9 @@
        echo "CPPFLAGS=" >>$CONFIG_MK
        echo "CPPFLAGS+=        $CPPFLAGS" >>$CONFIG_MK
 fi
+if [ -n "$INCLUDEDIR" ]; then
+       echo "CPPFLAGS+=        $INCLUDEDIR" >>$CONFIG_MK
+fi
 if [ -n "$LDFLAGS" ]; then
        echo "LDFLAGS=" >>$CONFIG_MK
        echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK
@@ -542,7 +547,7 @@
 EOF
        if $XCC _nl80211.c -o _nl80211 2>&3; then
                echo "yes"
-               echo "#define HAVE_NL80211_H" >>$CONFIG_H
+               echo "#define   HAVE_NL80211_H" >>$CONFIG_H
        else
                echo "no"
                echo "DHCPCD_SRCS+=     if-linux-wext.c" >>$CONFIG_MK
@@ -559,7 +564,7 @@
 EOF
        if $XCC _IN6_ADDR_GEN_MODE_NONE.c -o _IN6_ADDR_GEN_MODE_NONE 2>&3; then
                echo "yes"
-               echo "#define HAVE_IN6_ADDR_GEN_MODE_NONE" >>$CONFIG_H
+               echo "#define   HAVE_IN6_ADDR_GEN_MODE_NONE" >>$CONFIG_H
        else
                echo "no"
        fi
@@ -575,7 +580,7 @@
 EOF
        if $XCC _ifam_pid.c -o _ifam_pid 2>&3; then
                echo "yes"
-               echo "#define HAVE_IFAM_PID" >>$CONFIG_H
+               echo "#define   HAVE_IFAM_PID" >>$CONFIG_H
        else
                echo "no"
        fi
@@ -591,7 +596,7 @@
 EOF
        if $XCC _ifam_addrflags.c -o _ifam_addrflags 2>&3; then
                echo "yes"
-               echo "#define HAVE_IFAM_ADDRFLAGS" >>$CONFIG_H
+               echo "#define   HAVE_IFAM_ADDRFLAGS" >>$CONFIG_H
        else
                echo "no"
        fi
@@ -636,7 +641,7 @@
 EOF
 if $XCC _getifaddrs_addrflags.c -o _getifaddrs_addrflags $LIBSOCKET 2>&3; then
        echo "yes"
-       echo "#define HAVE_IFADDRS_ADDRFLAGS" >>$CONFIG_H
+       echo "#define   HAVE_IFADDRS_ADDRFLAGS" >>$CONFIG_H
 else
        echo "no"
 fi
@@ -788,12 +793,33 @@
        echo "COMPAT_SRCS+=     compat/pidfile.c" >>$CONFIG_MK
        echo "#include          \"compat/pidfile.h\"" >>$CONFIG_H
 else
-       echo "#define HAVE_UTIL_H" >>$CONFIG_H
+       echo "#define   HAVE_UTIL_H" >>$CONFIG_H
        if [ -n "$LIBUTIL" ]; then
                echo "LDADD+=           $LIBUTIL" >>$CONFIG_MK
        fi
 fi
 
+if [ -z "$SETPROCTITLE" ]; then
+       printf "Testing for setproctitle ... "
+       cat << EOF >_setproctitle.c
+#include <stdlib.h>
+int main(void) {
+       setproctitle("foo");
+       return 0;
+}
+EOF
+       if $XCC _setproctitle.c -o _setproctitle 2>&3; then
+               SETPROCTITLE=yes
+       else
+               SETPROCTITLE=no
+       fi
+       echo "$SETPROCTITLE"
+       rm -f _setproctitle.c _setproctitle
+fi
+if [ "$SETPROCTITLE" = yes ]; then
+       echo "#define   HAVE_SETPROCTITLE" >>$CONFIG_H
+fi
+
 if [ -z "$STRTOI" ]; then
        printf "Testing for strtoi ... "
        cat <<EOF >_strtoi.c
@@ -913,7 +939,7 @@
        fi
        echo "#include          \"compat/queue.h\"">>$CONFIG_H
 else
-       echo "#define HAVE_SYS_QUEUE_H" >>$CONFIG_H
+       echo "#define   HAVE_SYS_QUEUE_H" >>$CONFIG_H
 fi
 
 if [ -z "$REALLOCARRAY" ]; then
@@ -939,7 +965,7 @@
        echo "#include          \"compat/reallocarray.h\"">>$CONFIG_H
 fi
 # Set this for eloop
-echo "#define HAVE_REALLOCARRAY" >>$CONFIG_H
+echo "#define  HAVE_REALLOCARRAY" >>$CONFIG_H
 
 if [ -z "$POLL" ]; then
        printf "Testing for kqueue1 ... "
@@ -995,7 +1021,7 @@
 EOF
        if $XCC _epoll.c -o _epoll 2>&3; then
                POLL=epoll
-               echo "#define HAVE_EPOLL" >>$CONFIG_MK
+               echo "#define   HAVE_EPOLL" >>$CONFIG_MK
                echo "yes"
        else
                echo "no"
@@ -1022,23 +1048,23 @@
 fi
 case "$POLL" in
 kqueue1)
-       echo "#define HAVE_KQUEUE" >>$CONFIG_H
-       echo "#define HAVE_KQUEUE1" >>$CONFIG_H
+       echo "#define   HAVE_KQUEUE" >>$CONFIG_H
+       echo "#define   HAVE_KQUEUE1" >>$CONFIG_H
        ;;
 kqueue)
-       echo "#define HAVE_KQUEUE" >>$CONFIG_H
+       echo "#define   HAVE_KQUEUE" >>$CONFIG_H
        ;;
 epoll)
-       echo "#define HAVE_EPOLL" >>$CONFIG_H
+       echo "#define   HAVE_EPOLL" >>$CONFIG_H
        ;;
 pollts)
-       echo "#define HAVE_POLLTS" >>$CONFIG_H
+       echo "#define   HAVE_POLLTS" >>$CONFIG_H
        ;;
 ppoll)
-       echo "#define HAVE_PPOLL" >>$CONFIG_H
+       echo "#define   HAVE_PPOLL" >>$CONFIG_H
        ;;
 pselect)
-       echo "#define HAVE_PSELECT" >>$CONFIG_H
+       echo "#define   HAVE_PSELECT" >>$CONFIG_H
        ;;
 *)
        echo "No suitable polling function is available, not even pselect" >&2
@@ -1085,7 +1111,7 @@
        rm -f _fls64.c _fls64
 fi
 if [ "$FLS64" = yes ]; then
-       echo "#define HAVE_SYS_BITOPS_H" >>$CONFIG_H
+       echo "#define   HAVE_SYS_BITOPS_H" >>$CONFIG_H
 fi
 
 if [ -z "$MD5" ]; then
@@ -1123,7 +1149,7 @@
        echo "MD5_SRC=  compat/crypt/md5.c" >>$CONFIG_MK
 else
        echo "MD5_SRC=" >>$CONFIG_MK
-       echo "#define HAVE_MD5_H" >>$CONFIG_H
+       echo "#define   HAVE_MD5_H" >>$CONFIG_H
        [ -n "$MD5_LIB" ] && echo "LDADD+=              $MD5_LIB" >>$CONFIG_MK
 fi
 
@@ -1214,12 +1240,12 @@
        echo "SHA256_SRC=       compat/crypt/sha256.c" >>$CONFIG_MK
 else
        echo "SHA256_SRC=" >>$CONFIG_MK
-       echo "#define SHA2_H            <$SHA2_H>" >>$CONFIG_H
+       echo "#define   SHA2_H                  <$SHA2_H>" >>$CONFIG_H
        if [ "$SHA2_RENAMED" = yes ]; then
-               echo "#define SHA256_CTX        SHA2_CTX" >>$CONFIG_H
-               echo "#define SHA256_Init       SHA256Init" >>$CONFIG_H
-               echo "#define SHA256_Update     SHA256Update" >>$CONFIG_H
-               echo "#define SHA256_Final      SHA256Final" >>$CONFIG_H
+               echo "#define   SHA256_CTX      SHA2_CTX" >>$CONFIG_H
+               echo "#define   SHA256_Init     SHA256Init" >>$CONFIG_H
+               echo "#define   SHA256_Update   SHA256Update" >>$CONFIG_H
+               echo "#define   SHA256_Final    SHA256Final" >>$CONFIG_H
        fi
        [ -n "$SHA2_LIB" ] && echo "LDADD+=             $SHA2_LIB" >>$CONFIG_MK
 fi
@@ -1237,7 +1263,7 @@
 EOF
        if $XCC _hmac.c $MD5_LIB -o _hmac 2>&3; then
                HMAC=yes
-               echo "#define HAVE_HMAC_H" >>$CONFIG_H
+               echo "#define   HAVE_HMAC_H" >>$CONFIG_H
        else
                # Remove this test if NetBSD-8 ships with
                # hmac in it's own header and not stdlib.h
@@ -1259,9 +1285,9 @@
 fi
 if [ "$HMAC" = no ]; then
        echo "#include          \"compat/crypt/hmac.h\"" >>$CONFIG_H
-       echo "HMAC_SRC=         compat/crypt/hmac.c" >>$CONFIG_MK
+       echo "HMAC_SRC= compat/crypt/hmac.c" >>$CONFIG_MK
 else
-       # echo "#define HAVE_HMAC_H" >>$CONFIG_H
+       # echo "#define HAVE_HMAC_H" >>$CONFIG_H
        echo "HMAC_SRC=" >>$CONFIG_MK
 fi
 
@@ -1325,6 +1351,9 @@
        echo "CPPFLAGS+=        -DPLUGIN_DEV" >>$CONFIG_MK
        echo "MKDIRS+=  dev" >>$CONFIG_MK
 
+       # So the plugins have access to logerr
+       echo "LDFLAGS+= -Wl,-export-dynamic" >>$CONFIG_MK
+
        printf "Testing for dlopen ... "
        cat <<EOF >_dlopen.c
 #include <dlfcn.h>
diff -r da423f4a3404 -r cfff59107173 external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
--- a/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant  Mon Apr 09 16:41:35 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant  Mon Apr 09 16:46:34 2018 +0000
@@ -20,8 +20,6 @@
 
 wpa_supplicant_ctrldir()
 {
-       local dir
-
        dir=$(key_get_value "[[:space:]]*ctrl_interface=" \
                "$wpa_supplicant_conf")
        dir=$(trim "$dir")
@@ -37,8 +35,6 @@
 
 wpa_supplicant_start()
 {
-       local dir err errn
-
        # If the carrier is up, don't bother checking anything
        [ "$ifcarrier" = "up" ] && return 0
 
@@ -72,8 +68,6 @@
 
 wpa_supplicant_reconfigure()
 {
-       local dir err errn
-
        dir=$(wpa_supplicant_ctrldir)
        [ -z "$dir" ] && return 1
        if ! wpa_cli -p "$dir" -i "$interface" status >/dev/null 2>&1; then
@@ -92,8 +86,6 @@
 
 wpa_supplicant_stop()
 {
-       local dir err errn
-
        dir=$(wpa_supplicant_ctrldir)
        [ -z "$dir" ] && return 1
        wpa_cli -p "$dir" -i "$interface" status >/dev/null 2>&1 || return 0
diff -r da423f4a3404 -r cfff59107173 external/bsd/dhcpcd/dist/hooks/15-timezone
--- a/external/bsd/dhcpcd/dist/hooks/15-timezone        Mon Apr 09 16:41:35 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/15-timezone        Mon Apr 09 16:46:34 2018 +0000
@@ -4,10 +4,9 @@
 
 set_zoneinfo()
 {
-       local zoneinfo_dir= zone_file=
-
        [ -z "$new_tzdb_timezone" ] && return 0
 
+       zoneinfo_dir=
        for d in \
                /usr/share/zoneinfo     \
                /usr/lib/zoneinfo       \
diff -r da423f4a3404 -r cfff59107173 external/bsd/dhcpcd/dist/hooks/20-resolv.conf
--- a/external/bsd/dhcpcd/dist/hooks/20-resolv.conf     Mon Apr 09 16:41:35 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/20-resolv.conf     Mon Apr 09 16:46:34 2018 +0000



Home | Main Index | Thread Index | Old Index