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 Import dhcpcd-7.1.0 with the followin...



details:   https://anonhg.NetBSD.org/src/rev/fbae92301fd5
branches:  ROY
changeset: 455216:fbae92301fd5
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Jan 22 15:16:24 2019 +0000

description:
Import dhcpcd-7.1.0 with the following changes:

* NetBSD: sets SO_RERROR on to detect receive socket overflow
* BSD: route improvements to avoid listening for own changes
* IP6: implement IP6 address sharing
* BSD: catch UP/DOWN events when interfaces does support media changes
* IPv4LL: remember old address when carrier is lost

diffstat:

 external/bsd/dhcpcd/dist/LICENSE                   |    2 +-
 external/bsd/dhcpcd/dist/hooks/20-resolv.conf      |   12 +-
 external/bsd/dhcpcd/dist/hooks/29-lookup-hostname  |    2 +-
 external/bsd/dhcpcd/dist/hooks/30-hostname         |    8 +-
 external/bsd/dhcpcd/dist/hooks/50-ntp.conf         |    2 +-
 external/bsd/dhcpcd/dist/hooks/50-ypbind.in        |    2 +-
 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in |   19 +-
 external/bsd/dhcpcd/dist/src/arp.c                 |    2 +-
 external/bsd/dhcpcd/dist/src/arp.h                 |    2 +-
 external/bsd/dhcpcd/dist/src/auth.c                |    2 +-
 external/bsd/dhcpcd/dist/src/auth.h                |    2 +-
 external/bsd/dhcpcd/dist/src/bpf.c                 |    2 +-
 external/bsd/dhcpcd/dist/src/bpf.h                 |    2 +-
 external/bsd/dhcpcd/dist/src/common.c              |    2 +-
 external/bsd/dhcpcd/dist/src/common.h              |    2 +-
 external/bsd/dhcpcd/dist/src/control.c             |    2 +-
 external/bsd/dhcpcd/dist/src/control.h             |    2 +-
 external/bsd/dhcpcd/dist/src/defs.h                |    4 +-
 external/bsd/dhcpcd/dist/src/dev.h                 |    2 +-
 external/bsd/dhcpcd/dist/src/dhcp-common.c         |    2 +-
 external/bsd/dhcpcd/dist/src/dhcp-common.h         |    2 +-
 external/bsd/dhcpcd/dist/src/dhcp.c                |    3 +-
 external/bsd/dhcpcd/dist/src/dhcp.h                |    2 +-
 external/bsd/dhcpcd/dist/src/dhcp6.c               |   49 +++-
 external/bsd/dhcpcd/dist/src/dhcp6.h               |    3 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.8.in           |   30 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.c              |   45 ++-
 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in      |  119 ++++++----
 external/bsd/dhcpcd/dist/src/dhcpcd.h              |    9 +-
 external/bsd/dhcpcd/dist/src/duid.c                |    4 +-
 external/bsd/dhcpcd/dist/src/eloop.c               |    2 +-
 external/bsd/dhcpcd/dist/src/eloop.h               |    2 +-
 external/bsd/dhcpcd/dist/src/if-bsd.c              |  231 ++++++++++----------
 external/bsd/dhcpcd/dist/src/if-options.c          |    4 +-
 external/bsd/dhcpcd/dist/src/if-options.h          |    4 +-
 external/bsd/dhcpcd/dist/src/if.c                  |   12 +-
 external/bsd/dhcpcd/dist/src/if.h                  |    3 +-
 external/bsd/dhcpcd/dist/src/ipv4.c                |    5 +-
 external/bsd/dhcpcd/dist/src/ipv4.h                |    2 +-
 external/bsd/dhcpcd/dist/src/ipv4ll.c              |  127 +++++++----
 external/bsd/dhcpcd/dist/src/ipv4ll.h              |   10 +-
 external/bsd/dhcpcd/dist/src/ipv6.c                |   68 +----
 external/bsd/dhcpcd/dist/src/ipv6.h                |    9 +-
 external/bsd/dhcpcd/dist/src/ipv6nd.c              |  153 ++++++++++++-
 external/bsd/dhcpcd/dist/src/ipv6nd.h              |    6 +-
 external/bsd/dhcpcd/dist/src/logerr.c              |    2 +-
 external/bsd/dhcpcd/dist/src/logerr.h              |    2 +-
 external/bsd/dhcpcd/dist/src/route.c               |    2 +-
 external/bsd/dhcpcd/dist/src/route.h               |    2 +-
 external/bsd/dhcpcd/dist/src/sa.c                  |    2 +-
 external/bsd/dhcpcd/dist/src/sa.h                  |    2 +-
 external/bsd/dhcpcd/dist/src/script.c              |    2 +-
 external/bsd/dhcpcd/dist/src/script.h              |    2 +-
 53 files changed, 604 insertions(+), 391 deletions(-)

