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 Import dhcpcd-7.0.1 with the follow...
details: https://anonhg.NetBSD.org/src/rev/5da2d3817e59
branches: trunk
changeset: 359106:5da2d3817e59
user: roy <roy%NetBSD.org@localhost>
date: Mon Jan 29 11:11:22 2018 +0000
description:
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
diffstat:
external/bsd/dhcpcd/dist/configure | 5 +
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.in | 36 ++----
external/bsd/dhcpcd/dist/src/common.h | 9 -
external/bsd/dhcpcd/dist/src/defs.h | 2 +-
external/bsd/dhcpcd/dist/src/dhcpcd.8.in | 6 +-
external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in | 9 +-
external/bsd/dhcpcd/dist/src/if-options.h | 1 +
external/bsd/dhcpcd/dist/src/if.c | 18 +--
external/bsd/dhcpcd/dist/src/logerr.h | 2 +-
external/bsd/dhcpcd/dist/tests/eloop-bench/eloop-bench.c | 86 +++++++++------
18 files changed, 114 insertions(+), 132 deletions(-)
diffs (truncated from 799 to 300 lines):
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/configure
--- a/external/bsd/dhcpcd/dist/configure Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/configure Mon Jan 29 11:11:22 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;;
@@ -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
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
--- a/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant Mon Jan 29 11:11:22 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 e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/15-timezone
--- a/external/bsd/dhcpcd/dist/hooks/15-timezone Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/15-timezone Mon Jan 29 11:11:22 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 e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/20-resolv.conf
--- a/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Mon Jan 29 11:11:22 2018 +0000
@@ -13,8 +13,7 @@
build_resolv_conf()
{
- local cf="$state_dir/resolv.conf.$ifname"
- local interfaces= header= search= srvs= servers= x=
+ cf="$state_dir/resolv.conf.$ifname"
# Build a list of interfaces
interfaces=$(list_interfaces "$resolv_conf_dir")
@@ -77,7 +76,6 @@
# regarding DNS option lifetime in ND messages.
eval_nd_dns()
{
-
eval ltime=\$nd${i}_rdnss${j}_lifetime
if [ -z "$ltime" -o "$ltime" = 0 ]; then
rdnss=
@@ -101,8 +99,8 @@
add_resolv_conf()
{
- local x= conf="$signature$NL" warn=true
- local i j ltime rdnss dnssl new_rdnss new_dnssl
+ conf="$signature$NL"
+ warn=true
# Loop to extract the ND DNS options using our indexed shell values
i=1
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
--- a/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Mon Jan 29 11:11:22 2018 +0000
@@ -3,7 +3,6 @@
lookup_hostname()
{
[ -z "$new_ip_address" ] && return 1
- local h=
# Silly ISC programs love to send error text to stdout
if type dig >/dev/null 2>&1; then
h=$(dig +short -x $new_ip_address)
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/30-hostname
--- a/external/bsd/dhcpcd/dist/hooks/30-hostname Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/30-hostname Mon Jan 29 11:11:22 2018 +0000
@@ -22,8 +22,6 @@
# Some systems don't have hostname(1)
_hostname()
{
- local name=
-
if [ -z "${1+x}" ]; then
if type hostname >/dev/null 2>&1; then
hostname
@@ -55,10 +53,19 @@
fi
}
+set_hostname_vars()
+{
+ hfqdn=false
+ hshort=false
+ case "$hostname_fqdn" in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1) hfqdn=true;;
+ ""|[Ss][Ee][Rr][Vv][Ee][Rr]) ;;
+ *) hshort=true;;
+ esac
+}
+
need_hostname()
{
- local hfqdn=false hshort=false
-
# Always load the hostname variable for future use
hostname="$(_hostname)"
case "$hostname" in
@@ -70,11 +77,7 @@
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1) return 0;;
esac
- case "$hostname_fqdn" in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1) hfqdn=true;;
- ""|[Ss][Ee][Rr][Vv][Ee][Rr]) ;;
- *) hshort=true;;
- esac
+ set_hostname_vars
if [ -n "$old_fqdn" ]; then
if ${hfqdn} || ! ${hsort}; then
@@ -105,7 +108,6 @@
try_hostname()
{
-
[ "$hostname" = "$1" ] && return 0
if valid_domainname "$1"; then
syslog info "Setting hostname: $1"
@@ -117,15 +119,9 @@
set_hostname()
{
- local hfqdn=false hshort=false
-
need_hostname || return
- case "$hostname_fqdn" in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1) hfqdn=true;;
- ""|[Ss][Ee][Rr][Vv][Ee][Rr]) ;;
- *) hshort=true;;
- esac
+ set_hostname_vars
if [ -n "$new_fqdn" ]; then
if ${hfqdn} || ! ${hshort}; then
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/50-ntp.conf
--- a/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Mon Jan 29 11:11:22 2018 +0000
@@ -57,12 +57,12 @@
build_ntp_conf()
{
- local cf="$state_dir/ntp.conf.$ifname"
- local interfaces= header= srvs= servers= x=
+ cf="$state_dir/ntp.conf.$ifname"
# Build a list of interfaces
interfaces=$(list_interfaces "$ntp_conf_dir")
+ servers=
if [ -n "$interfaces" ]; then
# Build the header
for x in ${interfaces}; do
@@ -107,7 +107,7 @@
add_ntp_conf()
{
- local cf="$ntp_conf_dir/$ifname" x=
+ cf="$ntp_conf_dir/$ifname"
[ -e "$cf" ] && rm "$cf"
[ -d "$ntp_conf_dir" ] || mkdir -p "$ntp_conf_dir"
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/50-yp.conf
--- a/external/bsd/dhcpcd/dist/hooks/50-yp.conf Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-yp.conf Mon Jan 29 11:11:22 2018 +0000
@@ -9,9 +9,10 @@
make_yp_conf()
{
[ -z "$new_nis_domain" -a -z "$new_nis_servers" ] && return 0
- local cf=/etc/yp.conf."$ifname" prefix= x= pid=
+ cf=/etc/yp.conf."$ifname"
rm -f "$cf"
echo "$signature" > "$cf"
+ prefix=
if [ -n "$new_nis_domain" ]; then
if ! valid_domainname "$new_nis_domain"; then
syslog err "Invalid NIS domain name: $new_nis_domain"
@@ -43,7 +44,7 @@
{
[ -n "$old_nis_domain" ] && domainname ""
restore_conf /etc/yp.conf || return 0
- local pid="$(ypbind_pid)"
+ pid="$(ypbind_pid)"
if [ -n "$pid" ]; then
kill -HUP "$pid"
fi
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/50-ypbind.in
--- a/external/bsd/dhcpcd/dist/hooks/50-ypbind.in Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ypbind.in Mon Jan 29 11:11:22 2018 +0000
@@ -10,8 +10,6 @@
best_domain()
{
- local i=
-
for i in "$ypbind_dir/$interface_order".*; do
if [ -f "$i" ]; then
cat "$i"
@@ -29,9 +27,9 @@
if [ -z "$ypdomain_dir" ]; then
false
else
- local cf="$ypdomain_dir/$new_nis_domain$ypdomain_suffix"
+ cf="$ypdomain_dir/$new_nis_domain$ypdomain_suffix"
if [ -n "$new_nis_servers" ]; then
- local ncf="$cf.$ifname" x=
+ ncf="$cf.$ifname"
rm -f "$ncf"
for x in $new_nis_servers; do
echo "$x" >>"$ncf"
@@ -42,7 +40,7 @@
fi
fi
- local nd="$(best_domain)"
+ nd="$(best_domain)"
if [ $? = 0 -a "$nd" != "$(domainname)" ]; then
domainname "$nd"
if [ -n "$ypbind_restart_cmd" ]; then
@@ -53,9 +51,8 @@
restore_yp_binding()
{
-
rm -f "$ypbind_dir/$ifname"
- local nd="$(best_domain)"
+ nd="$(best_domain)"
# We need to stop ypbind if there is no best domain
# otherwise it will just stall as we cannot set domainname
# to blank :/
diff -r e688f93aea8c -r 5da2d3817e59 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
--- a/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in Mon Jan 29 10:57:13 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in Mon Jan 29 11:11:22 2018 +0000
@@ -18,7 +18,7 @@
# Ensure that all arguments are unique
uniqify()
{
Home |
Main Index |
Thread Index |
Old Index