From 4e0997c6c2ede21b7cd135ec25175b1a8f69498f Mon Sep 17 00:00:00 2001 From: Shawn Routhier Date: Tue, 14 Sep 2010 22:20:20 +0000 Subject: [PATCH] Minor changes for scripts, configure.ac and Makefiles [ISC-Bugs #19147] Use domain-search instead of domain-name in manual and example conf file. Thanks to a patch from David Cantrell at Red Hat. [ISC-Bugs #19761] Restore address when doing a rebind in DHCPv6 [ISC-Bugs #19945] Properly close the quote on some arguments. [ISC-Bugs #20952] Add 64 bit types to configure.ac [ISC-Bugs #21308] Add "PATH=" to CLIENT_PATH envrionment variable --- RELNOTES | 9 +++++++++ client/Makefile.am | 4 ++-- client/dhclient.conf | 2 +- client/dhclient.conf.5 | 4 ++-- client/scripts/linux | 7 +++++++ client/scripts/netbsd | 4 ++-- client/scripts/nextstep | 4 ++-- client/scripts/openwrt | 6 ++++++ configure.ac | 6 ++++++ 9 files changed, 37 insertions(+), 9 deletions(-) diff --git a/RELNOTES b/RELNOTES index 781af581b..da1defd01 100644 --- a/RELNOTES +++ b/RELNOTES @@ -115,6 +115,15 @@ work on other platforms. Please report any problems and suggested fixes to [ISC-Bugs #21585] - Always print time values in omshell as hex instead of ascii if the values happen to be printable characters. +- Minor changes for scripts, configure.ac and Makefiles + [ISC-Bugs #19147] Use domain-search instead of domain-name in manual and + example conf file. Thanks to a patch from David Cantrell + at Red Hat. + [ISC-Bugs #19761] Restore address when doing a rebind in DHCPv6 + [ISC-Bugs #19945] Properly close the quote on some arguments. + [ISC-Bugs #20952] Add 64 bit types to configure.ac + [ISC-Bugs #21308] Add "PATH=" to CLIENT_PATH envrionment variable + Changes since 4.2.0b2 - Add declaration for variable in debug code in alloc.c. [ISC-Bugs #21472] diff --git a/client/Makefile.am b/client/Makefile.am index 77ed05522..57c6ac931 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -10,9 +10,9 @@ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5 EXTRA_DIST = $(man_MANS) dhclient.o: dhclient.c - $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \ + $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \ -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c dhc6.o: dhc6.c - $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \ + $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \ -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c diff --git a/client/dhclient.conf b/client/dhclient.conf index 64c6ce110..1d1d7328d 100644 --- a/client/dhclient.conf +++ b/client/dhclient.conf @@ -1,7 +1,7 @@ send host-name = pick-first-value(gethostname(), "ISC-dhclient"); send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; -supersede domain-name "fugue.com home.vix.com"; +supersede domain-search "fugue.com home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5 index 080cfc788..5943e12c3 100644 --- a/client/dhclient.conf.5 +++ b/client/dhclient.conf.5 @@ -1,4 +1,4 @@ -.\" $Id: dhclient.conf.5,v 1.29 2010/07/02 23:09:14 sar Exp $ +.\" $Id: dhclient.conf.5,v 1.30 2010/09/14 22:20:20 sar Exp $ .\" .\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC") @@ -694,7 +694,7 @@ interface "ep0" { hardware ethernet 00:a0:24:ab:fb:9c; send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; - supersede domain-name "fugue.com rc.vix.com home.vix.com"; + supersede domain-search "fugue.com rc.vix.com home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; diff --git a/client/scripts/linux b/client/scripts/linux index 4b3f1670c..4326ce95e 100755 --- a/client/scripts/linux +++ b/client/scripts/linux @@ -250,6 +250,13 @@ if [ x$reason = xBOUND6 ] ; then fi if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ] ; then + if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi + + ${ip} -f inet6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ + dev ${interface} scope global + # Make sure nothing has moved around on us. # Nameservers/domains/etc. diff --git a/client/scripts/netbsd b/client/scripts/netbsd index 7cbb64c03..af6b3c950 100755 --- a/client/scripts/netbsd +++ b/client/scripts/netbsd @@ -3,9 +3,9 @@ make_resolv_conf() { if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search != x ]; then + if [ "x$new_domain_search" != x ]; then echo search $new_domain_search >> /etc/resolv.conf.dhclient - elif [ "x$new_domain_name != x ]; then + elif [ "x$new_domain_name" != x ]; then # Note that the DHCP 'Domain Name Option' is really just a domain # name, and that this practice of using the domain name option as # a search path is both nonstandard and deprecated. diff --git a/client/scripts/nextstep b/client/scripts/nextstep index b80d175ad..9273c5a74 100644 --- a/client/scripts/nextstep +++ b/client/scripts/nextstep @@ -33,9 +33,9 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ fi if [ x"$new_domain_name_servers" != x ]; then cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search != x ]; then + if [ "x$new_domain_search" != x ]; then echo search $new_domain_search >> /etc/resolv.conf.dhclient - elif [ "x$new_domain_name != x ]; then + elif [ "x$new_domain_name" != x ]; then # Note that the DHCP 'Domain Name Option' is really just a domain # name, and that this practice of using the domain name option as # a search path is both nonstandard and deprecated. diff --git a/client/scripts/openwrt b/client/scripts/openwrt index e1775ffa4..29d100f09 100755 --- a/client/scripts/openwrt +++ b/client/scripts/openwrt @@ -216,6 +216,12 @@ if [ x$reason = xBOUND6 ]; then fi if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then + if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi + + ifconfig ${interface} inet6 ${new_ip6_address}/${new_ip6_prefixlen} alias + # Make sure nothing has moved around on us. # Nameservers/domains/etc. diff --git a/configure.ac b/configure.ac index ff832aa6f..870736901 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,7 @@ AC_ARG_WITH(relay-pid-file, AC_TYPE_INT8_T AC_TYPE_INT16_T AC_TYPE_INT32_T +AC_TYPE_INT64_T # Some systems need the u_intX_t types defined across. AC_CHECK_TYPE([u_int8_t], [], [ @@ -339,6 +340,11 @@ AC_CHECK_TYPE([u_int32_t], [], [ AC_DEFINE(u_int32_t, [uint32_t], [Define a type for 32-bit unsigned integers.]) ]) +AC_CHECK_TYPE([u_int64_t], [], [ + AC_TYPE_UINT64_T + AC_DEFINE(u_int64_t, [uint64_t], [Define a type for 64-bit unsigned + integers.]) +]) # see if ifaddrs.h is available AC_CHECK_HEADERS(ifaddrs.h) -- 2.47.2