Commit 0cd94b5e authored by Thomas Markwalder's avatar Thomas Markwalder

[#64,!35] Restored work

    Restored cummulative work.
parent 97c15527
*.lo
*.o
bind
doc/html
.deps
Makefile
......
This diff is collapsed.
......@@ -40,6 +40,8 @@ endif
# to fool automake when the bind directory does not exist.
SUBDIRS = @BINDSUBDIR@ includes tests common omapip client dhcpctl relay server
DIST_SUBDIRS = $(SUBDIRS) keama
nobase_include_HEADERS = dhcpctl/dhcpctl.h
#
......
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -166,7 +166,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
......@@ -187,7 +187,6 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/doc/devel/doxyfile.in README compile \
config.guess config.sub depcomp install-sh missing
......@@ -390,6 +389,7 @@ EXTRA_DIST = RELNOTES LICENSE configure.ac+lt config+lt \
# Use an autoconf substitution vs an automake conditional here
# to fool automake when the bind directory does not exist.
SUBDIRS = @BINDSUBDIR@ includes tests common omapip client dhcpctl relay server
DIST_SUBDIRS = $(SUBDIRS) keama
nobase_include_HEADERS = dhcpctl/dhcpctl.h
#
......@@ -558,7 +558,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
......@@ -623,7 +626,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
......@@ -649,7 +652,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
......@@ -667,7 +670,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
......@@ -677,7 +680,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
......
......@@ -92,7 +92,7 @@ by Eric Young (eay@cryptsoft.com).
- A new configuration parameter, ping-cltt-secs (v4 operation only), has
been added to allow the user to specify the number of seconds that must
elapse since CLTT before a ping check is conducted. Prior to this, the
value was hard coded at 60 seconds. Please see the server man pages for
value was hard coded at 60 seconds. Please see the server man pages for
a more detailed discussion.
[ISC-Bugs #36283]
......@@ -102,7 +102,7 @@ by Eric Young (eay@cryptsoft.com).
than in seconds (via ping-timeout). When greater than zero, the value
of ping-timeout-ms will override the value of ping-timeout. Thanks
to Jay Doran from Bluecat Networks for suggesting this feature.
[ISC-Bugs #10,!6 git ebe4f7ae427fa91f561a0b6e5f242de08d319a16]
[Gitlab #10]
Changes since 4.4.1 (Bug Fixes)
......@@ -115,7 +115,7 @@ by Eric Young (eay@cryptsoft.com).
- Bind9 now defaults to requiring python to build. The Makefile for
building Bind9 when bundled with ISC DHCP was modified to turn off
this dependency.
[ISC-Bugs #3,!1 git cc35f84943df44dac2499f3e16e8aaba7d54191d]
[Gitlab #3]
- Corrected a dual-stack mixed-mode issue that occurs when both
ddns-guard-id-must-match and ddns-other-guard-is-dynamic
......@@ -123,21 +123,71 @@ by Eric Young (eay@cryptsoft.com).
the presence of a guard record belonging to another client as
a case of no guard record at all. Thanks to Fernando Soto
from BlueCat Networks for reporting this issue.
[ISC-Bugs #1,!2 git 9ef78585440f568da2a2a0093a8c40c49118e292]
[Gitlab #1]
- Corrected a compilation issue that occurred when building without DNS
update ability (e.g. by undefining NSUPDATE).
[ISC-Bugs #16,!9 git ddb508ac083dae4ff83279dd240bad7f73a97b7d]
[Gitlab #16]
- Corrected an issue that was causing the server, when running in
DHPCv4 mode, to segfault when class lease limits are reached.
Thanks to Peter Nagy at Porion-Digital for reporting the matter
and submitting a patch.
[ISC-Bugs #13,!7 git dfcbe359ab278cad70015994ca73ef50d626b23a]
[Gitlab #13]
- Made minor changes to eliminate warnings when compiled with GCC 9.
Thanks to Brett Neumeier for bringing the matter to our attention.
[ISC-Bugs #15,!10 git c138f38bd00ceca4e1e51a4db7542a15ef79babd]
[Gitlab #15]
- Fixed potential memory leaks in parser error message generation
spotted by Coverity, CIDs: 1448191, 1448193, 1448194, 1448195
[Gitlab #30]
- Updated URL of IEEE oui.txt in contrib/dhcp-lease-list.pl. Thanks
to Tommy Smith for contributing the patch.
[Gitlab #26]
- Fixed define flags when using SO_BINDTODEVICE. Thanks to Joe LeVeque for
reporting the issue.
[GitLab #19]
- Applied a patch from OpenBSD to always set the scope id of outbound
DHPCv6 packets. Note this change only applies when compiling under
OpenBSD. Thanks to Brad Smith at OpenBSD from bringing it to our
attention.
[Gitlab #33]
- Modified dhclient to not discard config file leases that are
duplicates of server-provided leases and to retain such leases
after they have been used as the fallback active lease and
DHCP service has been restored. This allows them to be used
more than once during the lifetime of a dhclient instance.
This applies to DHCPv4 operation only.
[Gitlab #9]
- Corrected a number of reference counter and zero-length buffer leaks.
[Gitlab #57]
- Closed a small window of time between the installation of graceful
shutdown signal handlers and application context startup, during which
the receipt of shutdown signal would cause a REQUIRE() assertion to
occur. Note this issue is only visible when compiling with
ENABLE_GENTLE_SHUTDOWN defined.
[Gitlab #53]
- Corrected a buffer overflow that can occur when retrieving zone
names that are more than 255 characters in length.
[Gitlab #20]
- The "d" domain name option format was incorrectly handled as text
instead of RFC 1035 wire format. Thanks to Jay Doran at BlueCat Networks
for reporting this issue.
[Gitlab #2]
- Improved the error message issued when a host declaration has both
a uid and a dhcp-client-identifier. Server configuration parsing will
now fail if a host declaration specifies more than one uid.
[Gitlab #7]
Changes since 4.4.0 (New Features)
- none
......
This diff is collapsed.
#
# Copyright (C) 2009-2018 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# Configure and build the bind libraries for use by DHCP
binddir=@BINDDIR@
bindsrcdir=@BINDSRCDIR@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindconfig = --without-openssl --without-libxml2 --without-libjson \
--without-gssapi --disable-threads --without-lmdb \
--includedir=@includedir@ --libdir=@libdir@ --without-python\
@BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
@BIND_ATF_FALSE@cleandirs = ./lib ./include
@BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
cleanfiles = ./configure.log ./build.log ./install.log
bindlibs = isc dns isccfg irs
installdirs = includedir=${binddir}/include libdir=${binddir}/lib
@BIND_ATF_FALSE@all: bind1 bind2
@BIND_ATF_TRUE@all: bind1 atf bind2
bind1:
# Extract the source from the tarball, if it hasn't been already.
@if test -d ${bindsrcdir} ; then \
echo ${bindsrcdir} already unpacked... ; \
else \
gunzip -c bind.tar.gz | tar xf - ; \
fi
# Configure the libraries
# Currently disable the epoll, devpoll and kqueue options as they
# don't interact well with the DHCP code.
# If the top-level Bind Makefile exists we skip the configuration step
# as we assume it's done and won't change. Doing a make clean will
# reset things if necessary.
@if test -f ${bindsrcdir}/Makefile ; then \
echo Bind libraries already configured ; \
else \
echo Configuring BIND libraries for DHCP. ; \
rm -rf ${cleandirs} ${cleanfiles} ; \
(cd ${bindsrcdir} && \
./configure ${bindconfig} > ${binddir}/configure.log); \
fi
atf:
# Build and copy the ATF support if not yet installed.
@if test -d ./atf ; then \
echo ATF support already installed ; \
else \
echo Building ATF support ; \
(cd ${bindsrcdir}/unit; \
$(MAKE) atf > ${binddir}/build.log ; \
cp -rp atf ${binddir}) ; \
fi
bind2:
# Build and install the libraries
# No need to do anything if we already have something installed.
@if test -d ${binddir}/lib ; then \
echo Bind libraries already installed ; \
else \
echo Building BIND libraries - this takes some time. ; \
for libdir in ${bindlibs} ; do \
(cd ${bindsrcdir}/lib/$$libdir ; \
echo Building $$libdir library in `pwd` ; \
$(MAKE) all >> ${binddir}/build.log) ; \
done ; \
\
echo Installing BIND libraries to ${binddir}. ; \
for libdir in ${bindlibs} ; do \
(cd ${bindsrcdir}/lib/$$libdir ; \
MAKEDEFS="${installdirs}"; export MAKEDEFS; \
$(MAKE) ${installdirs} LIBTOOL_MODE_INSTALL= install >> \
${binddir}/install.log) ; \
done ; \
fi
clean:
@echo Cleaning BIND library.
rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
@INSTALL_BIND_FALSE@install:
@INSTALL_BIND_TRUE@install: install-bind
install-bind: all
@for libdir in ${bindlibs} ; do \
(cd ${bindsrcdir}/lib/$$libdir ; \
$(MAKE) install) ; \
done
@INSTALL_BIND_FALSE@uninstall:
@INSTALL_BIND_TRUE@uninstall: uninstall-bind
uninstall-bind: all
@for libdir in ${bindlibs} ; do \
(cd ${bindsrcdir}/lib/$$libdir ; \
$(MAKE) uninstall) ; \
done
# Include the following so that this Makefile is happy when the parent
# tries to use them.
check distdir distclean dvi installcheck:
# This file must follow /bin/sh rules. It is imported directly via
# configure.
#
PRODUCT=BIND
DESCRIPTION="(Extended Support Version)"
MAJORVER=9
MINORVER=11
PATCHVER=8
RELEASETYPE=
RELEASEVER=
EXTENSIONS=
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -122,7 +122,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/client_tables.Po \
./$(DEPDIR)/clparse.Po ./$(DEPDIR)/dhc6.Po \
./$(DEPDIR)/dhclient.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
......@@ -190,7 +193,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
......@@ -404,8 +407,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
......@@ -469,10 +472,16 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_tables.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clparse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhc6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhclient.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_tables.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clparse.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhc6.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhclient.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......@@ -694,7 +703,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
......@@ -792,7 +804,10 @@ clean: clean-recursive
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/client_tables.Po
-rm -f ./$(DEPDIR)/clparse.Po
-rm -f ./$(DEPDIR)/dhc6.Po
-rm -f ./$(DEPDIR)/dhclient.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
......@@ -838,7 +853,10 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/client_tables.Po
-rm -f ./$(DEPDIR)/clparse.Po
-rm -f ./$(DEPDIR)/dhc6.Po
-rm -f ./$(DEPDIR)/dhclient.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
......@@ -861,21 +879,22 @@ uninstall-man: uninstall-man5 uninstall-man8
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-sbinPROGRAMS 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-dist_sysconfDATA install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man5 \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS 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 uninstall-dist_sysconfDATA uninstall-man \
uninstall-man5 uninstall-man8 uninstall-sbinPROGRAMS
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--depfiles check check-am clean clean-generic \
clean-sbinPROGRAMS 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-dist_sysconfDATA \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-man5 install-man8 install-pdf \
install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
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 \
uninstall-dist_sysconfDATA uninstall-man uninstall-man5 \
uninstall-man8 uninstall-sbinPROGRAMS
.PRECIOUS: Makefile
......
......@@ -3,7 +3,7 @@
Parser for dhclient config and lease files... */
/*
* Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* This Source Code Form is subject to the terms of the Mozilla Public
......@@ -47,6 +47,9 @@ static struct dhc6_addr *parse_client6_iaprefix_statement(struct parse *cfile);
static void parse_lease_id_format (struct parse *cfile);
extern void discard_duplicate (struct client_lease** lease_list,
struct client_lease* lease);
/* client-conf-file :== client-declarations END_OF_FILE
client-declarations :== <nil>
| client-declaration
......@@ -1096,7 +1099,7 @@ void parse_client_lease_statement (cfile, is_static)
struct parse *cfile;
int is_static;
{
struct client_lease *lease, *lp, *pl, *next;
struct client_lease *lease;
struct interface_info *ip = (struct interface_info *)0;
int token;
const char *val;
......@@ -1154,22 +1157,11 @@ void parse_client_lease_statement (cfile, is_static)
/* The new lease may supersede a lease that's not the
active lease but is still on the lease list, so scan the
lease list looking for a lease with the same address, and
if we find it, toss it. */
pl = (struct client_lease *)0;
for (lp = client -> leases; lp; lp = next) {
next = lp -> next;
if (lp -> address.len == lease -> address.len &&
!memcmp (lp -> address.iabuf, lease -> address.iabuf,
lease -> address.len)) {
if (pl)
pl -> next = next;
else
client -> leases = next;