diffs (truncated from 2429 to 300 lines):

diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/LICENSE
--- a/external/bsd/dhcpcd/dist/LICENSE  Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/LICENSE  Tue Jan 22 15:16:24 2019 +0000
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/20-resolv.conf
--- a/external/bsd/dhcpcd/dist/hooks/20-resolv.conf     Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/20-resolv.conf     Tue Jan 22 15:16:24 2019 +0000
@@ -77,19 +77,19 @@
 eval_nd_dns()
 {
        eval ltime=\$nd${i}_rdnss${j}_lifetime
-       if [ -z "$ltime" -o "$ltime" = 0 ]; then
+       if [ -z "$ltime" ] || [ "$ltime" = 0 ]; then
                rdnss=
        else
                eval rdnss=\$nd${i}_rdnss${j}_servers
        fi
        eval ltime=\$nd${i}_dnssl${j}_lifetime
-       if [ -z "$ltime" -o "$ltime" = 0 ]; then
+       if [ -z "$ltime" ] || [ "$ltime" = 0 ]; then
                dnssl=
        else
                eval dnssl=\$nd${i}_dnssl${j}_search
        fi
 
-       [ -z "$rdnss" -a -z "$dnssl" ] && return 1
+       [ -z "${rdnss}${dnssl}" ] && return 1
 
        [ -n "$rdnss" ] && new_rdnss="$new_rdnss${new_rdnss:+ }$rdnss"
        [ -n "$dnssl" ] && new_dnssl="$new_dnssl${new_dnssl:+ }$dnssl"
@@ -130,9 +130,9 @@
        fi
 
        # If we don't have any configuration, remove it
-       if [ -z "$new_domain_name_servers" -a \
-               -z "$new_domain_name" -a \
-               -z "$new_domain_search" ]; then
+       if [ -z "$new_domain_name_servers" ] &&
+          [ -z "$new_domain_name" ] &&
+          [ -z "$new_domain_search" ]; then
                remove_resolv_conf
                return $?
        fi
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
--- a/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Tue Jan 22 15:16:24 2019 +0000
@@ -29,7 +29,7 @@
 
 set_hostname()
 {
-       if [ -z "$new_host_name" -a -z "$new_fqdn_name" ]; then
+       if [ -z "${new_host_name}${new_fqdn_name}" ]; then
                export new_host_name="$(lookup_hostname)"
        fi
 }
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/30-hostname
--- a/external/bsd/dhcpcd/dist/hooks/30-hostname        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/30-hostname        Tue Jan 22 15:16:24 2019 +0000
@@ -87,8 +87,8 @@
                fi
        elif [ -n "$old_host_name" ]; then
                if ${hfqdn}; then
-                       if [ -n "$old_domain_name" -a \
-                           "$old_host_name" = "${old_host_name#*.}" ]
+                       if [ -n "$old_domain_name" ] &&
+                          [ "$old_host_name" = "${old_host_name#*.}" ]
                        then
                                [ "$hostname" = \
                                    "$old_host_name.$old_domain_name" ]
@@ -131,8 +131,8 @@
                fi
        elif [ -n "$new_host_name" ]; then
                if ${hfqdn}; then
-                       if [ -n "$new_domain_name" -a \
-                           "$new_host_name" = "${new_host_name#*.}" ]
+                       if [ -n "$new_domain_name" ] &&
+                          [ "$new_host_name" = "${new_host_name#*.}" ]
                        then
                                try_hostname "$new_host_name.$new_domain_name"
                        else
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/50-ntp.conf
--- a/external/bsd/dhcpcd/dist/hooks/50-ntp.conf        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ntp.conf        Tue Jan 22 15:16:24 2019 +0000
@@ -96,7 +96,7 @@
                printf %s "$servers" >> "$cf"
                echo "$signature_base_end${header:+ $from }$header" >> "$cf"
        else
-               [ -e "$ntp_conf" -a -e "$cf" ] || return
+               [ -e "$ntp_conf" ] && [ -e "$cf" ] || return
        fi
 
        # If we changed anything, restart ntpd
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/50-ypbind.in
--- a/external/bsd/dhcpcd/dist/hooks/50-ypbind.in       Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ypbind.in       Tue Jan 22 15:16:24 2019 +0000
@@ -41,7 +41,7 @@
        fi
 
        nd="$(best_domain)"
-       if [ $? = 0 -a "$nd" != "$(domainname)" ]; then
+       if [ $? = 0 ] && [ "$nd" != "$(domainname)" ]; then
                domainname "$nd"
                if [ -n "$ypbind_restart_cmd" ]; then
                        eval $ypbind_restart_cmd
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
--- a/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in        Tue Jan 22 15:16:24 2019 +0000
@@ -107,7 +107,7 @@
 # Compare two files.
 comp_file()
 {
-       [ -e "$1" -a -e "$2" ] || return 1
+       [ -e "$1" ] && [ -e "$2" ] || return 1
 
        if type cmp >/dev/null 2>&1; then
                cmp -s "$1" "$2"
@@ -187,11 +187,11 @@
 valid_domainname()
 {
        name="$1"
-       [ -z "$name" -o ${#name} -gt 255 ] && return 1
+       [ -z "$name" ] || [ ${#name} -gt 255 ] && return 1
        
        while [ -n "$name" ]; do
                label="${name%%.*}"
-               [ -z "$label" -o ${#label} -gt 63 ] && return 1
+               [ -z "$label" ] || [ ${#label} -gt 63 ] && return 1
                case "$label" in
                -*|_*|*-|*_)            return 1;;
                *[![:alnum:]_-]*)       return 1;;
@@ -231,16 +231,17 @@
        # systems we try to detect them first.
        status="@STATUSARG@"
        : ${status:=status}
-       if [ -x /bin/systemctl -a -S /run/systemd/private ]; then
+       if [ -x /bin/systemctl ] && [ -S /run/systemd/private ]; then
                _service_exists="/bin/systemctl --quiet is-enabled \$1.service"
                _service_status="/bin/systemctl --quiet is-active \$1.service"
                _service_cmd="/bin/systemctl \$2 \$1.service"
-       elif [ -x /usr/bin/systemctl -a -S /run/systemd/private ]; then
+       elif [ -x /usr/bin/systemctl ] && [ -S /run/systemd/private ]; then
                _service_exists="/usr/bin/systemctl --quiet is-enabled \$1.service"
                _service_status="/usr/bin/systemctl --quiet is-active \$1.service"
                _service_cmd="/usr/bin/systemctl \$2 \$1.service"
-       elif [ -x /sbin/rc-service -a \
-           -s /libexec/rc/init.d/softlevel -o -s /run/openrc/softlevel ]
+       elif [ -x /sbin/rc-service ] &&
+            { [ -s /libexec/rc/init.d/softlevel ] ||
+            [ -s /run/openrc/softlevel ]; }
        then
                _service_exists="/sbin/rc-service -e \$1"
                _service_cmd="/sbin/rc-service \$1 -- -D \$2"
@@ -259,7 +260,7 @@
        elif [ -x /usr/bin/sv ]; then
                _service_exists="/usr/bin/sv status \$1 >/dev/null 2>&1"
                _service_cmd="/usr/bin/sv \$2 \$1"
-       elif [ -e /etc/slackware-version -a -d /etc/rc.d ]; then
+       elif [ -e /etc/slackware-version ] && [ -d /etc/rc.d ]; then
                _service_exists="[ -x /etc/rc.d/rc.\$1 ]"
                _service_cmd="/etc/rc.d/rc.\$1 \$2"
                _service_status="/etc/rc.d/rc.\$1 status >/dev/null 2>&1"
@@ -274,7 +275,7 @@
                done
                if [ -e /etc/arch-release ]; then
                        _service_status="[ -e /var/run/daemons/\$1 ]"
-               elif [ "$x" = "/etc/rc.d" -a -e /etc/rc.d/rc.subr ]; then
+               elif [ "$x" = "/etc/rc.d" ] && [ -e /etc/rc.d/rc.subr ]; then
                        _service_status="$x/\$1 check >/dev/null 2>&1"
                fi
        fi
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/arp.c
--- a/external/bsd/dhcpcd/dist/src/arp.c        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/arp.c        Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - ARP handler
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/arp.h
--- a/external/bsd/dhcpcd/dist/src/arp.h        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/arp.h        Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/auth.c
--- a/external/bsd/dhcpcd/dist/src/auth.c       Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/auth.c       Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/auth.h
--- a/external/bsd/dhcpcd/dist/src/auth.h       Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/auth.h       Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/bpf.c
--- a/external/bsd/dhcpcd/dist/src/bpf.c        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/bpf.c        Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd: BPF arp and bootp filtering
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/bpf.h
--- a/external/bsd/dhcpcd/dist/src/bpf.h        Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/bpf.h        Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd: BPF arp and bootp filtering
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/common.c
--- a/external/bsd/dhcpcd/dist/src/common.c     Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/common.c     Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/common.h
--- a/external/bsd/dhcpcd/dist/src/common.h     Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/common.h     Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/control.c
--- a/external/bsd/dhcpcd/dist/src/control.c    Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/control.c    Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/control.h
--- a/external/bsd/dhcpcd/dist/src/control.h    Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/control.h    Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r cafd6630833d -r fbae92301fd5 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Mon Aug 20 10:55:03 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Tue Jan 22 15:16:24 2019 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,7 +28,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"



Home | Main Index | Thread Index | Old Index