From: Francis Dupont Date: Tue, 9 Feb 2016 12:49:00 +0000 (+0100) Subject: Finished merge of t39262 (DHCP build from another directory) X-Git-Tag: v4_3_4~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f704712ed7efb723face26e109de7041261546f5;p=thirdparty%2Fdhcp.git Finished merge of t39262 (DHCP build from another directory) --- f704712ed7efb723face26e109de7041261546f5 diff --cc Makefile.in index 2a2358126,d65dd6efc..7a916c76a --- a/Makefile.in +++ b/Makefile.in @@@ -657,12 -649,12 +667,13 @@@ distcheck: dis test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@@ -828,20 -821,19 +840,21 @@@ uninstall-am: uninstall-nobase_includeH am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ - tags-am uninstall uninstall-am uninstall-nobase_includeHEADERS + distcheck distclean distclean-generic distclean-local \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nobase_includeHEADERS install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-nobase_includeHEADERS +.PRECIOUS: Makefile + # # automake adds dependencies that we don't like, so we explicitly remove them diff --cc RELNOTES index f71dcf5c2,3e32fae82..aa7d0419b --- a/RELNOTES +++ b/RELNOTES @@@ -52,165 -52,6 +52,170 @@@ ISC DHCP is open source software mainta Consortium. This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). + Changes since 4.3.3 + +- Corrected a static analyzer warning in common/execute.c + [ISC-Bugs #40374] + +- ISC DHCP now follows the common convention to use the base name a + program is invoked with (aka argv[0], vs. a builtin name) for + logs. This should help differentiate syslog entires for DHCPv4 and + DHCPv6 servers. You can define OLD_LOG_NAME in includes/site.h to + keep the previous behavior. + [ISC-Bugs #38692] + +- The linux packet filter code now correctly treats only least significant + 12 bits an inbound packet's TCI value as the VLAN id (per IEEE 802.1Q). + Prior to this it was using the entire 16 bit value as the VLAN id and + incorrectly discarding packets. Thanks to Jiri Popelka at Red Hat for + reporting this issue and supplying its patch. + [ISC-Bugs #40591] + +- Fixed several issues static analysis issues such as potential null + references, unchecked strdup returns. Thanks to Bill Parker (wp02855 at + gmail dot com) who identified these issues and supplied patches to + address them. + [ISC-Bugs #40754] + [ISC-Bugs #40823] + +- Corrected compilation errors that prohibited building the server + and its ATF unit tests when failover is disabled. + [ISC-Bugs #40372] + +- Added the lease address to the end of the debug level log message + emitted when an existing lease is renewed within the dhcp-cache-threshold. + Thanks to Nathan Neulinger at Missouri S&T for suggesting the change. + [ISC-Bugs #40598] + +- Added dhcpv6 and delayed-ack to settings listed in the "Features:" + section of the configure script output. Additionally, all of the + features reported on will now always show either a "yes" or "no" + value. Prior to this features left to their default setting would + not show a value. + [ISC-Bugs #40381] + +- Added a parameter, authoring-byte-order, to the lease file. This value + is automatically added to the top of new lease files by the server and + indicates the internal byte order (big endian or little endian) of the + server. This permits lease files generated on a server with one form of + byte order to be used on a server with the opposite form. Our thanks to + Timothe Litt for calling this to our attention and for the suggestions + he provided. + [ISC-Bugs #38396] + +- Fixed a small memory leak in the DHCPv6 version of the client code. + This is unlikely to cause significant issues in actual use. + [ISC-Bugs #40990] + +- Corrected a few minor memory leaks in omapi's dereferencing of + host objects. Thanks to Jiri Popelka at Red Hat for reporting + the issue and supplying the patches. + [ISC-Bugs #33990] + [ISC-Bugs #41325] + +- Cleaned up some of the Make infrastructure to make --with-libbind + work better. Though it still only works with an absolute path. + [ISC-Bugs #39210] + +- Made the embedded bind libraries able to be cross compiled + (please refer to the bind9 documentation to learn how to cross + compile DHCP and its bind library dependency). + [ISC-Bugs #38836] + +- Update the client code to better support getting IA_NAs and IA_PDs + in the same packet, see RFC7550 for some discussion. + [ISC-Bugs #40190] + +- Update the bounds checking when receiving a packet. + Thanks to Sebastian Poehn from Sophos for the bug report and a suggested + patch. + [ISC-Bugs #41267] + CVE: CVE-2015-8605 + +- When handling an incorrect command line for dhcpd, dhclient or dhcrelay + print out a specific error message about the first error in addition + to the usage string. This may be disabled by editing includes/site.h. + [ISC-Bugs #40321] + [ISC-Bugs #41454] + +- The configure script will now exit with an error message if it cannot find + a GNU-style make tool (needed when building BIND libraries) or pkg-config + (needed to locate ATF used for building unit tests). Prior to this the + script would exit indicating success causing subsequent attempts to build + the software to fail. + [ISC-Bugs #40371] + +- Properly terminate strings before passing them to regex and fix + a boudnary error when creating certain new data strings. + Thanks to Andrey Jr. Melnikov for the bug report. + [ISC-Bugs #41217] + +- Option expressions, such as prepend and append, are now supported when + running dhclient for IPv6. Prior to this such statements in the + client configuration file would be parsed but have no affect. Thanks + to Jiri Popelka at Red Hat for reporting the issue. + [ISC-Bugs #39952] + +- A failover primary server will now accept a binding status update from the + secondary which transitions a lease from ACTIVE to ABANDONED. This accounts + for instances in which a client declines a lease and only the secondary + server receives it. Prior to this the primary server would reject such an + update as an "invalid state transition". + [ISC_BUGS #25189] + +- Properly allocate memory for a bpf filter. + Thanks to Bill Parker (wp02855 at gmail dot com) who identified this issue. + [ISC-Bugs #41485] + +- Updated contrib/dhcp-lease-list.pl to handle garbage in the oui file better + and to print out the hostnames a bit better. + Thanks to Antoine Beaupré from Debian for the suggested patch. + [ISC-Bugs #41288] + +- The DHCPv6 server now handles long valid and preferred lease times better. + Values that would cause the internal end time of the lease to wrap are + modified to work as infinite. + [ISC-Bugs #40773] + +- Updated support for cross compiling by allowing the library archiver + to be set at configure time via the environment variable 'AR'. + [ISC-Bugs #41536] + +- The server will now match DHCPv6 relayed clients to host declarations + which include the "hardware" statement, if the relay connected to the + client supplies the client's hardware address via client-linklayer-address + option as per RFC 6939. + [ISC-Bugs #40334] + +- Allow a filename to be specified instead of /dev/random during + configuration. This is passed to the BIND configuration to allow + for cross compilation. + [ISC-Bugs #33835] + +- Add more option definitions. + [ISC-Bugs #40562] + +- Correct outputting of long lines in the lease file when writing + a lease that includes long strings in an execute statement. + [ISC-Bugs #40994] + +- The server will now correctly treat a lease as reserved when the client + requests an infinite lease time (i.e. OxFFFFFFFF) and "infinite-is-reserved" + is enabled. Prior to this the server would halt. In addition, corrections + were made to the server to allow a lease's flags field to be set via omapi. + Prior to this, the server, depending on the host architecture, would + incorrectly parse the new flags value from the omapi message. + [ISC-Bugs #31179] + ++- ISC DHCP can now be configured and built from a directory other than ++ the top level source directory. Note that "make distcheck" uses this ++ feature. ++ [ISC-Bugs #39262] ++ + Changes since 4.3.3b1 + +- None + Changes since 4.3.2 - The server now does a better check to see if it can allocate the memory diff --cc client/Makefile.in index d1674686f,0ec552fbd..59597f0f8 --- a/client/Makefile.in +++ b/client/Makefile.in @@@ -859,17 -851,7 +864,9 @@@ uninstall-man: uninstall-man5 uninstall uninstall-am uninstall-dist_sysconfDATA uninstall-man \ uninstall-man5 uninstall-man8 uninstall-sbinPROGRAMS +.PRECIOUS: Makefile + - dhclient.o: dhclient.c - $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \ - -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c - - dhc6.o: dhc6.c - $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \ - -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --cc client/tests/Makefile.in index 1a741b129,e40302472..a17bf101f --- a/client/tests/Makefile.in +++ b/client/tests/Makefile.in @@@ -705,18 -696,17 +708,19 @@@ uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am +.PRECIOUS: Makefile + # for autotools debugging only info: diff --cc common/tests/Makefile.in index fa488a217,9b6e37f3e..7d730ef45 --- a/common/tests/Makefile.in +++ b/common/tests/Makefile.in @@@ -744,21 -735,26 +747,28 @@@ uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am +.PRECIOUS: Makefile + @HAVE_ATF_TRUE@check: $(ATF_TESTS) - @HAVE_ATF_TRUE@ sh ${top_srcdir}/tests/unittest.sh + @HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/common/tests/Atffile Atffile + @HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh + + @HAVE_ATF_TRUE@distclean-local: + @HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \ + @HAVE_ATF_TRUE@ rm -f Atffile; \ + @HAVE_ATF_TRUE@ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --cc configure index 7efe476bf,1b74d509a..e0616f854 --- a/configure +++ b/configure @@@ -626,12 -626,12 +626,14 @@@ am__EXEEXT_TRU LTLIBOBJS LIBOBJS LDAP_CFLAGS +LDAP_LIBS + BINDSRCDIR BINDDIR ac_prefix_program + DISTCHECK_ATF_CONFIGURE_FLAG HAVE_ATF_FALSE HAVE_ATF_TRUE +pkgcfg_found ATF_BIN ATF_LDFLAGS ATF_CFLAGS @@@ -5509,23 -5429,9 +5511,24 @@@ $as_echo "#define USE_LOG_PID 1" >>conf fi +# Allow for binary search when inserting v4 leases into queues +# Check whether --enable-binary_leases was given. +if test "${enable_binary_leases+set}" = set; then : + enableval=$enable_binary_leases; +fi + +# binary_leases is off by default. +if test "$enable_binary_leases" = "yes"; then + +$as_echo "#define BINARY_LEASES 1" >>confdefs.h + +else + enable_binary_leases="no" +fi + # Testing section + DISTCHECK_ATF_CONFIGURE_FLAG= atf_path="no" # Check whether --with-atf was given. @@@ -6807,16 -6644,10 +6819,16 @@@ no ;; *) BINDDIR="$use_libbind" - if test ! -d "bind"; then + if test ! -d "$srcdir/bind"; then # no bind directory, create it with a fake Makefile.in - mkdir $srcdir/bind - echo "# placeholder" > $srcdir/bind/Makefile.in + # (AC_CONFIG_FILES and top Makefile refer to it so + # it must exits) + mkdir bind + cat > bind/Makefile.in << EOF +# placeholder +all check clean distclean distdir install uninstall: + +EOF fi ;; esac diff --cc configure.ac index 5664827ae,fd936410d..9351150a6 --- a/configure.ac +++ b/configure.ac @@@ -206,19 -187,9 +206,20 @@@ if test "$enable_log_pid" = "yes" ; the [Define to include PIDs in syslog messages.]) fi +# Allow for binary search when inserting v4 leases into queues +AC_ARG_ENABLE(binary_leases, + AS_HELP_STRING([--enable-binary-leases],[enable support for binary insertion of leases (default is no)])) +# binary_leases is off by default. +if test "$enable_binary_leases" = "yes"; then + AC_DEFINE([BINARY_LEASES], [1], + [Define to support binary insertion of leases into queues.]) +else + enable_binary_leases="no" +fi + # Testing section + DISTCHECK_ATF_CONFIGURE_FLAG= atf_path="no" AC_ARG_WITH([atf], AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed (or "bind")]), @@@ -622,8 -568,9 +628,9 @@@ AC_CHECK_SIZEOF(struct iaddr *, , #include "includes/inet.h" #include ]) + CFLAGS="$SAVE_CFLAGS" -# Solaris does not have the msg_control or msg_controlen members +# Solaris does not have the msg_control or msg_controlen members # in the msghdr structure unless you define: # # _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__ @@@ -656,13 -603,15 +663,15 @@@ AC_CHECK_MEMBER(struct tpacket_auxdata. ,, [#include ]) BINDDIR= + BINDSRCDIR= AC_ARG_WITH(libbind, - AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH + AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH (default is ./bind)]), use_libbind="$withval", use_libbind="no") -case "$use_libbind" in +case "$use_libbind" in yes) BINDDIR="\${top_srcdir}/bind" + BINDSRCDIR="\${top_srcdir}/bind" ;; no) BINDDIR="\${top_srcdir}/bind" @@@ -669,16 -619,10 +679,16 @@@ ;; *) BINDDIR="$use_libbind" - if test ! -d "bind"; then + if test ! -d "$srcdir/bind"; then # no bind directory, create it with a fake Makefile.in + # (AC_CONFIG_FILES and top Makefile refer to it so + # it must exits) - mkdir bind - cat > bind/Makefile.in << EOF + mkdir $srcdir/bind - echo "# placeholder" > $srcdir/bind/Makefile.in ++ cat > $srcdir/bind/Makefile.in << EOF +# placeholder +all check clean distclean distdir install uninstall: + +EOF fi ;; esac @@@ -788,10 -690,7 +799,12 @@@ AC_CONFIG_FILES( ]) AC_OUTPUT - sh util/bindvar.sh - if test $? -ne 0; then - AC_MSG_ERROR([*** util/bindvar.sh failed]) - fi -(cd $srcdir; sh util/bindvar.sh) ++(cd $srcdir ++ sh util/bindvar.sh ++ if test $? -ne 0; then ++ AC_MSG_ERROR([*** util/bindvar.sh failed]) ++ fi ++) cat > config.report << END diff --cc server/tests/Makefile.am index 2c644bfac,f9b4a245c..65a9f7403 --- a/server/tests/Makefile.am +++ b/server/tests/Makefile.am @@@ -47,11 -47,14 +47,17 @@@ legacy_unittests_LDADD = $(DHCPLIBS) $( load_bal_unittests_SOURCES = $(DHCPSRC) load_bal_unittest.c load_bal_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS) +leaseq_unittests_SOURCES = $(DHCPSRC) leaseq_unittest.c +leaseq_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS) + check: $(ATF_TESTS) - sh ${top_srcdir}/tests/unittest.sh + -cp -n $(top_srcdir)/server/tests/Atffile Atffile + sh ${top_builddir}/tests/unittest.sh + + distclean-local: + @if test $(top_srcdir) != ${top_builddir}; then \ + rm -f Atffile; \ + fi endif diff --cc server/tests/Makefile.in index 8a5049f2d,3041c8ccb..0306a7300 --- a/server/tests/Makefile.in +++ b/server/tests/Makefile.in @@@ -1024,18 -981,17 +1027,19 @@@ uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am +.PRECIOUS: Makefile + # for autotools debugging only info: