4.3.0a1: requires bind-9.9.5
This commit is contained in:
parent
e3ee5b17e9
commit
e83fb19c51
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,3 +17,4 @@
|
||||
/dhcp-4.2.4-P2.tar.gz
|
||||
/dhcp-4.2.5rc1.tar.gz
|
||||
/dhcp-4.2.5.tar.gz
|
||||
/dhcp-4.3.0a1.tar.gz
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -up dhcp-4.2.0/common/dispatch.c.dracut dhcp-4.2.0/common/dispatch.c
|
||||
--- dhcp-4.2.0/common/dispatch.c.dracut 2010-06-01 19:29:59.000000000 +0200
|
||||
+++ dhcp-4.2.0/common/dispatch.c 2010-07-21 16:10:09.000000000 +0200
|
||||
@@ -189,6 +189,10 @@ void add_timeout (when, where, what, ref
|
||||
isc_interval_t interval;
|
||||
isc_time_t expires;
|
||||
|
||||
+ if (when == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* See if this timeout supersedes an existing timeout. */
|
||||
t = (struct timeout *)0;
|
||||
for (q = timeouts; q; q = q->next) {
|
@ -1,12 +0,0 @@
|
||||
diff -up dhcp-4.2.0/client/dhclient.c.logpid dhcp-4.2.0/client/dhclient.c
|
||||
--- dhcp-4.2.0/client/dhclient.c.logpid 2010-07-21 16:13:52.000000000 +0200
|
||||
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 16:16:51.000000000 +0200
|
||||
@@ -154,7 +154,7 @@ main(int argc, char **argv) {
|
||||
else if (fd != -1)
|
||||
close(fd);
|
||||
|
||||
- openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
|
||||
+ openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
|
||||
|
||||
#if !(defined(DEBUG) || defined(__CYGWIN32__))
|
||||
setlogmask(LOG_UPTO(LOG_INFO));
|
@ -1,11 +0,0 @@
|
||||
diff -up dhcp-4.2.3-P2/server/dhcpd.c.log_perror dhcp-4.2.3-P2/server/dhcpd.c
|
||||
--- dhcp-4.2.3-P2/server/dhcpd.c.log_perror 2012-02-22 14:24:57.000000000 +0100
|
||||
+++ dhcp-4.2.3-P2/server/dhcpd.c 2012-02-22 14:29:09.964576687 +0100
|
||||
@@ -315,6 +315,7 @@ main(int argc, char **argv) {
|
||||
#ifndef DEBUG
|
||||
daemon = 0;
|
||||
#endif
|
||||
+ log_perror = 0;
|
||||
} else if (!strcmp (argv [i], "-d")) {
|
||||
#ifndef DEBUG
|
||||
daemon = 0;
|
@ -1,46 +0,0 @@
|
||||
diff -up dhcp-4.2.4-P1/configure.ac.remove-dst dhcp-4.2.4-P1/configure.ac
|
||||
--- dhcp-4.2.4-P1/configure.ac.remove-dst 2012-08-17 15:24:29.066454140 +0200
|
||||
+++ dhcp-4.2.4-P1/configure.ac 2012-08-17 15:24:29.071454073 +0200
|
||||
@@ -608,7 +608,6 @@ AC_OUTPUT([
|
||||
common/Makefile
|
||||
common/tests/Makefile
|
||||
dhcpctl/Makefile
|
||||
- dst/Makefile
|
||||
includes/Makefile
|
||||
omapip/Makefile
|
||||
relay/Makefile
|
||||
diff -up dhcp-4.2.4-P1/includes/Makefile.am.remove-dst dhcp-4.2.4-P1/includes/Makefile.am
|
||||
--- dhcp-4.2.4-P1/includes/Makefile.am.remove-dst 2012-07-13 08:17:54.000000000 +0200
|
||||
+++ dhcp-4.2.4-P1/includes/Makefile.am 2012-08-17 15:25:08.253922458 +0200
|
||||
@@ -1,7 +1,6 @@
|
||||
nobase_include_HEADERS = omapip/alloc.h omapip/buffer.h omapip/convert.h \
|
||||
omapip/hash.h omapip/isclib.h omapip/omapip.h \
|
||||
- omapip/omapip_p.h omapip/result.h omapip/trace.h \
|
||||
- isc-dhcp/dst.h
|
||||
+ omapip/omapip_p.h omapip/result.h omapip/trace.h
|
||||
|
||||
EXTRA_DIST = cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
|
||||
heap.h inet.h minires.h osdep.h site.h statement.h tree.h \
|
||||
diff -up dhcp-4.2.4-P1/Makefile.am.remove-dst dhcp-4.2.4-P1/Makefile.am
|
||||
--- dhcp-4.2.4-P1/Makefile.am.remove-dst 2012-08-17 15:24:29.067454126 +0200
|
||||
+++ dhcp-4.2.4-P1/Makefile.am 2012-08-17 15:24:29.071454073 +0200
|
||||
@@ -27,7 +27,7 @@ else
|
||||
SUBDIRS =
|
||||
endif
|
||||
|
||||
-SUBDIRS += includes tests common dst omapip client dhcpctl relay server
|
||||
+SUBDIRS += includes tests common omapip client dhcpctl relay server
|
||||
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.2.4-P1/server/ddns.c.remove-dst dhcp-4.2.4-P1/server/ddns.c
|
||||
--- dhcp-4.2.4-P1/server/ddns.c.remove-dst 2012-07-13 08:18:05.000000000 +0200
|
||||
+++ dhcp-4.2.4-P1/server/ddns.c 2012-08-17 15:24:29.072454060 +0200
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
|
||||
#include "dhcpd.h"
|
||||
-#include "dst/md5.h"
|
||||
#include <dns/result.h>
|
||||
|
||||
#ifdef NSUPDATE
|
@ -1,12 +0,0 @@
|
||||
diff -up dhcp-4.2.4-P2/common/conflex.c.orig dhcp-4.2.4-P2/common/conflex.c
|
||||
--- dhcp-4.2.4-P2/common/conflex.c.orig 2012-08-28 04:13:03.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/common/conflex.c 2012-10-09 14:01:29.922104149 +0200
|
||||
@@ -889,7 +889,7 @@ intern(char *atom, enum dhcp_token dfv)
|
||||
if (!strcasecmp(atom + 7, "list"))
|
||||
return DOMAIN_LIST;
|
||||
}
|
||||
- if (!strcasecmp (atom + 1, "o-forward-update"))
|
||||
+ if (!strcasecmp (atom + 1, "o-forward-updates"))
|
||||
return DO_FORWARD_UPDATE;
|
||||
if (!strcasecmp (atom + 1, "ebug"))
|
||||
return TOKEN_DEBUG;
|
@ -1,13 +0,0 @@
|
||||
diff -up dhcp-4.2.4-P2/common/parse.c.dupl-key dhcp-4.2.4-P2/common/parse.c
|
||||
--- dhcp-4.2.4-P2/common/parse.c.dupl-key 2012-11-16 15:31:30.568561745 +0100
|
||||
+++ dhcp-4.2.4-P2/common/parse.c 2012-11-16 15:31:30.577561619 +0100
|
||||
@@ -2893,6 +2893,9 @@ int parse_zone (struct dns_zone *zone, s
|
||||
}
|
||||
val = key_name;
|
||||
}
|
||||
+ if (zone->key)
|
||||
+ log_fatal("Multiple key definition for zone %s.",
|
||||
+ zone->name);
|
||||
if (omapi_auth_key_lookup_name (&zone -> key, val) !=
|
||||
ISC_R_SUCCESS)
|
||||
parse_warn (cfile, "unknown key %s", val);
|
@ -1,164 +0,0 @@
|
||||
diff -up dhcp-4.2.5b1/client/Makefile.am.remove-bind dhcp-4.2.5b1/client/Makefile.am
|
||||
--- dhcp-4.2.5b1/client/Makefile.am.remove-bind 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/client/Makefile.am 2012-12-17 16:20:58.692538252 +0100
|
||||
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind dhcp-4.2.5b1/common/tests/Makefile.am
|
||||
--- dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/common/tests/Makefile.am 2012-12-17 16:20:58.693538239 +0100
|
||||
@@ -13,8 +13,8 @@ ATF_TESTS += alloc_unittest
|
||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
alloc_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a ../../bind/lib/libdns.a \
|
||||
- ../../bind/lib/libisc.a
|
||||
+ ../../omapip/libomapi.a \
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
check: $(ATF_TESTS)
|
||||
atf-run | atf-report
|
||||
diff -up dhcp-4.2.5b1/configure.ac.remove-bind dhcp-4.2.5b1/configure.ac
|
||||
--- dhcp-4.2.5b1/configure.ac.remove-bind 2012-12-05 02:18:44.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/configure.ac 2012-12-17 16:20:58.693538239 +0100
|
||||
@@ -581,20 +581,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
|
||||
libbind=
|
||||
AC_ARG_WITH(libbind,
|
||||
AC_HELP_STRING([--with-libbind=PATH],
|
||||
- [bind includes and libraries are in PATH
|
||||
- (default is ./bind)]),
|
||||
+ [bind includes are in PATH
|
||||
+ (default is ./bind/includes)]),
|
||||
use_libbind="$withval", use_libbind="no")
|
||||
case "$use_libbind" in
|
||||
+yes|no)
|
||||
+ libbind="\${top_srcdir}/bind/include"
|
||||
+ ;;
|
||||
+*)
|
||||
+ libbind="$use_libbind"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
|
||||
+AC_ARG_WITH(libbind-libs,
|
||||
+ AC_HELP_STRING([--with-libbind-libs=PATH],
|
||||
+ [bind9 export libraries are in PATH]),
|
||||
+ [libbind_libs="$withval"], [libbind_libs='no'])
|
||||
+case "$libbind_libs" in
|
||||
yes)
|
||||
- libbind="\${top_srcdir}/bind"
|
||||
+ AC_MSG_ERROR([Specify path to bind9 libraries])
|
||||
;;
|
||||
no)
|
||||
- libbind="\${top_srcdir}/bind"
|
||||
+ BUNDLED_BIND=yes
|
||||
;;
|
||||
*)
|
||||
- libbind="$use_libbind"
|
||||
+ BIND9_LIBDIR="-L$libbind_libs"
|
||||
+ BUNDLED_BIND=no
|
||||
;;
|
||||
esac
|
||||
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
|
||||
+AC_SUBST([BIND9_LIBDIR])
|
||||
|
||||
# OpenLDAP support.
|
||||
AC_ARG_WITH(ldap,
|
||||
@@ -631,7 +648,7 @@ fi
|
||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||
|
||||
# Try to add the bind include directory
|
||||
-CFLAGS="$CFLAGS -I$libbind/include"
|
||||
+CFLAGS="$CFLAGS -I$libbind"
|
||||
|
||||
AC_C_FLEXIBLE_ARRAY_MEMBER
|
||||
|
||||
diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind dhcp-4.2.5b1/dhcpctl/Makefile.am
|
||||
--- dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/dhcpctl/Makefile.am 2012-12-17 16:20:58.693538239 +0100
|
||||
@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
|
||||
|
||||
omshell_SOURCES = omshell.c
|
||||
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||
|
||||
cltest_SOURCES = cltest.c
|
||||
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
\ No newline at end of file
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
diff -up dhcp-4.2.5b1/Makefile.am.remove-bind dhcp-4.2.5b1/Makefile.am
|
||||
--- dhcp-4.2.5b1/Makefile.am.remove-bind 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/Makefile.am 2012-12-17 16:20:58.693538239 +0100
|
||||
@@ -22,7 +22,13 @@ EXTRA_DIST = RELNOTES LICENSE \
|
||||
bind/Makefile bind/bind.tar.gz bind/version.tmp \
|
||||
common/tests/Atffile server/tests/Atffile
|
||||
|
||||
-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
|
||||
+if BUNDLED_BIND
|
||||
+SUBDIRS = bind
|
||||
+else
|
||||
+SUBDIRS =
|
||||
+endif
|
||||
+
|
||||
+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
|
||||
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.2.5b1/omapip/Makefile.am.remove-bind dhcp-4.2.5b1/omapip/Makefile.am
|
||||
--- dhcp-4.2.5b1/omapip/Makefile.am.remove-bind 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/omapip/Makefile.am 2012-12-17 16:20:58.693538239 +0100
|
||||
@@ -10,5 +10,5 @@ man_MANS = omapi.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
-svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
diff -up dhcp-4.2.5b1/relay/Makefile.am.remove-bind dhcp-4.2.5b1/relay/Makefile.am
|
||||
--- dhcp-4.2.5b1/relay/Makefile.am.remove-bind 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/relay/Makefile.am 2012-12-17 16:20:58.694538225 +0100
|
||||
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.2.5b1/server/Makefile.am.remove-bind dhcp-4.2.5b1/server/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/Makefile.am.remove-bind 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/server/Makefile.am 2012-12-17 16:20:58.694538225 +0100
|
||||
@@ -14,8 +14,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisc.a
|
||||
+ ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind dhcp-4.2.5b1/server/tests/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/server/tests/Makefile.am 2012-12-17 16:26:01.093346768 +0100
|
||||
@@ -18,8 +18,7 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||
../ldap.c ../ldap_casa.c ../dhcpd.c
|
||||
|
||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libdns.a \
|
||||
- $(top_builddir)/bind/lib/libisc.a
|
||||
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
ATF_TESTS =
|
||||
TESTS =
|
@ -1,120 +0,0 @@
|
||||
diff -up dhcp-4.2.5b1/client/Makefile.am.sharedlib dhcp-4.2.5b1/client/Makefile.am
|
||||
--- dhcp-4.2.5b1/client/Makefile.am.sharedlib 2012-12-17 16:26:53.350623790 +0100
|
||||
+++ dhcp-4.2.5b1/client/Makefile.am 2012-12-17 16:26:53.384623342 +0100
|
||||
@@ -4,7 +4,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib dhcp-4.2.5b1/common/tests/Makefile.am
|
||||
--- dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib 2012-12-17 16:26:53.271624835 +0100
|
||||
+++ dhcp-4.2.5b1/common/tests/Makefile.am 2012-12-17 16:26:53.384623342 +0100
|
||||
@@ -13,7 +13,7 @@ ATF_TESTS += alloc_unittest
|
||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
alloc_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a \
|
||||
+ ../../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
check: $(ATF_TESTS)
|
||||
diff -up dhcp-4.2.5b1/configure.ac.sharedlib dhcp-4.2.5b1/configure.ac
|
||||
--- dhcp-4.2.5b1/configure.ac.sharedlib 2012-12-17 16:26:53.350623790 +0100
|
||||
+++ dhcp-4.2.5b1/configure.ac 2012-12-17 16:26:53.384623342 +0100
|
||||
@@ -37,7 +37,8 @@ fi
|
||||
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
-AC_PROG_RANLIB
|
||||
+# Use libtool to simplify building of shared libraries
|
||||
+AC_PROG_LIBTOOL
|
||||
AC_CONFIG_HEADERS([includes/config.h])
|
||||
|
||||
# we sometimes need to know byte order for building packets
|
||||
diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib dhcp-4.2.5b1/dhcpctl/Makefile.am
|
||||
--- dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib 2012-12-17 16:26:53.271624835 +0100
|
||||
+++ dhcp-4.2.5b1/dhcpctl/Makefile.am 2012-12-17 16:26:53.385623329 +0100
|
||||
@@ -1,15 +1,15 @@
|
||||
bin_PROGRAMS = omshell
|
||||
-lib_LIBRARIES = libdhcpctl.a
|
||||
+lib_LTLIBRARIES = libdhcpctl.la
|
||||
noinst_PROGRAMS = cltest
|
||||
man_MANS = omshell.1 dhcpctl.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
omshell_SOURCES = omshell.c
|
||||
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
|
||||
|
||||
cltest_SOURCES = cltest.c
|
||||
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
diff -up dhcp-4.2.5b1/omapip/Makefile.am.sharedlib dhcp-4.2.5b1/omapip/Makefile.am
|
||||
--- dhcp-4.2.5b1/omapip/Makefile.am.sharedlib 2012-12-17 16:26:53.272624822 +0100
|
||||
+++ dhcp-4.2.5b1/omapip/Makefile.am 2012-12-17 16:26:53.385623329 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
-lib_LIBRARIES = libomapi.a
|
||||
+lib_LTLIBRARIES = libomapi.la
|
||||
noinst_PROGRAMS = svtest
|
||||
|
||||
-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
||||
+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
||||
errwarn.c listener.c dispatch.c generic.c support.c \
|
||||
handle.c message.c convert.c hash.c auth.c inet_addr.c \
|
||||
array.c trace.c toisc.c iscprint.c isclib.c
|
||||
@@ -10,5 +10,5 @@ man_MANS = omapi.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
-svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+svtest_LDADD = libomapi.la $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
diff -up dhcp-4.2.5b1/relay/Makefile.am.sharedlib dhcp-4.2.5b1/relay/Makefile.am
|
||||
--- dhcp-4.2.5b1/relay/Makefile.am.sharedlib 2012-12-17 16:26:53.351623777 +0100
|
||||
+++ dhcp-4.2.5b1/relay/Makefile.am 2012-12-17 16:26:53.385623329 +0100
|
||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.2.5b1/server/Makefile.am.sharedlib dhcp-4.2.5b1/server/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/Makefile.am.sharedlib 2012-12-17 16:26:53.272624822 +0100
|
||||
+++ dhcp-4.2.5b1/server/Makefile.am 2012-12-17 16:26:53.385623329 +0100
|
||||
@@ -13,8 +13,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
+ ../dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib dhcp-4.2.5b1/server/tests/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib 2012-12-17 16:26:53.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/server/tests/Makefile.am 2012-12-17 16:28:25.898349545 +0100
|
||||
@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
|
||||
../ldap.c ../ldap_casa.c ../dhcpd.c
|
||||
|
||||
-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
|
||||
+ $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
ATF_TESTS =
|
||||
TESTS =
|
@ -1,23 +0,0 @@
|
||||
diff -up dhcp-4.2.5b1/configure.ac.pkgconfig dhcp-4.2.5b1/configure.ac
|
||||
--- dhcp-4.2.5b1/configure.ac.pkgconfig 2012-12-05 02:18:44.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/configure.ac 2012-12-17 15:45:33.769128387 +0100
|
||||
@@ -194,6 +194,9 @@ if test "$atf_path" != "no" ; then
|
||||
if test -f $atf_path/lib/pkgconfig/atf-c.pc ; then
|
||||
atf_pcp=$atf_path/lib/pkgconfig
|
||||
fi
|
||||
+ if test -f $atf_path/lib64/pkgconfig/atf-c.pc ; then
|
||||
+ atf_pcp=$atf_path/lib64/pkgconfig
|
||||
+ fi
|
||||
else
|
||||
# Not specified, try some common paths
|
||||
atf_dirs="/usr /usr/local /usr/pkg /opt /opt/local"
|
||||
@@ -202,6 +205,9 @@ if test "$atf_path" != "no" ; then
|
||||
if test -f $d/lib/pkgconfig/atf-c.pc ; then
|
||||
atf_pcp=$d/lib/pkgconfig
|
||||
fi
|
||||
+ if test -f $d/lib64/pkgconfig/atf-c.pc ; then
|
||||
+ atf_pcp=$d/lib64/pkgconfig
|
||||
+ fi
|
||||
done
|
||||
fi
|
||||
if test "$atf_pcp" = "" ; then
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c
|
||||
--- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse 2012-03-09 12:28:10.000000000 +0100
|
||||
+++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:30:55.867045149 +0200
|
||||
@@ -906,8 +906,8 @@ TIME
|
||||
diff -up dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse dhcp-4.3.0a1/common/parse.c
|
||||
--- dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/parse.c 2013-12-19 15:45:25.990771814 +0100
|
||||
@@ -938,8 +938,8 @@ TIME
|
||||
parse_date_core(cfile)
|
||||
struct parse *cfile;
|
||||
{
|
||||
@ -12,16 +12,16 @@ diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/pars
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
static int months[11] = { 31, 59, 90, 120, 151, 181,
|
||||
@@ -933,7 +933,7 @@ parse_date_core(cfile)
|
||||
@@ -965,7 +965,7 @@ parse_date_core(cfile)
|
||||
}
|
||||
|
||||
token = next_token(&val, NULL, cfile); /* consume number */
|
||||
skip_token(&val, NULL, cfile); /* consume number */
|
||||
- guess = atoi(val);
|
||||
+ guess = atol(val);
|
||||
|
||||
return((TIME)guess);
|
||||
}
|
||||
@@ -961,7 +961,7 @@ parse_date_core(cfile)
|
||||
@@ -993,7 +993,7 @@ parse_date_core(cfile)
|
||||
somebody invents a time machine, I think we can safely disregard
|
||||
it. This actually works around a stupid Y2K bug that was present
|
||||
in a very early beta release of dhcpd. */
|
||||
@ -30,55 +30,46 @@ diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/pars
|
||||
if (year > 1900)
|
||||
year -= 1900;
|
||||
|
||||
@@ -985,7 +985,7 @@ parse_date_core(cfile)
|
||||
@@ -1039,7 +1039,7 @@ parse_date_core(cfile)
|
||||
return((TIME)0);
|
||||
}
|
||||
token = next_token(&val, NULL, cfile); /* consume month */
|
||||
- mon = atoi(val) - 1;
|
||||
+ mon = atol(val) - 1;
|
||||
|
||||
/* Slash separating month from day... */
|
||||
token = peek_token(&val, NULL, cfile);
|
||||
@@ -1007,7 +1007,7 @@ parse_date_core(cfile)
|
||||
return((TIME)0);
|
||||
}
|
||||
token = next_token(&val, NULL, cfile); /* consume day of month */
|
||||
skip_token(&val, NULL, cfile); /* consume day of month */
|
||||
- mday = atoi(val);
|
||||
+ mday = atol(val);
|
||||
|
||||
/* Hour... */
|
||||
token = peek_token(&val, NULL, cfile);
|
||||
@@ -1018,7 +1018,7 @@ parse_date_core(cfile)
|
||||
@@ -1050,7 +1050,7 @@ parse_date_core(cfile)
|
||||
return((TIME)0);
|
||||
}
|
||||
token = next_token(&val, NULL, cfile); /* consume hour */
|
||||
skip_token(&val, NULL, cfile); /* consume hour */
|
||||
- hour = atoi(val);
|
||||
+ hour = atol(val);
|
||||
|
||||
/* Colon separating hour from minute... */
|
||||
token = peek_token(&val, NULL, cfile);
|
||||
@@ -1040,7 +1040,7 @@ parse_date_core(cfile)
|
||||
@@ -1072,7 +1072,7 @@ parse_date_core(cfile)
|
||||
return((TIME)0);
|
||||
}
|
||||
token = next_token(&val, NULL, cfile); /* consume minute */
|
||||
skip_token(&val, NULL, cfile); /* consume minute */
|
||||
- min = atoi(val);
|
||||
+ min = atol(val);
|
||||
|
||||
/* Colon separating minute from second... */
|
||||
token = peek_token(&val, NULL, cfile);
|
||||
@@ -1062,13 +1062,13 @@ parse_date_core(cfile)
|
||||
@@ -1094,13 +1094,13 @@ parse_date_core(cfile)
|
||||
return((TIME)0);
|
||||
}
|
||||
token = next_token(&val, NULL, cfile); /* consume second */
|
||||
skip_token(&val, NULL, cfile); /* consume second */
|
||||
- sec = atoi(val);
|
||||
+ sec = atol(val);
|
||||
|
||||
tzoff = 0;
|
||||
token = peek_token(&val, NULL, cfile);
|
||||
if (token == NUMBER) {
|
||||
token = next_token(&val, NULL, cfile); /* consume tzoff */
|
||||
skip_token(&val, NULL, cfile); /* consume tzoff */
|
||||
- tzoff = atoi(val);
|
||||
+ tzoff = atol(val);
|
||||
} else if (token != SEMI) {
|
||||
token = next_token(&val, NULL, cfile);
|
||||
skip_token(&val, NULL, cfile);
|
||||
parse_warn(cfile,
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
|
||||
--- dhcp-4.2.2b1/client/clparse.c.cloexec 2011-07-01 14:13:30.973887714 +0200
|
||||
+++ dhcp-4.2.2b1/client/clparse.c 2011-07-01 14:15:15.021580693 +0200
|
||||
@@ -246,7 +246,7 @@ int read_client_conf_file (const char *n
|
||||
diff -up dhcp-4.3.0a1/client/clparse.c.cloexec dhcp-4.3.0a1/client/clparse.c
|
||||
--- dhcp-4.3.0a1/client/clparse.c.cloexec 2013-12-19 15:34:41.638886256 +0100
|
||||
+++ dhcp-4.3.0a1/client/clparse.c 2013-12-19 15:34:41.657885985 +0100
|
||||
@@ -253,7 +253,7 @@ int read_client_conf_file (const char *n
|
||||
int token;
|
||||
isc_result_t status;
|
||||
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
|
||||
return uerr2isc (errno);
|
||||
|
||||
cfile = NULL;
|
||||
@@ -283,7 +283,7 @@ void read_client_leases ()
|
||||
@@ -290,7 +290,7 @@ void read_client_leases ()
|
||||
|
||||
/* Open the lease file. If we can't open it, just return -
|
||||
we can safely trust the server to remember our state. */
|
||||
@ -19,9 +19,9 @@ diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
|
||||
return;
|
||||
|
||||
cfile = NULL;
|
||||
diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
--- dhcp-4.2.2b1/client/dhclient.c.cloexec 2011-07-01 14:13:30.970887717 +0200
|
||||
+++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 14:16:51.485930388 +0200
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.cloexec dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.cloexec 2013-12-19 15:34:41.629886384 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 15:36:41.608180467 +0100
|
||||
@@ -148,11 +148,11 @@ main(int argc, char **argv) {
|
||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||
2 (stderr) are open. To do this, we assume that when we
|
||||
@ -37,16 +37,16 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if (fd == 2)
|
||||
log_perror = 0; /* No sense logging to /dev/null. */
|
||||
else if (fd != -1)
|
||||
@@ -506,7 +506,7 @@ main(int argc, char **argv) {
|
||||
@@ -504,7 +504,7 @@ main(int argc, char **argv) {
|
||||
long temp;
|
||||
int e;
|
||||
|
||||
oldpid = 0;
|
||||
- if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
|
||||
+ if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
|
||||
e = fscanf(pidfd, "%ld\n", &temp);
|
||||
oldpid = (pid_t)temp;
|
||||
|
||||
@@ -548,7 +548,7 @@ main(int argc, char **argv) {
|
||||
@@ -554,7 +554,7 @@ main(int argc, char **argv) {
|
||||
strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
|
||||
sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
|
||||
|
||||
@ -55,7 +55,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
e = fscanf(pidfd, "%ld\n", &temp);
|
||||
oldpid = (pid_t)temp;
|
||||
|
||||
@@ -573,7 +573,7 @@ main(int argc, char **argv) {
|
||||
@@ -579,7 +579,7 @@ main(int argc, char **argv) {
|
||||
int dhc_running = 0;
|
||||
char procfn[256] = "";
|
||||
|
||||
@ -64,7 +64,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
|
||||
snprintf(procfn,256,"/proc/%u",dhcpid);
|
||||
dhc_running = (access(procfn, F_OK) == 0);
|
||||
@@ -2995,7 +2995,7 @@ void rewrite_client_leases ()
|
||||
@@ -3077,7 +3077,7 @@ void rewrite_client_leases ()
|
||||
|
||||
if (leaseFile != NULL)
|
||||
fclose (leaseFile);
|
||||
@ -73,7 +73,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if (leaseFile == NULL) {
|
||||
log_error ("can't create %s: %m", path_dhclient_db);
|
||||
return;
|
||||
@@ -3105,7 +3105,7 @@ write_duid(struct data_string *duid)
|
||||
@@ -3261,7 +3261,7 @@ write_duid(struct data_string *duid)
|
||||
return DHCP_R_INVALIDARG;
|
||||
|
||||
if (leaseFile == NULL) { /* XXX? */
|
||||
@ -82,7 +82,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if (leaseFile == NULL) {
|
||||
log_error("can't create %s: %m", path_dhclient_db);
|
||||
return ISC_R_IOERROR;
|
||||
@@ -3285,7 +3285,7 @@ int write_client_lease (client, lease, r
|
||||
@@ -3441,7 +3441,7 @@ int write_client_lease (client, lease, r
|
||||
return 1;
|
||||
|
||||
if (leaseFile == NULL) { /* XXX */
|
||||
@ -91,20 +91,20 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if (leaseFile == NULL) {
|
||||
log_error ("can't create %s: %m", path_dhclient_db);
|
||||
return 0;
|
||||
@@ -3772,9 +3772,9 @@ void go_daemon ()
|
||||
close(2);
|
||||
@@ -3952,9 +3952,9 @@ void go_daemon ()
|
||||
(void) close(2);
|
||||
|
||||
/* Reopen them on /dev/null. */
|
||||
- open("/dev/null", O_RDWR);
|
||||
- open("/dev/null", O_RDWR);
|
||||
- open("/dev/null", O_RDWR);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
|
||||
write_client_pid_file ();
|
||||
|
||||
@@ -3791,14 +3791,14 @@ void write_client_pid_file ()
|
||||
@@ -3971,14 +3971,14 @@ void write_client_pid_file ()
|
||||
return;
|
||||
}
|
||||
|
||||
@ -121,10 +121,10 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
|
||||
if (!pf) {
|
||||
close(pfdesc);
|
||||
log_error ("Can't fdopen %s: %m", path_dhclient_pid);
|
||||
diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
|
||||
--- dhcp-4.2.2b1/common/bpf.c.cloexec 2011-07-01 14:13:30.976887712 +0200
|
||||
+++ dhcp-4.2.2b1/common/bpf.c 2011-07-01 14:13:31.030887673 +0200
|
||||
@@ -94,7 +94,7 @@ int if_register_bpf (info)
|
||||
diff -up dhcp-4.3.0a1/common/bpf.c.cloexec dhcp-4.3.0a1/common/bpf.c
|
||||
--- dhcp-4.3.0a1/common/bpf.c.cloexec 2013-12-19 15:34:41.640886227 +0100
|
||||
+++ dhcp-4.3.0a1/common/bpf.c 2013-12-19 15:34:41.661885928 +0100
|
||||
@@ -95,7 +95,7 @@ int if_register_bpf (info)
|
||||
for (b = 0; 1; b++) {
|
||||
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
|
||||
sprintf(filename, BPF_FORMAT, b);
|
||||
@ -133,10 +133,10 @@ diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
|
||||
if (sock < 0) {
|
||||
if (errno == EBUSY) {
|
||||
continue;
|
||||
diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
|
||||
--- dhcp-4.2.2b1/common/dlpi.c.cloexec 2011-07-01 14:13:30.977887712 +0200
|
||||
+++ dhcp-4.2.2b1/common/dlpi.c 2011-07-01 14:13:31.032887673 +0200
|
||||
@@ -806,7 +806,7 @@ dlpiopen(const char *ifname) {
|
||||
diff -up dhcp-4.3.0a1/common/dlpi.c.cloexec dhcp-4.3.0a1/common/dlpi.c
|
||||
--- dhcp-4.3.0a1/common/dlpi.c.cloexec 2013-12-19 15:34:41.641886213 +0100
|
||||
+++ dhcp-4.3.0a1/common/dlpi.c 2013-12-19 15:34:41.662885914 +0100
|
||||
@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
|
||||
}
|
||||
*dp = '\0';
|
||||
|
||||
@ -145,9 +145,9 @@ diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
|
||||
}
|
||||
|
||||
/*
|
||||
diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
|
||||
--- dhcp-4.2.2b1/common/nit.c.cloexec 2011-07-01 14:13:30.978887712 +0200
|
||||
+++ dhcp-4.2.2b1/common/nit.c 2011-07-01 14:13:31.033887672 +0200
|
||||
diff -up dhcp-4.3.0a1/common/nit.c.cloexec dhcp-4.3.0a1/common/nit.c
|
||||
--- dhcp-4.3.0a1/common/nit.c.cloexec 2013-12-19 15:34:41.642886199 +0100
|
||||
+++ dhcp-4.3.0a1/common/nit.c 2013-12-19 15:34:41.662885914 +0100
|
||||
@@ -81,7 +81,7 @@ int if_register_nit (info)
|
||||
struct strioctl sio;
|
||||
|
||||
@ -157,10 +157,10 @@ diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
|
||||
if (sock < 0)
|
||||
log_fatal ("Can't open NIT device for %s: %m", info -> name);
|
||||
|
||||
diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
|
||||
--- dhcp-4.2.2b1/common/resolv.c.cloexec 2009-11-20 02:49:01.000000000 +0100
|
||||
+++ dhcp-4.2.2b1/common/resolv.c 2011-07-01 14:13:31.033887672 +0200
|
||||
@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
|
||||
diff -up dhcp-4.3.0a1/common/resolv.c.cloexec dhcp-4.3.0a1/common/resolv.c
|
||||
--- dhcp-4.3.0a1/common/resolv.c.cloexec 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/resolv.c 2013-12-19 15:34:41.663885900 +0100
|
||||
@@ -50,7 +50,7 @@ void read_resolv_conf (parse_time)
|
||||
struct domain_search_list *dp, *dl, *nd;
|
||||
isc_result_t status;
|
||||
|
||||
@ -169,9 +169,9 @@ diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
|
||||
log_error ("Can't open %s: %m", path_resolv_conf);
|
||||
return;
|
||||
}
|
||||
diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
|
||||
--- dhcp-4.2.2b1/common/upf.c.cloexec 2011-07-01 14:13:30.979887712 +0200
|
||||
+++ dhcp-4.2.2b1/common/upf.c 2011-07-01 14:13:31.034887671 +0200
|
||||
diff -up dhcp-4.3.0a1/common/upf.c.cloexec dhcp-4.3.0a1/common/upf.c
|
||||
--- dhcp-4.3.0a1/common/upf.c.cloexec 2013-12-19 15:34:41.642886199 +0100
|
||||
+++ dhcp-4.3.0a1/common/upf.c 2013-12-19 15:34:41.663885900 +0100
|
||||
@@ -77,7 +77,7 @@ int if_register_upf (info)
|
||||
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
|
||||
sprintf(filename, "/dev/pf/pfilt%d", b);
|
||||
@ -181,10 +181,10 @@ diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
|
||||
if (sock < 0) {
|
||||
if (errno == EBUSY) {
|
||||
continue;
|
||||
diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
|
||||
--- dhcp-4.2.2b1/omapip/trace.c.cloexec 2010-05-27 02:34:57.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/omapip/trace.c 2011-07-01 14:13:31.036887669 +0200
|
||||
@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi
|
||||
diff -up dhcp-4.3.0a1/omapip/trace.c.cloexec dhcp-4.3.0a1/omapip/trace.c
|
||||
--- dhcp-4.3.0a1/omapip/trace.c.cloexec 2013-12-11 01:01:03.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/omapip/trace.c 2013-12-19 15:34:41.663885900 +0100
|
||||
@@ -142,10 +142,10 @@ isc_result_t trace_begin (const char *fi
|
||||
return DHCP_R_INVALIDARG;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
|
||||
0600);
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ void trace_file_replay (const char *file
|
||||
@@ -433,7 +433,7 @@ void trace_file_replay (const char *file
|
||||
isc_result_t result;
|
||||
int len;
|
||||
|
||||
@ -206,10 +206,10 @@ diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
|
||||
if (!traceinfile) {
|
||||
log_error("Can't open tracefile %s: %m", filename);
|
||||
return;
|
||||
diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
--- dhcp-4.2.2b1/relay/dhcrelay.c.cloexec 2011-05-10 15:07:37.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/relay/dhcrelay.c 2011-07-01 14:18:07.630209767 +0200
|
||||
@@ -183,11 +183,11 @@ main(int argc, char **argv) {
|
||||
diff -up dhcp-4.3.0a1/relay/dhcrelay.c.cloexec dhcp-4.3.0a1/relay/dhcrelay.c
|
||||
--- dhcp-4.3.0a1/relay/dhcrelay.c.cloexec 2013-12-13 22:26:21.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/relay/dhcrelay.c 2013-12-19 15:34:41.664885886 +0100
|
||||
@@ -193,11 +193,11 @@ main(int argc, char **argv) {
|
||||
/* Make sure that file descriptors 0(stdin), 1,(stdout), and
|
||||
2(stderr) are open. To do this, we assume that when we
|
||||
open a file the lowest available file descriptor is used. */
|
||||
@ -224,7 +224,7 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
if (fd == 2)
|
||||
log_perror = 0; /* No sense logging to /dev/null. */
|
||||
else if (fd != -1)
|
||||
@@ -540,13 +540,13 @@ main(int argc, char **argv) {
|
||||
@@ -564,13 +564,13 @@ main(int argc, char **argv) {
|
||||
|
||||
if (no_pid_file == ISC_FALSE) {
|
||||
pfdesc = open(path_dhcrelay_pid,
|
||||
@ -240,10 +240,10 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
if (!pf)
|
||||
log_error("Can't fdopen %s: %m",
|
||||
path_dhcrelay_pid);
|
||||
diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
|
||||
--- dhcp-4.2.2b1/server/confpars.c.cloexec 2010-10-14 00:34:45.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/server/confpars.c 2011-07-01 14:13:31.039887666 +0200
|
||||
@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char
|
||||
diff -up dhcp-4.3.0a1/server/confpars.c.cloexec dhcp-4.3.0a1/server/confpars.c
|
||||
--- dhcp-4.3.0a1/server/confpars.c.cloexec 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/confpars.c 2013-12-19 15:34:41.665885871 +0100
|
||||
@@ -117,7 +117,7 @@ isc_result_t read_conf_file (const char
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -252,10 +252,10 @@ diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
|
||||
if (leasep) {
|
||||
log_error ("Can't open lease database %s: %m --",
|
||||
path_dhcpd_db);
|
||||
diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
|
||||
--- dhcp-4.2.2b1/server/db.c.cloexec 2010-09-14 00:15:26.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/server/db.c 2011-07-01 14:13:31.040887665 +0200
|
||||
@@ -1035,7 +1035,7 @@ void db_startup (testp)
|
||||
diff -up dhcp-4.3.0a1/server/db.c.cloexec dhcp-4.3.0a1/server/db.c
|
||||
--- dhcp-4.3.0a1/server/db.c.cloexec 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/db.c 2013-12-19 15:34:41.666885857 +0100
|
||||
@@ -1081,7 +1081,7 @@ void db_startup (testp)
|
||||
}
|
||||
#endif
|
||||
if (!testp) {
|
||||
@ -264,7 +264,7 @@ diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
|
||||
if (!db_file)
|
||||
log_fatal ("Can't open %s for append.", path_dhcpd_db);
|
||||
expire_all_pools ();
|
||||
@@ -1083,12 +1083,12 @@ int new_lease_file ()
|
||||
@@ -1129,12 +1129,12 @@ int new_lease_file ()
|
||||
path_dhcpd_db, (int)t) >= sizeof newfname)
|
||||
log_fatal("new_lease_file: lease file path too long");
|
||||
|
||||
@ -279,10 +279,10 @@ diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
|
||||
log_error("Can't fdopen new lease file: %m");
|
||||
close(db_fd);
|
||||
goto fdfail;
|
||||
diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
|
||||
--- dhcp-4.2.2b1/server/dhcpd.c.cloexec 2011-04-21 16:08:15.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/server/dhcpd.c 2011-07-01 14:19:40.354124505 +0200
|
||||
@@ -270,11 +270,11 @@ main(int argc, char **argv) {
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.c.cloexec dhcp-4.3.0a1/server/dhcpd.c
|
||||
--- dhcp-4.3.0a1/server/dhcpd.c.cloexec 2013-12-13 22:26:01.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.c 2013-12-19 15:37:17.258674472 +0100
|
||||
@@ -193,11 +193,11 @@ main(int argc, char **argv) {
|
||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||
2 (stderr) are open. To do this, we assume that when we
|
||||
open a file the lowest available file descriptor is used. */
|
||||
@ -297,7 +297,7 @@ diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
|
||||
if (fd == 2)
|
||||
log_perror = 0; /* No sense logging to /dev/null. */
|
||||
else if (fd != -1)
|
||||
@@ -793,7 +793,7 @@ main(int argc, char **argv) {
|
||||
@@ -716,7 +716,7 @@ main(int argc, char **argv) {
|
||||
*/
|
||||
if (no_pid_file == ISC_FALSE) {
|
||||
/*Read previous pid file. */
|
||||
@ -306,7 +306,7 @@ diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
|
||||
status = read(i, pbuf, (sizeof pbuf) - 1);
|
||||
close (i);
|
||||
if (status > 0) {
|
||||
@@ -812,7 +812,7 @@ main(int argc, char **argv) {
|
||||
@@ -735,7 +735,7 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
/* Write new pid file. */
|
||||
@ -315,23 +315,23 @@ diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
|
||||
if (i >= 0) {
|
||||
sprintf(pbuf, "%d\n", (int) getpid());
|
||||
IGNORE_RET (write(i, pbuf, strlen(pbuf)));
|
||||
@@ -840,9 +840,9 @@ main(int argc, char **argv) {
|
||||
close(2);
|
||||
@@ -763,9 +763,9 @@ main(int argc, char **argv) {
|
||||
(void) close(2);
|
||||
|
||||
/* Reopen them on /dev/null. */
|
||||
- open("/dev/null", O_RDWR);
|
||||
- open("/dev/null", O_RDWR);
|
||||
- open("/dev/null", O_RDWR);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
- (void) open("/dev/null", O_RDWR);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
+ (void) open("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
log_perror = 0; /* No sense logging to /dev/null. */
|
||||
|
||||
IGNORE_RET (chdir("/"));
|
||||
diff -up dhcp-4.2.2b1/server/ldap.c.cloexec dhcp-4.2.2b1/server/ldap.c
|
||||
--- dhcp-4.2.2b1/server/ldap.c.cloexec 2010-03-25 16:26:58.000000000 +0100
|
||||
+++ dhcp-4.2.2b1/server/ldap.c 2011-07-01 14:13:31.043887665 +0200
|
||||
@@ -685,7 +685,7 @@ ldap_start (void)
|
||||
diff -up dhcp-4.3.0a1/server/ldap.c.cloexec dhcp-4.3.0a1/server/ldap.c
|
||||
--- dhcp-4.3.0a1/server/ldap.c.cloexec 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/ldap.c 2013-12-19 15:34:41.667885843 +0100
|
||||
@@ -684,7 +684,7 @@ ldap_start (void)
|
||||
|
||||
if (ldap_debug_file != NULL && ldap_debug_fd == -1)
|
||||
{
|
@ -1,7 +1,31 @@
|
||||
diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
|
||||
--- dhcp-4.2.4b1/client/dhc6.c.PPP 2012-04-16 17:37:23.243618764 +0200
|
||||
+++ dhcp-4.2.4b1/client/dhc6.c 2012-04-16 17:37:23.252618638 +0200
|
||||
@@ -133,7 +133,7 @@ extern int stateless;
|
||||
diff -up dhcp-4.3.0a1/client/dhc6.c.PPP dhcp-4.3.0a1/client/dhc6.c
|
||||
--- dhcp-4.3.0a1/client/dhc6.c.PPP 2013-12-19 16:16:45.925550229 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 16:16:45.930550159 +0100
|
||||
@@ -5080,7 +5080,8 @@ make_client6_options(struct client_state
|
||||
*/
|
||||
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
||||
D6O_CLIENTID)) == NULL) {
|
||||
- if (!option_cache(&oc, &default_duid, NULL, clientid_option,
|
||||
+ if (default_duid.len == 0 ||
|
||||
+ !option_cache(&oc, &default_duid, NULL, clientid_option,
|
||||
MDL))
|
||||
log_fatal("Failure assembling a DUID.");
|
||||
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.PPP dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.PPP 2013-12-19 16:16:45.932550131 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 16:27:38.334473958 +0100
|
||||
@@ -926,8 +926,8 @@ main(int argc, char **argv) {
|
||||
if (default_duid.buffer != NULL)
|
||||
data_string_forget(&default_duid, MDL);
|
||||
|
||||
- form_duid(&default_duid, MDL);
|
||||
- write_duid(&default_duid);
|
||||
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
|
||||
+ write_duid(&default_duid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3225,7 +3225,7 @@ write_options(struct client_state *clien
|
||||
* is not how it is intended. Upcoming rearchitecting the client should
|
||||
* address this "one daemon model."
|
||||
*/
|
||||
@ -10,7 +34,7 @@ diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
|
||||
form_duid(struct data_string *duid, const char *file, int line)
|
||||
{
|
||||
struct interface_info *ip;
|
||||
@@ -145,6 +145,15 @@ form_duid(struct data_string *duid, cons
|
||||
@@ -3237,6 +3237,15 @@ form_duid(struct data_string *duid, cons
|
||||
if (ip == NULL)
|
||||
log_fatal("Impossible condition at %s:%d.", MDL);
|
||||
|
||||
@ -26,43 +50,19 @@ diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
|
||||
if ((ip->hw_address.hlen == 0) ||
|
||||
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
||||
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
||||
@@ -180,6 +189,8 @@ form_duid(struct data_string *duid, cons
|
||||
@@ -3272,6 +3281,8 @@ form_duid(struct data_string *duid, cons
|
||||
memcpy(duid->buffer->data + 4, ip->hw_address.hbuf + 1,
|
||||
ip->hw_address.hlen - 1);
|
||||
}
|
||||
+
|
||||
+
|
||||
+ return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5130,7 +5141,8 @@ make_client6_options(struct client_state
|
||||
*/
|
||||
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
||||
D6O_CLIENTID)) == NULL) {
|
||||
- if (!option_cache(&oc, &default_duid, NULL, clientid_option,
|
||||
+ if (default_duid.len == 0 ||
|
||||
+ !option_cache(&oc, &default_duid, NULL, clientid_option,
|
||||
MDL))
|
||||
log_fatal("Failure assembling a DUID.");
|
||||
|
||||
diff -up dhcp-4.2.4b1/client/dhclient.c.PPP dhcp-4.2.4b1/client/dhclient.c
|
||||
--- dhcp-4.2.4b1/client/dhclient.c.PPP 2012-04-16 17:37:23.214619170 +0200
|
||||
+++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:37:23.254618610 +0200
|
||||
@@ -919,8 +919,8 @@ main(int argc, char **argv) {
|
||||
if (default_duid.buffer != NULL)
|
||||
data_string_forget(&default_duid, MDL);
|
||||
|
||||
- form_duid(&default_duid, MDL);
|
||||
- write_duid(&default_duid);
|
||||
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
|
||||
+ write_duid(&default_duid);
|
||||
}
|
||||
|
||||
for (ip = interfaces ; ip != NULL ; ip = ip->next) {
|
||||
diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c
|
||||
--- dhcp-4.2.4b1/common/bpf.c.PPP 2012-04-16 17:37:23.175619716 +0200
|
||||
+++ dhcp-4.2.4b1/common/bpf.c 2012-04-16 17:37:23.255618596 +0200
|
||||
@@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har
|
||||
/* Write the default DUID to the lease store. */
|
||||
diff -up dhcp-4.3.0a1/common/bpf.c.PPP dhcp-4.3.0a1/common/bpf.c
|
||||
--- dhcp-4.3.0a1/common/bpf.c.PPP 2013-12-19 16:16:45.868551024 +0100
|
||||
+++ dhcp-4.3.0a1/common/bpf.c 2013-12-19 16:16:45.934550103 +0100
|
||||
@@ -602,6 +602,22 @@ get_hw_addr(const char *name, struct har
|
||||
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
|
||||
break;
|
||||
#endif /* IFT_FDDI */
|
||||
@ -85,10 +85,10 @@ diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c
|
||||
default:
|
||||
log_fatal("Unsupported device type %d for \"%s\"",
|
||||
sa->sdl_type, name);
|
||||
diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c
|
||||
--- dhcp-4.2.4b1/common/lpf.c.PPP 2012-04-16 17:37:23.155619996 +0200
|
||||
+++ dhcp-4.2.4b1/common/lpf.c 2012-04-16 17:37:23.256618582 +0200
|
||||
@@ -503,6 +503,22 @@ get_hw_addr(const char *name, struct har
|
||||
diff -up dhcp-4.3.0a1/common/lpf.c.PPP dhcp-4.3.0a1/common/lpf.c
|
||||
--- dhcp-4.3.0a1/common/lpf.c.PPP 2013-12-19 16:16:45.848551303 +0100
|
||||
+++ dhcp-4.3.0a1/common/lpf.c 2013-12-19 16:16:45.934550103 +0100
|
||||
@@ -511,6 +511,22 @@ get_hw_addr(const char *name, struct har
|
||||
hw->hbuf[0] = HTYPE_FDDI;
|
||||
memcpy(&hw->hbuf[1], sa->sa_data, 6);
|
||||
break;
|
||||
@ -111,21 +111,9 @@ diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c
|
||||
default:
|
||||
log_fatal("Unsupported device type %ld for \"%s\"",
|
||||
(long int)sa->sa_family, name);
|
||||
diff -up dhcp-4.2.4b1/includes/dhcpd.h.PPP dhcp-4.2.4b1/includes/dhcpd.h
|
||||
--- dhcp-4.2.4b1/includes/dhcpd.h.PPP 2012-04-16 17:37:23.239618820 +0200
|
||||
+++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:37:23.257618568 +0200
|
||||
@@ -2760,7 +2760,7 @@ void dhcpv4_client_assignments(void);
|
||||
void dhcpv6_client_assignments(void);
|
||||
|
||||
/* dhc6.c */
|
||||
-void form_duid(struct data_string *duid, const char *file, int line);
|
||||
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
||||
void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line);
|
||||
void start_init6(struct client_state *client);
|
||||
void start_info_request6(struct client_state *client);
|
||||
diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h
|
||||
--- dhcp-4.2.4b1/includes/dhcp.h.PPP 2012-04-16 17:37:23.000000000 +0200
|
||||
+++ dhcp-4.2.4b1/includes/dhcp.h 2012-04-16 17:38:34.675618138 +0200
|
||||
diff -up dhcp-4.3.0a1/includes/dhcp.h.PPP dhcp-4.3.0a1/includes/dhcp.h
|
||||
--- dhcp-4.3.0a1/includes/dhcp.h.PPP 2013-12-19 16:16:45.919550313 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcp.h 2013-12-19 16:16:45.936550076 +0100
|
||||
@@ -85,6 +85,8 @@ struct dhcp_packet {
|
||||
* is no standard for this so we
|
||||
* just steal a type */
|
||||
@ -135,10 +123,22 @@ diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h
|
||||
/* Magic cookie validating dhcp options field (and bootp vendor
|
||||
extensions field). */
|
||||
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
|
||||
diff -up dhcp-4.2.4b1/server/dhcpv6.c.PPP dhcp-4.2.4b1/server/dhcpv6.c
|
||||
--- dhcp-4.2.4b1/server/dhcpv6.c.PPP 2012-04-16 17:37:23.218619114 +0200
|
||||
+++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 17:37:23.260618526 +0200
|
||||
@@ -300,6 +300,9 @@ generate_new_server_duid(void) {
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.PPP dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.PPP 2013-12-19 16:16:45.935550090 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 16:28:33.468709007 +0100
|
||||
@@ -2824,7 +2824,7 @@ void client_dns_remove(struct client_sta
|
||||
|
||||
void dhcpv4_client_assignments(void);
|
||||
void dhcpv6_client_assignments(void);
|
||||
-void form_duid(struct data_string *duid, const char *file, int line);
|
||||
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
||||
|
||||
/* dhc6.c */
|
||||
void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line);
|
||||
diff -up dhcp-4.3.0a1/server/dhcpv6.c.PPP dhcp-4.3.0a1/server/dhcpv6.c
|
||||
--- dhcp-4.3.0a1/server/dhcpv6.c.PPP 2013-12-19 16:16:45.901550564 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpv6.c 2013-12-19 16:16:45.937550062 +0100
|
||||
@@ -307,6 +307,9 @@ generate_new_server_duid(void) {
|
||||
if (p->hw_address.hlen > 0) {
|
||||
break;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
--- dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast 2012-04-11 00:14:04.000000000 +0200
|
||||
+++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 19:21:43.575923732 +0200
|
||||
@@ -346,6 +346,48 @@ generate_new_server_duid(void) {
|
||||
diff -up dhcp-4.3.0a1/server/dhcpv6.c.UseMulticast dhcp-4.3.0a1/server/dhcpv6.c
|
||||
--- dhcp-4.3.0a1/server/dhcpv6.c.UseMulticast 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpv6.c 2013-12-19 15:54:46.934932371 +0100
|
||||
@@ -353,6 +353,48 @@ generate_new_server_duid(void) {
|
||||
}
|
||||
|
||||
/*
|
||||
@ -50,8 +50,8 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
* Get the client identifier from the packet.
|
||||
*/
|
||||
isc_result_t
|
||||
@@ -1404,6 +1446,56 @@ lease_to_client(struct data_string *repl
|
||||
reply.shared->group);
|
||||
@@ -1498,6 +1540,56 @@ lease_to_client(struct data_string *repl
|
||||
reply.shared->group, NULL);
|
||||
}
|
||||
|
||||
+ /* reject unicast message, unless we set unicast option */
|
||||
@ -107,7 +107,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
/*
|
||||
* RFC3315 section 17.2.2 (Solicit):
|
||||
*
|
||||
@@ -1429,8 +1521,8 @@ lease_to_client(struct data_string *repl
|
||||
@@ -1523,8 +1615,8 @@ lease_to_client(struct data_string *repl
|
||||
* Sends a Renew/Rebind if the IA is not in the Reply message.
|
||||
*/
|
||||
#if defined (RFC3315_PRE_ERRATA_2010_08)
|
||||
@ -118,7 +118,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
{
|
||||
/* Set the NoAddrsAvail status code. */
|
||||
if (!set_status_code(STATUS_NoAddrsAvail,
|
||||
@@ -1477,6 +1569,7 @@ lease_to_client(struct data_string *repl
|
||||
@@ -1571,6 +1663,7 @@ lease_to_client(struct data_string *repl
|
||||
* Having stored the client's IA's, store any options that
|
||||
* will fit in the remaining space.
|
||||
*/
|
||||
@ -126,7 +126,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
reply.cursor += store_options6((char *)reply.buf.data + reply.cursor,
|
||||
sizeof(reply.buf) - reply.cursor,
|
||||
reply.opt_state, reply.packet,
|
||||
@@ -4126,7 +4219,6 @@ dhcpv6_solicit(struct data_string *reply
|
||||
@@ -4688,7 +4781,6 @@ dhcpv6_solicit(struct data_string *reply
|
||||
* Very similar to Solicit handling, except the server DUID is required.
|
||||
*/
|
||||
|
||||
@ -134,7 +134,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
static void
|
||||
dhcpv6_request(struct data_string *reply_ret, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
@@ -4456,7 +4548,6 @@ exit:
|
||||
@@ -5018,7 +5110,6 @@ exit:
|
||||
* except for the error code of when addresses don't match.
|
||||
*/
|
||||
|
||||
@ -142,7 +142,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
static void
|
||||
dhcpv6_renew(struct data_string *reply, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
@@ -4700,18 +4791,60 @@ iterate_over_ia_na(struct data_string *r
|
||||
@@ -5262,18 +5353,60 @@ iterate_over_ia_na(struct data_string *r
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
|
||||
/*
|
||||
* Loop through the IA_NA reported by the client, and deal with
|
||||
@@ -4849,6 +4982,7 @@ iterate_over_ia_na(struct data_string *r
|
||||
@@ -5411,6 +5544,7 @@ iterate_over_ia_na(struct data_string *r
|
||||
/*
|
||||
* Return our reply to the caller.
|
||||
*/
|
||||
@ -221,7 +221,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
reply_ret->len = reply_ofs;
|
||||
reply_ret->buffer = NULL;
|
||||
if (!buffer_allocate(&reply_ret->buffer, reply_ofs, MDL)) {
|
||||
@@ -4894,7 +5028,6 @@ exit:
|
||||
@@ -5456,7 +5590,6 @@ exit:
|
||||
* we still need to be aware of this possibility.
|
||||
*/
|
||||
|
||||
@ -229,7 +229,7 @@ diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
|
||||
/* TODO: IA_TA */
|
||||
static void
|
||||
dhcpv6_decline(struct data_string *reply, struct packet *packet) {
|
||||
@@ -5364,7 +5497,6 @@ exit:
|
||||
@@ -5926,7 +6059,6 @@ exit:
|
||||
* Release means a client is done with the leases.
|
||||
*/
|
||||
|
14
dhcp-add_timeout_when_NULL.patch
Normal file
14
dhcp-add_timeout_when_NULL.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -up dhcp-4.3.0a1/common/dispatch.c.dracut dhcp-4.3.0a1/common/dispatch.c
|
||||
--- dhcp-4.3.0a1/common/dispatch.c.dracut 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/dispatch.c 2013-12-19 15:39:50.350505860 +0100
|
||||
@@ -210,6 +210,10 @@ void add_timeout (when, where, what, ref
|
||||
isc_interval_t interval;
|
||||
isc_time_t expires;
|
||||
|
||||
+ if (when == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* See if this timeout supersedes an existing timeout. */
|
||||
t = (struct timeout *)0;
|
||||
for (q = timeouts; q; q = q->next) {
|
@ -1,7 +1,39 @@
|
||||
diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.8
|
||||
--- dhcp-4.2.2b1/client/dhclient.8.capability 2011-07-01 15:09:06.603784531 +0200
|
||||
+++ dhcp-4.2.2b1/client/dhclient.8 2011-07-01 15:09:06.663783913 +0200
|
||||
@@ -118,6 +118,9 @@ dhclient - Dynamic Host Configuration Pr
|
||||
diff -up dhcp-4.3.0a1/client/Makefile.am.capability dhcp-4.3.0a1/client/Makefile.am
|
||||
--- dhcp-4.3.0a1/client/Makefile.am.capability 2013-12-19 16:15:26.549657115 +0100
|
||||
+++ dhcp-4.3.0a1/client/Makefile.am 2013-12-19 16:16:04.126133091 +0100
|
||||
@@ -4,7 +4,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.3.0a1/client/dhclient-script.8.capability dhcp-4.3.0a1/client/dhclient-script.8
|
||||
--- dhcp-4.3.0a1/client/dhclient-script.8.capability 2013-12-19 16:15:26.520657520 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient-script.8 2013-12-19 16:15:26.549657115 +0100
|
||||
@@ -246,6 +246,16 @@ repeatedly initialized to the values pro
|
||||
the other. Assuming the information provided by both servers is
|
||||
valid, this shouldn't cause any real problems, but it could be
|
||||
confusing.
|
||||
+.PP
|
||||
+Normally, if dhclient was compiled with libcap-ng support,
|
||||
+dhclient drops most capabilities immediately upon startup.
|
||||
+While more secure, this greatly restricts the additional actions that
|
||||
+hooks in dhclient-script can take. For example, any daemons that
|
||||
+dhclient-script starts or restarts will inherit the restricted
|
||||
+capabilities as well, which may interfere with their correct operation.
|
||||
+Thus, the
|
||||
+.BI \-nc
|
||||
+option can be used to prevent dhclient from dropping capabilities.
|
||||
.SH SEE ALSO
|
||||
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
||||
dhclient.leases(5).
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.8.capability dhcp-4.3.0a1/client/dhclient.8
|
||||
--- dhcp-4.3.0a1/client/dhclient.8.capability 2013-12-19 16:15:26.482658050 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.8 2013-12-19 16:15:26.550657101 +0100
|
||||
@@ -124,6 +124,9 @@ dhclient - Dynamic Host Configuration Pr
|
||||
.B -w
|
||||
]
|
||||
[
|
||||
@ -11,7 +43,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.
|
||||
.B -B
|
||||
]
|
||||
[
|
||||
@@ -296,6 +299,32 @@ has been added or removed, so that the c
|
||||
@@ -300,6 +303,32 @@ has been added or removed, so that the c
|
||||
address on that interface.
|
||||
|
||||
.TP
|
||||
@ -44,9 +76,9 @@ diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.
|
||||
.BI \-B
|
||||
Set the BOOTP broadcast flag in request packets so servers will always
|
||||
broadcast replies.
|
||||
diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.c
|
||||
--- dhcp-4.2.2b1/client/dhclient.c.capability 2011-07-01 15:09:06.644784107 +0200
|
||||
+++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 15:09:06.664783903 +0200
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.capability dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.capability 2013-12-19 16:15:26.532657352 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 16:15:26.551657087 +0100
|
||||
@@ -39,6 +39,10 @@
|
||||
#include <limits.h>
|
||||
#include <dns/result.h>
|
||||
@ -68,7 +100,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
|
||||
|
||||
/* Initialize client globals. */
|
||||
memset(&default_duid, 0, sizeof(default_duid));
|
||||
@@ -410,6 +417,10 @@ main(int argc, char **argv) {
|
||||
@@ -413,6 +420,10 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
dhclient_request_options = argv[i];
|
||||
@ -79,7 +111,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
|
||||
} else if (argv[i][0] == '-') {
|
||||
usage();
|
||||
} else if (interfaces_requested < 0) {
|
||||
@@ -458,6 +469,19 @@ main(int argc, char **argv) {
|
||||
@@ -461,6 +472,19 @@ main(int argc, char **argv) {
|
||||
path_dhclient_script = s;
|
||||
}
|
||||
|
||||
@ -99,42 +131,10 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
|
||||
/* Set up the initial dhcp option universe. */
|
||||
initialize_common_option_spaces();
|
||||
|
||||
diff -up dhcp-4.2.2b1/client/dhclient-script.8.capability dhcp-4.2.2b1/client/dhclient-script.8
|
||||
--- dhcp-4.2.2b1/client/dhclient-script.8.capability 2011-07-01 15:09:06.604784521 +0200
|
||||
+++ dhcp-4.2.2b1/client/dhclient-script.8 2011-07-01 15:09:06.666783883 +0200
|
||||
@@ -239,6 +239,16 @@ repeatedly initialized to the values pro
|
||||
the other. Assuming the information provided by both servers is
|
||||
valid, this shouldn't cause any real problems, but it could be
|
||||
confusing.
|
||||
+.PP
|
||||
+Normally, if dhclient was compiled with libcap-ng support,
|
||||
+dhclient drops most capabilities immediately upon startup.
|
||||
+While more secure, this greatly restricts the additional actions that
|
||||
+hooks in dhclient-script can take. For example, any daemons that
|
||||
+dhclient-script starts or restarts will inherit the restricted
|
||||
+capabilities as well, which may interfere with their correct operation.
|
||||
+Thus, the
|
||||
+.BI \-nc
|
||||
+option can be used to prevent dhclient from dropping capabilities.
|
||||
.SH SEE ALSO
|
||||
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
||||
dhclient.leases(5).
|
||||
diff -up dhcp-4.2.2b1/client/Makefile.am.capability dhcp-4.2.2b1/client/Makefile.am
|
||||
--- dhcp-4.2.2b1/client/Makefile.am.capability 2011-07-01 15:09:06.526785327 +0200
|
||||
+++ dhcp-4.2.2b1/client/Makefile.am 2011-07-01 15:09:06.667783873 +0200
|
||||
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-4.2.2b1/configure.ac
|
||||
--- dhcp-4.2.2b1/configure.ac.capability 2011-07-01 15:09:06.527785317 +0200
|
||||
+++ dhcp-4.2.2b1/configure.ac 2011-07-01 15:09:06.667783873 +0200
|
||||
@@ -449,6 +449,41 @@ AC_TRY_LINK(
|
||||
diff -up dhcp-4.3.0a1/configure.ac.capability dhcp-4.3.0a1/configure.ac
|
||||
--- dhcp-4.3.0a1/configure.ac.capability 2013-12-19 16:15:26.475658147 +0100
|
||||
+++ dhcp-4.3.0a1/configure.ac 2013-12-19 16:15:26.552657074 +0100
|
||||
@@ -489,6 +489,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
# Look for optional headers.
|
||||
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
||||
|
||||
@ -176,11 +176,23 @@ diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-4.2.2b1/configure.ac
|
||||
# Solaris needs some libraries for functions
|
||||
AC_SEARCH_LIBS(socket, [socket])
|
||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
||||
diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
--- dhcp-4.2.2b1/relay/dhcrelay.c.capability 2011-07-01 15:09:06.626784295 +0200
|
||||
+++ dhcp-4.2.2b1/relay/dhcrelay.c 2011-07-01 15:12:05.362223794 +0200
|
||||
@@ -36,6 +36,11 @@
|
||||
#include <syslog.h>
|
||||
diff -up dhcp-4.3.0a1/relay/Makefile.am.capability dhcp-4.3.0a1/relay/Makefile.am
|
||||
--- dhcp-4.3.0a1/relay/Makefile.am.capability 2013-12-19 16:15:26.552657074 +0100
|
||||
+++ dhcp-4.3.0a1/relay/Makefile.am 2013-12-19 16:16:26.159825841 +0100
|
||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.3.0a1/relay/dhcrelay.c.capability dhcp-4.3.0a1/relay/dhcrelay.c
|
||||
--- dhcp-4.3.0a1/relay/dhcrelay.c.capability 2013-12-19 16:15:26.535657311 +0100
|
||||
+++ dhcp-4.3.0a1/relay/dhcrelay.c 2013-12-19 16:15:26.553657060 +0100
|
||||
@@ -37,6 +37,11 @@
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
+#ifdef HAVE_LIBCAP_NG
|
||||
@ -191,9 +203,9 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
TIME default_lease_time = 43200; /* 12 hours... */
|
||||
TIME max_lease_time = 86400; /* 24 hours... */
|
||||
struct tree_cache *global_options[256];
|
||||
@@ -356,6 +361,10 @@ main(int argc, char **argv) {
|
||||
sl->next = upstreams;
|
||||
upstreams = sl;
|
||||
@@ -382,6 +387,10 @@ main(int argc, char **argv) {
|
||||
usage();
|
||||
dhcrelay_sub_id = argv[i];
|
||||
#endif
|
||||
+ } else if (!strcmp(argv[i], "-nc")) {
|
||||
+#ifdef HAVE_LIBCAP_NG
|
||||
@ -202,7 +214,7 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
} else if (!strcmp(argv[i], "-pf")) {
|
||||
if (++i == argc)
|
||||
usage();
|
||||
@@ -426,6 +435,17 @@ main(int argc, char **argv) {
|
||||
@@ -452,6 +461,17 @@ main(int argc, char **argv) {
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -220,9 +232,9 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
if (!quiet) {
|
||||
log_info("%s %s", message, PACKAGE_VERSION);
|
||||
log_info(copyright);
|
||||
@@ -573,6 +593,15 @@ main(int argc, char **argv) {
|
||||
dhcpv6_packet_handler = do_packet6;
|
||||
#endif
|
||||
@@ -601,6 +621,15 @@ main(int argc, char **argv) {
|
||||
signal(SIGINT, dhcp_signal_handler); /* control-c */
|
||||
signal(SIGTERM, dhcp_signal_handler); /* kill */
|
||||
|
||||
+#ifdef HAVE_LIBCAP_NG
|
||||
+ /* Drop all capabilities */
|
||||
@ -236,15 +248,3 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
|
||||
/* Start dispatching packets and timeouts... */
|
||||
dispatch();
|
||||
|
||||
diff -up dhcp-4.2.2b1/relay/Makefile.am.capability dhcp-4.2.2b1/relay/Makefile.am
|
||||
--- dhcp-4.2.2b1/relay/Makefile.am.capability 2011-07-01 15:09:06.546785121 +0200
|
||||
+++ dhcp-4.2.2b1/relay/Makefile.am 2011-07-01 15:09:06.670783841 +0200
|
||||
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
12
dhcp-conflex-do-forward-updates.patch
Normal file
12
dhcp-conflex-do-forward-updates.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up dhcp-4.3.0a1/common/conflex.c.forward-updates dhcp-4.3.0a1/common/conflex.c
|
||||
--- dhcp-4.3.0a1/common/conflex.c.forward-updates 2013-12-20 13:52:11.315466686 +0100
|
||||
+++ dhcp-4.3.0a1/common/conflex.c 2013-12-20 13:52:11.492464218 +0100
|
||||
@@ -896,7 +896,7 @@ intern(char *atom, enum dhcp_token dfv)
|
||||
if (!strcasecmp(atom + 7, "list"))
|
||||
return DOMAIN_LIST;
|
||||
}
|
||||
- if (!strcasecmp (atom + 1, "o-forward-update"))
|
||||
+ if (!strcasecmp (atom + 1, "o-forward-updates"))
|
||||
return DO_FORWARD_UPDATE;
|
||||
if (!strcasecmp (atom + 1, "ebug"))
|
||||
return TOKEN_DEBUG;
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
|
||||
--- dhcp-4.2.0/client/clparse.c.requested 2010-07-21 13:29:05.000000000 +0200
|
||||
+++ dhcp-4.2.0/client/clparse.c 2010-07-21 13:50:29.000000000 +0200
|
||||
diff -up dhcp-4.3.0a1/client/clparse.c.requested dhcp-4.3.0a1/client/clparse.c
|
||||
--- dhcp-4.3.0a1/client/clparse.c.requested 2013-12-19 15:13:27.276631307 +0100
|
||||
+++ dhcp-4.3.0a1/client/clparse.c 2013-12-19 15:13:27.313630789 +0100
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
struct client_config top_level_config;
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
|
||||
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
|
||||
|
||||
static void parse_client_default_duid(struct parse *cfile);
|
||||
@@ -111,6 +111,31 @@ isc_result_t read_client_conf ()
|
||||
@@ -119,6 +119,31 @@ isc_result_t read_client_conf ()
|
||||
option_code_hash_lookup(&default_requested_options[8],
|
||||
dhcpv6_universe.code_hash, &code, 0, MDL);
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
|
||||
--- dhcp-4.2.0/client/dhclient.c.backoff 2010-07-21 13:37:03.000000000 +0200
|
||||
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:38:31.000000000 +0200
|
||||
@@ -1208,6 +1208,8 @@ void state_init (cpp)
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.backoff dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.backoff 2013-12-19 15:11:11.310534716 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 15:11:11.315534646 +0100
|
||||
@@ -1250,6 +1250,8 @@ void state_init (cpp)
|
||||
void *cpp;
|
||||
{
|
||||
struct client_state *client = cpp;
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
|
||||
|
||||
ASSERT_STATE(state, S_INIT);
|
||||
|
||||
@@ -1220,9 +1222,18 @@ void state_init (cpp)
|
||||
@@ -1262,9 +1264,18 @@ void state_init (cpp)
|
||||
client -> first_sending = cur_time;
|
||||
client -> interval = client -> config -> initial_interval;
|
||||
|
||||
@ -32,7 +32,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1501,6 +1512,7 @@ void bind_lease (client)
|
||||
@@ -1557,6 +1568,7 @@ void bind_lease (client)
|
||||
send_decline (client);
|
||||
destroy_client_lease (client -> new);
|
||||
client -> new = (struct client_lease *)0;
|
||||
@ -40,7 +40,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
|
||||
state_init (client);
|
||||
return;
|
||||
}
|
||||
@@ -3711,6 +3723,7 @@ void client_location_changed ()
|
||||
@@ -4001,6 +4013,7 @@ void client_location_changed ()
|
||||
case S_INIT:
|
||||
case S_REBINDING:
|
||||
case S_STOPPED:
|
||||
@ -48,10 +48,10 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
|
||||
break;
|
||||
}
|
||||
client -> state = S_INIT;
|
||||
diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-4.2.0/includes/dhcpd.h
|
||||
--- dhcp-4.2.0/includes/dhcpd.h.backoff 2010-07-21 13:29:05.000000000 +0200
|
||||
+++ dhcp-4.2.0/includes/dhcpd.h 2010-07-21 13:38:31.000000000 +0200
|
||||
@@ -1056,7 +1056,8 @@ enum dhcp_state {
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.backoff dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.backoff 2013-12-19 15:11:11.305534786 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 15:11:11.316534632 +0100
|
||||
@@ -1088,7 +1088,8 @@ enum dhcp_state {
|
||||
S_BOUND = 5,
|
||||
S_RENEWING = 6,
|
||||
S_REBINDING = 7,
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.3/client/dhclient.c.decline-onetry dhcp-4.2.3/client/dhclient.c
|
||||
--- dhcp-4.2.3/client/dhclient.c.decline-onetry 2011-11-24 14:21:50.000000000 +0100
|
||||
+++ dhcp-4.2.3/client/dhclient.c 2011-11-24 14:23:44.472893215 +0100
|
||||
@@ -1704,11 +1704,18 @@ void bind_lease (client)
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.decline-onetry dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.decline-onetry 2013-12-20 13:37:26.382796437 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 13:37:26.401796172 +0100
|
||||
@@ -1708,11 +1708,18 @@ void bind_lease (client)
|
||||
if (script_go (client)) {
|
||||
make_decline (client, client -> new);
|
||||
send_decline (client);
|
@ -1,7 +1,41 @@
|
||||
diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
|
||||
--- dhcp-4.2.1b1/client/dhclient.8.man 2010-07-14 22:09:34.000000000 +0200
|
||||
+++ dhcp-4.2.1b1/client/dhclient.8 2011-01-27 18:19:07.000000000 +0100
|
||||
@@ -115,6 +115,33 @@ dhclient - Dynamic Host Configuration Pr
|
||||
diff -up dhcp-4.3.0a1/client/clparse.c.options dhcp-4.3.0a1/client/clparse.c
|
||||
--- dhcp-4.3.0a1/client/clparse.c.options 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/clparse.c 2013-12-19 14:50:15.011193031 +0100
|
||||
@@ -154,6 +154,7 @@ isc_result_t read_client_conf ()
|
||||
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
|
||||
*/
|
||||
top_level_config.requested_lease = 7200;
|
||||
+ top_level_config.bootp_broadcast_always = 0;
|
||||
|
||||
group_allocate (&top_level_config.on_receipt, MDL);
|
||||
if (!top_level_config.on_receipt)
|
||||
@@ -320,7 +321,8 @@ void read_client_leases ()
|
||||
interface-declaration |
|
||||
LEASE client-lease-statement |
|
||||
ALIAS client-lease-statement |
|
||||
- KEY key-definition */
|
||||
+ KEY key-definition |
|
||||
+ BOOTP_BROADCAST_ALWAYS */
|
||||
|
||||
void parse_client_statement (cfile, ip, config)
|
||||
struct parse *cfile;
|
||||
@@ -738,6 +740,12 @@ void parse_client_statement (cfile, ip,
|
||||
parse_reject_statement (cfile, config);
|
||||
return;
|
||||
|
||||
+ case BOOTP_BROADCAST_ALWAYS:
|
||||
+ token = next_token(&val, (unsigned*)0, cfile);
|
||||
+ config -> bootp_broadcast_always = 1;
|
||||
+ parse_semi (cfile);
|
||||
+ return;
|
||||
+
|
||||
default:
|
||||
lose = 0;
|
||||
stmt = (struct executable_statement *)0;
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.8.options dhcp-4.3.0a1/client/dhclient.8
|
||||
--- dhcp-4.3.0a1/client/dhclient.8.options 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.8 2013-12-19 14:50:15.010193045 +0100
|
||||
@@ -124,6 +124,33 @@ dhclient - Dynamic Host Configuration Pr
|
||||
.B -w
|
||||
]
|
||||
[
|
||||
@ -35,7 +69,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
|
||||
.B -v
|
||||
]
|
||||
[
|
||||
@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc
|
||||
@@ -271,6 +298,69 @@ not to exit when it doesn't find any suc
|
||||
program can then be used to notify the client when a network interface
|
||||
has been added or removed, so that the client can attempt to configure an IP
|
||||
address on that interface.
|
||||
@ -105,43 +139,9 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
|
||||
.TP
|
||||
.BI \-n
|
||||
Do not configure any interfaces. This is most likely to be useful in
|
||||
diff -up dhcp-4.2.4-P2/client/clparse.c.options dhcp-4.2.4-P2/client/clparse.c
|
||||
--- dhcp-4.2.4-P2/client/clparse.c.options 2012-08-24 21:11:21.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/client/clparse.c 2012-09-26 10:34:27.140049896 +0200
|
||||
@@ -154,6 +154,7 @@ isc_result_t read_client_conf ()
|
||||
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
|
||||
*/
|
||||
top_level_config.requested_lease = 7200;
|
||||
+ top_level_config.bootp_broadcast_always = 0;
|
||||
|
||||
group_allocate (&top_level_config.on_receipt, MDL);
|
||||
if (!top_level_config.on_receipt)
|
||||
@@ -320,7 +321,8 @@ void read_client_leases ()
|
||||
interface-declaration |
|
||||
LEASE client-lease-statement |
|
||||
ALIAS client-lease-statement |
|
||||
- KEY key-definition */
|
||||
+ KEY key-definition |
|
||||
+ BOOTP_BROADCAST_ALWAYS */
|
||||
|
||||
void parse_client_statement (cfile, ip, config)
|
||||
struct parse *cfile;
|
||||
@@ -739,6 +741,12 @@ void parse_client_statement (cfile, ip,
|
||||
parse_reject_statement (cfile, config);
|
||||
return;
|
||||
|
||||
+ case BOOTP_BROADCAST_ALWAYS:
|
||||
+ token = next_token(&val, (unsigned*)0, cfile);
|
||||
+ config -> bootp_broadcast_always = 1;
|
||||
+ parse_semi (cfile);
|
||||
+ return;
|
||||
+
|
||||
default:
|
||||
lose = 0;
|
||||
stmt = (struct executable_statement *)0;
|
||||
diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
--- dhcp-4.2.4-P2/client/dhclient.c.options 2012-08-28 04:13:03.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/client/dhclient.c 2012-09-26 10:36:10.396967531 +0200
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.options 2013-12-13 22:24:38.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 14:50:15.012193017 +0100
|
||||
@@ -39,6 +39,12 @@
|
||||
#include <limits.h>
|
||||
#include <dns/result.h>
|
||||
@ -181,7 +181,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
|
||||
/* Initialize client globals. */
|
||||
memset(&default_duid, 0, sizeof(default_duid));
|
||||
@@ -310,6 +328,88 @@ main(int argc, char **argv) {
|
||||
@@ -313,6 +331,88 @@ main(int argc, char **argv) {
|
||||
} else if (!strcmp(argv[i], "--version")) {
|
||||
log_info("isc-dhclient-%s", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
@ -270,7 +270,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
} else if (argv[i][0] == '-') {
|
||||
usage();
|
||||
} else if (interfaces_requested < 0) {
|
||||
@@ -484,6 +584,156 @@ main(int argc, char **argv) {
|
||||
@@ -490,6 +590,156 @@ main(int argc, char **argv) {
|
||||
/* Parse the dhclient.conf file. */
|
||||
read_client_conf();
|
||||
|
||||
@ -427,7 +427,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
/* Parse the lease database. */
|
||||
read_client_leases();
|
||||
|
||||
@@ -715,6 +965,10 @@ static void usage()
|
||||
@@ -730,6 +980,10 @@ static void usage()
|
||||
" [-s server-addr] [-cf config-file] "
|
||||
"[-lf lease-file]\n"
|
||||
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
||||
@ -438,7 +438,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
" [-sf script-file] [interface]");
|
||||
}
|
||||
|
||||
@@ -2421,7 +2675,8 @@ void make_discover (client, lease)
|
||||
@@ -2489,7 +2743,8 @@ void make_discover (client, lease)
|
||||
client -> packet.xid = random ();
|
||||
client -> packet.secs = 0; /* filled in by send_discover. */
|
||||
|
||||
@ -448,7 +448,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
@@ -2505,7 +2760,9 @@ void make_request (client, lease)
|
||||
@@ -2573,7 +2828,9 @@ void make_request (client, lease)
|
||||
} else {
|
||||
memset (&client -> packet.ciaddr, 0,
|
||||
sizeof client -> packet.ciaddr);
|
||||
@ -459,7 +459,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
@@ -2567,7 +2824,8 @@ void make_decline (client, lease)
|
||||
@@ -2635,7 +2892,8 @@ void make_decline (client, lease)
|
||||
client -> packet.hops = 0;
|
||||
client -> packet.xid = client -> xid;
|
||||
client -> packet.secs = 0; /* Filled in by send_request. */
|
||||
@ -469,10 +469,10 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
diff -up dhcp-4.2.4-P2/common/conflex.c.options dhcp-4.2.4-P2/common/conflex.c
|
||||
--- dhcp-4.2.4-P2/common/conflex.c.options 2012-08-28 04:13:03.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/common/conflex.c 2012-09-26 10:34:27.142049876 +0200
|
||||
@@ -808,6 +808,8 @@ intern(char *atom, enum dhcp_token dfv)
|
||||
diff -up dhcp-4.3.0a1/common/conflex.c.options dhcp-4.3.0a1/common/conflex.c
|
||||
--- dhcp-4.3.0a1/common/conflex.c.options 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/conflex.c 2013-12-19 14:50:15.013193003 +0100
|
||||
@@ -817,6 +817,8 @@ intern(char *atom, enum dhcp_token dfv)
|
||||
return BALANCE;
|
||||
if (!strcasecmp (atom + 1, "ound"))
|
||||
return BOUND;
|
||||
@ -481,9 +481,9 @@ diff -up dhcp-4.2.4-P2/common/conflex.c.options dhcp-4.2.4-P2/common/conflex.c
|
||||
break;
|
||||
case 'c':
|
||||
if (!strcasecmp(atom + 1, "ase"))
|
||||
diff -up dhcp-4.2.4-P2/includes/dhcpd.h.options dhcp-4.2.4-P2/includes/dhcpd.h
|
||||
--- dhcp-4.2.4-P2/includes/dhcpd.h.options 2012-08-28 04:13:22.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/includes/dhcpd.h 2012-09-26 10:34:27.143049865 +0200
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.options dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.options 2013-12-13 21:49:44.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 14:50:15.014192989 +0100
|
||||
@@ -1153,6 +1153,9 @@ struct client_config {
|
||||
int do_forward_update; /* If nonzero, and if we have the
|
||||
information we need, update the
|
||||
@ -494,16 +494,16 @@ diff -up dhcp-4.2.4-P2/includes/dhcpd.h.options dhcp-4.2.4-P2/includes/dhcpd.h
|
||||
};
|
||||
|
||||
/* Per-interface state used in the dhcp client... */
|
||||
diff -up dhcp-4.2.4-P2/includes/dhctoken.h.options dhcp-4.2.4-P2/includes/dhctoken.h
|
||||
--- dhcp-4.2.4-P2/includes/dhctoken.h.options 2012-08-28 04:13:03.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/includes/dhctoken.h 2012-09-26 10:34:27.144049854 +0200
|
||||
@@ -364,7 +364,8 @@ enum dhcp_token {
|
||||
GETHOSTBYNAME = 665,
|
||||
PRIMARY6 = 666,
|
||||
SECONDARY6 = 667,
|
||||
- TOKEN_INFINIBAND = 668
|
||||
+ TOKEN_INFINIBAND = 668,
|
||||
+ BOOTP_BROADCAST_ALWAYS = 669
|
||||
diff -up dhcp-4.3.0a1/includes/dhctoken.h.options dhcp-4.3.0a1/includes/dhctoken.h
|
||||
--- dhcp-4.3.0a1/includes/dhctoken.h.options 2013-12-19 14:50:15.014192989 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhctoken.h 2013-12-19 14:51:57.472758577 +0100
|
||||
@@ -373,7 +373,8 @@ enum dhcp_token {
|
||||
TOKEN_INFINIBAND = 668,
|
||||
POOL6 = 669,
|
||||
V6RELAY = 670,
|
||||
- V6RELOPT = 671
|
||||
+ V6RELOPT = 671,
|
||||
+ BOOTP_BROADCAST_ALWAYS = 672
|
||||
};
|
||||
|
||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
@ -1,329 +0,0 @@
|
||||
From 198a1fcc9f6f8c39ddf8c6e962b7e4925d43072c Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Thu, 24 Oct 2013 10:03:52 +0200
|
||||
Subject: [PATCH] Fix the socket handling for DHCPv6 clients to allow multiple
|
||||
instances
|
||||
|
||||
of a client on a single machine to work properly. Previously only
|
||||
one client would receive the packets. Thanks to Jiri Popelka at Red
|
||||
Hat for the bug report and a potential patch.
|
||||
[ISC-Bugs #34784]
|
||||
---
|
||||
common/discover.c | 19 ++++-----
|
||||
common/socket.c | 116 ++++++++++++++++++++++++++++++++++++++++++++----------
|
||||
includes/dhcpd.h | 6 +--
|
||||
3 files changed, 107 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/common/discover.c b/common/discover.c
|
||||
index a305d92..4027d1a 100644
|
||||
--- a/common/discover.c
|
||||
+++ b/common/discover.c
|
||||
@@ -57,10 +57,6 @@ struct in_addr limited_broadcast;
|
||||
int local_family = AF_INET;
|
||||
struct in_addr local_address;
|
||||
|
||||
-#ifdef DHCPv6
|
||||
-struct in6_addr local_address6;
|
||||
-#endif /* DHCPv6 */
|
||||
-
|
||||
void (*bootp_packet_handler) (struct interface_info *,
|
||||
struct dhcp_packet *, unsigned,
|
||||
unsigned int,
|
||||
@@ -877,7 +873,7 @@ discover_interfaces(int state) {
|
||||
(state == DISCOVER_RELAY)) {
|
||||
if_register6(tmp, 1);
|
||||
} else {
|
||||
- if_register6(tmp, 0);
|
||||
+ if_register_linklocal6(tmp);
|
||||
}
|
||||
#endif /* DHCPv6 */
|
||||
}
|
||||
@@ -933,13 +929,14 @@ discover_interfaces(int state) {
|
||||
tmp -> name, isc_result_totext (status));
|
||||
|
||||
#if defined(DHCPv6)
|
||||
- /* Only register the first interface for V6, since they all
|
||||
- * use the same socket. XXX: This has some messy side
|
||||
- * effects if we start dynamically adding and removing
|
||||
- * interfaces, but we're well beyond that point in terms of
|
||||
- * mess.
|
||||
+ /* Only register the first interface for V6, since
|
||||
+ * servers and relays all use the same socket.
|
||||
+ * XXX: This has some messy side effects if we start
|
||||
+ * dynamically adding and removing interfaces, but
|
||||
+ * we're well beyond that point in terms of mess.
|
||||
*/
|
||||
- if (local_family == AF_INET6)
|
||||
+ if (((state == DISCOVER_SERVER) || (state == DISCOVER_RELAY)) &&
|
||||
+ (local_family == AF_INET6))
|
||||
break;
|
||||
#endif
|
||||
} /* for (tmp = interfaces; ... */
|
||||
diff --git a/common/socket.c b/common/socket.c
|
||||
index 8fead01..f0c2c94 100644
|
||||
--- a/common/socket.c
|
||||
+++ b/common/socket.c
|
||||
@@ -67,6 +67,7 @@
|
||||
* XXX: this is gross. we need to go back and overhaul the API for socket
|
||||
* handling.
|
||||
*/
|
||||
+static int no_global_v6_socket = 0;
|
||||
static unsigned int global_v6_socket_references = 0;
|
||||
static int global_v6_socket = -1;
|
||||
|
||||
@@ -127,7 +128,7 @@ void if_reinitialize_receive (info)
|
||||
/* Generic interface registration routine... */
|
||||
int
|
||||
if_register_socket(struct interface_info *info, int family,
|
||||
- int *do_multicast)
|
||||
+ int *do_multicast, struct in6_addr *linklocal6)
|
||||
{
|
||||
struct sockaddr_storage name;
|
||||
int name_len;
|
||||
@@ -161,10 +162,12 @@ if_register_socket(struct interface_info *info, int family,
|
||||
addr6 = (struct sockaddr_in6 *)&name;
|
||||
addr6->sin6_family = AF_INET6;
|
||||
addr6->sin6_port = local_port;
|
||||
- /* XXX: What will happen to multicasts if this is nonzero? */
|
||||
- memcpy(&addr6->sin6_addr,
|
||||
- &local_address6,
|
||||
- sizeof(addr6->sin6_addr));
|
||||
+ if (linklocal6) {
|
||||
+ memcpy(&addr6->sin6_addr,
|
||||
+ linklocal6,
|
||||
+ sizeof(addr6->sin6_addr));
|
||||
+ addr6->sin6_scope_id = if_nametoindex(info->name);
|
||||
+ }
|
||||
#ifdef HAVE_SA_LEN
|
||||
addr6->sin6_len = sizeof(*addr6);
|
||||
#endif
|
||||
@@ -221,9 +224,9 @@ if_register_socket(struct interface_info *info, int family,
|
||||
* daemons can bind to their own sockets and get data for their
|
||||
* respective interfaces. This does not (and should not) affect
|
||||
* DHCPv4 sockets; we can't yet support BSD sockets well, much
|
||||
- * less multiple sockets.
|
||||
+ * less multiple sockets. Make sense only with multicast.
|
||||
*/
|
||||
- if (local_family == AF_INET6) {
|
||||
+ if (local_family == AF_INET6 && *do_multicast) {
|
||||
flag = 1;
|
||||
if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
|
||||
(char *)&flag, sizeof(flag)) < 0) {
|
||||
@@ -322,7 +325,7 @@ void if_register_send (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
#ifndef USE_SOCKET_RECEIVE
|
||||
- info->wfdesc = if_register_socket(info, AF_INET, 0);
|
||||
+ info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
||||
/* If this is a normal IPv4 address, get the hardware address. */
|
||||
if (strcmp(info->name, "fallback") != 0)
|
||||
get_hw_addr(info);
|
||||
@@ -368,7 +371,7 @@ void if_register_receive (info)
|
||||
|
||||
#if defined(IP_PKTINFO) && defined(IP_RECVPKTINFO) && defined(USE_V4_PKTINFO)
|
||||
if (global_v4_socket_references == 0) {
|
||||
- global_v4_socket = if_register_socket(info, AF_INET, 0);
|
||||
+ global_v4_socket = if_register_socket(info, AF_INET, 0, NULL);
|
||||
if (global_v4_socket < 0) {
|
||||
/*
|
||||
* if_register_socket() fatally logs if it fails to
|
||||
@@ -384,7 +387,7 @@ void if_register_receive (info)
|
||||
#else
|
||||
/* If we're using the socket API for sending and receiving,
|
||||
we don't need to register this interface twice. */
|
||||
- info->rfdesc = if_register_socket(info, AF_INET, 0);
|
||||
+ info->rfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
||||
#endif /* IP_PKTINFO... */
|
||||
/* If this is a normal IPv4 address, get the hardware address. */
|
||||
if (strcmp(info->name, "fallback") != 0)
|
||||
@@ -477,9 +480,13 @@ if_register6(struct interface_info *info, int do_multicast) {
|
||||
/* Bounce do_multicast to a stack variable because we may change it. */
|
||||
int req_multi = do_multicast;
|
||||
|
||||
+ if (no_global_v6_socket) {
|
||||
+ log_fatal("Impossible condition at %s:%d", MDL);
|
||||
+ }
|
||||
+
|
||||
if (global_v6_socket_references == 0) {
|
||||
global_v6_socket = if_register_socket(info, AF_INET6,
|
||||
- &req_multi);
|
||||
+ &req_multi, NULL);
|
||||
if (global_v6_socket < 0) {
|
||||
/*
|
||||
* if_register_socket() fatally logs if it fails to
|
||||
@@ -515,12 +522,73 @@ if_register6(struct interface_info *info, int do_multicast) {
|
||||
}
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Register an IPv6 socket bound to the link-local address of
|
||||
+ * the argument interface (used by clients on a multiple interface box,
|
||||
+ * vs. a server or a relay using the global IPv6 socket and running
|
||||
+ * *only* in a single instance).
|
||||
+ */
|
||||
+void
|
||||
+if_register_linklocal6(struct interface_info *info) {
|
||||
+ int sock;
|
||||
+ int count;
|
||||
+ struct in6_addr *addr6 = NULL;
|
||||
+ int req_multi = 0;
|
||||
+
|
||||
+ if (global_v6_socket >= 0) {
|
||||
+ log_fatal("Impossible condition at %s:%d", MDL);
|
||||
+ }
|
||||
+
|
||||
+ no_global_v6_socket = 1;
|
||||
+
|
||||
+ /* get the (?) link-local address */
|
||||
+ for (count = 0; count < info->v6address_count; count++) {
|
||||
+ addr6 = &info->v6addresses[count];
|
||||
+ if (IN6_IS_ADDR_LINKLOCAL(addr6))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!addr6) {
|
||||
+ log_fatal("no link-local IPv6 address for %s", info->name);
|
||||
+ }
|
||||
+
|
||||
+ sock = if_register_socket(info, AF_INET6, &req_multi, addr6);
|
||||
+
|
||||
+ if (sock < 0) {
|
||||
+ log_fatal("if_register_socket for %s fails", info->name);
|
||||
+ }
|
||||
+
|
||||
+ info->rfdesc = sock;
|
||||
+ info->wfdesc = sock;
|
||||
+
|
||||
+ get_hw_addr(info);
|
||||
+
|
||||
+ if (!quiet_interface_discovery) {
|
||||
+ if (info->shared_network != NULL) {
|
||||
+ log_info("Listening on Socket/%d/%s/%s",
|
||||
+ global_v6_socket, info->name,
|
||||
+ info->shared_network->name);
|
||||
+ log_info("Sending on Socket/%d/%s/%s",
|
||||
+ global_v6_socket, info->name,
|
||||
+ info->shared_network->name);
|
||||
+ } else {
|
||||
+ log_info("Listening on Socket/%s", info->name);
|
||||
+ log_info("Sending on Socket/%s", info->name);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void
|
||||
if_deregister6(struct interface_info *info) {
|
||||
- /* Dereference the global v6 socket. */
|
||||
- if ((info->rfdesc == global_v6_socket) &&
|
||||
- (info->wfdesc == global_v6_socket) &&
|
||||
- (global_v6_socket_references > 0)) {
|
||||
+ /* client case */
|
||||
+ if (no_global_v6_socket) {
|
||||
+ close(info->rfdesc);
|
||||
+ info->rfdesc = -1;
|
||||
+ info->wfdesc = -1;
|
||||
+ } else if ((info->rfdesc == global_v6_socket) &&
|
||||
+ (info->wfdesc == global_v6_socket) &&
|
||||
+ (global_v6_socket_references > 0)) {
|
||||
+ /* Dereference the global v6 socket. */
|
||||
global_v6_socket_references--;
|
||||
info->rfdesc = -1;
|
||||
info->wfdesc = -1;
|
||||
@@ -540,7 +608,8 @@ if_deregister6(struct interface_info *info) {
|
||||
}
|
||||
}
|
||||
|
||||
- if (global_v6_socket_references == 0) {
|
||||
+ if (!no_global_v6_socket &&
|
||||
+ (global_v6_socket_references == 0)) {
|
||||
close(global_v6_socket);
|
||||
global_v6_socket = -1;
|
||||
|
||||
@@ -692,9 +761,11 @@ ssize_t send_packet6(struct interface_info *interface,
|
||||
struct sockaddr_in6 *to) {
|
||||
struct msghdr m;
|
||||
struct iovec v;
|
||||
+ struct sockaddr_in6 dst;
|
||||
int result;
|
||||
struct in6_pktinfo *pktinfo;
|
||||
struct cmsghdr *cmsg;
|
||||
+ unsigned int ifindex;
|
||||
|
||||
/*
|
||||
* If necessary allocate space for the control message header.
|
||||
@@ -717,9 +788,14 @@ ssize_t send_packet6(struct interface_info *interface,
|
||||
|
||||
/*
|
||||
* Set the target address we're sending to.
|
||||
+ * Enforce the scope ID for bogus BSDs.
|
||||
*/
|
||||
- m.msg_name = to;
|
||||
- m.msg_namelen = sizeof(*to);
|
||||
+ memcpy(&dst, to, sizeof(dst));
|
||||
+ m.msg_name = &dst;
|
||||
+ m.msg_namelen = sizeof(dst);
|
||||
+ ifindex = if_nametoindex(interface->name);
|
||||
+ if (no_global_v6_socket)
|
||||
+ dst.sin6_scope_id = ifindex;
|
||||
|
||||
/*
|
||||
* Set the data buffer we're sending. (Using this wacky
|
||||
@@ -747,7 +823,7 @@ ssize_t send_packet6(struct interface_info *interface,
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(*pktinfo));
|
||||
pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsg);
|
||||
memset(pktinfo, 0, sizeof(*pktinfo));
|
||||
- pktinfo->ipi6_ifindex = if_nametoindex(interface->name);
|
||||
+ pktinfo->ipi6_ifindex = ifindex;
|
||||
m.msg_controllen = cmsg->cmsg_len;
|
||||
|
||||
result = sendmsg(interface->wfdesc, &m, 0);
|
||||
@@ -1046,7 +1122,7 @@ void maybe_setup_fallback ()
|
||||
isc_result_t status;
|
||||
struct interface_info *fbi = (struct interface_info *)0;
|
||||
if (setup_fallback (&fbi, MDL)) {
|
||||
- fbi -> wfdesc = if_register_socket (fbi, AF_INET, 0);
|
||||
+ fbi -> wfdesc = if_register_socket (fbi, AF_INET, 0, NULL);
|
||||
fbi -> rfdesc = fbi -> wfdesc;
|
||||
log_info ("Sending on Socket/%s%s%s",
|
||||
fbi -> name,
|
||||
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||
index b2fbc8b..56d4eab 100644
|
||||
--- a/includes/dhcpd.h
|
||||
+++ b/includes/dhcpd.h
|
||||
@@ -2378,7 +2378,7 @@ void get_hw_addr(struct interface_info *info);
|
||||
/* socket.c */
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
|
||||
|| defined (USE_SOCKET_FALLBACK)
|
||||
-int if_register_socket(struct interface_info *, int, int *);
|
||||
+int if_register_socket(struct interface_info *, int, int *, struct in6_addr *);
|
||||
#endif
|
||||
|
||||
#if defined (USE_SOCKET_FALLBACK) && !defined (USE_SOCKET_SEND)
|
||||
@@ -2389,7 +2389,7 @@ ssize_t send_fallback (struct interface_info *,
|
||||
struct in_addr,
|
||||
struct sockaddr_in *, struct hardware *);
|
||||
ssize_t send_fallback6(struct interface_info *, struct packet *,
|
||||
- struct dhcp_packet *, size_t, struct in6_addr,
|
||||
+ struct dhcp_packet *, size_t, struct in6_addr *,
|
||||
struct sockaddr_in6 *, struct hardware *);
|
||||
#endif
|
||||
|
||||
@@ -2425,6 +2425,7 @@ void maybe_setup_fallback (void);
|
||||
#endif
|
||||
|
||||
void if_register6(struct interface_info *info, int do_multicast);
|
||||
+void if_register_linklocal6(struct interface_info *info);
|
||||
ssize_t receive_packet6(struct interface_info *interface,
|
||||
unsigned char *buf, size_t len,
|
||||
struct sockaddr_in6 *from, struct in6_addr *to_addr,
|
||||
@@ -2570,7 +2571,6 @@ void interface_trace_setup (void);
|
||||
extern struct in_addr limited_broadcast;
|
||||
extern int local_family;
|
||||
extern struct in_addr local_address;
|
||||
-extern struct in6_addr local_address6;
|
||||
|
||||
extern u_int16_t local_port;
|
||||
extern u_int16_t remote_port;
|
||||
--
|
||||
1.8.3.1
|
||||
|
13
dhcp-dupl-key.patch
Normal file
13
dhcp-dupl-key.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -up dhcp-4.3.0a1/common/parse.c.dupl-key dhcp-4.3.0a1/common/parse.c
|
||||
--- dhcp-4.3.0a1/common/parse.c.dupl-key 2013-12-20 13:53:01.121772037 +0100
|
||||
+++ dhcp-4.3.0a1/common/parse.c 2013-12-20 13:53:01.211770781 +0100
|
||||
@@ -2930,6 +2930,9 @@ int parse_zone (struct dns_zone *zone, s
|
||||
}
|
||||
val = key_name;
|
||||
}
|
||||
+ if (zone->key)
|
||||
+ log_fatal("Multiple key definition for zone %s.",
|
||||
+ zone->name);
|
||||
if (omapi_auth_key_lookup_name (&zone -> key, val) !=
|
||||
ISC_R_SUCCESS)
|
||||
parse_warn (cfile, "unknown key %s", val);
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.0/omapip/errwarn.c.errwarn dhcp-4.2.0/omapip/errwarn.c
|
||||
--- dhcp-4.2.0/omapip/errwarn.c.errwarn 2009-07-23 20:52:21.000000000 +0200
|
||||
+++ dhcp-4.2.0/omapip/errwarn.c 2010-07-21 13:23:47.000000000 +0200
|
||||
diff -up dhcp-4.3.0a1/omapip/errwarn.c.errwarn dhcp-4.3.0a1/omapip/errwarn.c
|
||||
--- dhcp-4.3.0a1/omapip/errwarn.c.errwarn 2012-07-11 22:46:29.000000000 +0200
|
||||
+++ dhcp-4.3.0a1/omapip/errwarn.c 2013-12-19 15:09:17.857125042 +0100
|
||||
@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
|
||||
|
||||
#if !defined (NOMINUM)
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.5/common/packet.c.ffff dhcp-4.2.5/common/packet.c
|
||||
--- dhcp-4.2.5/common/packet.c.ffff 2013-10-07 17:21:18.000000000 +0200
|
||||
+++ dhcp-4.2.5/common/packet.c 2013-10-07 17:47:34.689600497 +0200
|
||||
diff -up dhcp-4.3.0a1/common/packet.c.ffff dhcp-4.3.0a1/common/packet.c
|
||||
--- dhcp-4.3.0a1/common/packet.c.ffff 2013-12-20 13:59:42.947165977 +0100
|
||||
+++ dhcp-4.3.0a1/common/packet.c 2013-12-20 13:59:43.137163326 +0100
|
||||
@@ -326,6 +326,7 @@ decode_udp_ip_header(struct interface_in
|
||||
len = ulen - sizeof(udp);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.0/common/tables.c.garbage dhcp-4.2.0/common/tables.c
|
||||
--- dhcp-4.2.0/common/tables.c.garbage 2009-11-20 02:49:01.000000000 +0100
|
||||
+++ dhcp-4.2.0/common/tables.c 2010-07-21 14:40:56.000000000 +0200
|
||||
@@ -207,7 +207,7 @@ static struct option dhcp_options[] = {
|
||||
diff -up dhcp-4.3.0a1/common/tables.c.garbage dhcp-4.3.0a1/common/tables.c
|
||||
--- dhcp-4.3.0a1/common/tables.c.garbage 2013-12-13 21:30:25.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/tables.c 2013-12-19 15:38:29.131655530 +0100
|
||||
@@ -209,7 +209,7 @@ static struct option dhcp_options[] = {
|
||||
{ "netinfo-server-tag", "t", &dhcp_universe, 113, 1 },
|
||||
{ "default-url", "t", &dhcp_universe, 114, 1 },
|
||||
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
|
@ -1,19 +1,7 @@
|
||||
From c09dd24a7d63988e0acef7d033bd3e088fc005c0 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Thu, 24 Jan 2013 12:39:50 +0100
|
||||
Subject: [PATCH] Linux interface discovery
|
||||
|
||||
Use the same discovery code as for *BSD and OS X,
|
||||
i.e. the getifaddrs() function.
|
||||
---
|
||||
common/discover.c | 398 +++---------------------------------------------------
|
||||
1 file changed, 17 insertions(+), 381 deletions(-)
|
||||
|
||||
diff --git a/common/discover.c b/common/discover.c
|
||||
index 1d84219..f2a8f6d 100644
|
||||
--- a/common/discover.c
|
||||
+++ b/common/discover.c
|
||||
@@ -379,391 +379,13 @@ end_iface_scan(struct iface_conf_list *ifaces) {
|
||||
diff -up dhcp-4.3.0a1/common/discover.c.getifaddrs dhcp-4.3.0a1/common/discover.c
|
||||
--- dhcp-4.3.0a1/common/discover.c.getifaddrs 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/discover.c 2013-12-20 13:38:59.995493253 +0100
|
||||
@@ -376,391 +376,13 @@ end_iface_scan(struct iface_conf_list *i
|
||||
ifaces->sock = -1;
|
||||
}
|
||||
|
||||
@ -406,7 +394,7 @@ index 1d84219..f2a8f6d 100644
|
||||
* function.
|
||||
*
|
||||
* The getifaddrs() man page describes the use.
|
||||
@@ -811,6 +433,8 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
|
||||
@@ -808,6 +430,8 @@ begin_iface_scan(struct iface_conf_list
|
||||
*/
|
||||
int
|
||||
next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
@ -415,7 +403,7 @@ index 1d84219..f2a8f6d 100644
|
||||
if (ifaces->next == NULL) {
|
||||
*err = 0;
|
||||
return 0;
|
||||
@@ -822,8 +446,20 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
@@ -819,8 +443,20 @@ next_iface(struct iface_info *info, int
|
||||
return 0;
|
||||
}
|
||||
strcpy(info->name, ifaces->next->ifa_name);
|
||||
@ -438,6 +426,3 @@ index 1d84219..f2a8f6d 100644
|
||||
info->flags = ifaces->next->ifa_flags;
|
||||
ifaces->next = ifaces->next->ifa_next;
|
||||
*err = 0;
|
||||
--
|
||||
1.8.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.2/client/dhclient.c.gpxe-cid dhcp-4.2.2/client/dhclient.c
|
||||
--- dhcp-4.2.2/client/dhclient.c.gpxe-cid 2011-09-16 18:23:20.190453902 +0200
|
||||
+++ dhcp-4.2.2/client/dhclient.c 2011-09-16 18:27:15.568463599 +0200
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.gpxe-cid dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.gpxe-cid 2013-12-20 13:28:45.105048317 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 13:28:45.109048261 +0100
|
||||
@@ -58,6 +58,13 @@ const char *path_dhclient_pid = NULL;
|
||||
static char path_dhclient_script_array[] = _PATH_DHCLIENT_SCRIPT;
|
||||
char *path_dhclient_script = path_dhclient_script_array;
|
||||
@ -15,7 +15,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.gpxe-cid dhcp-4.2.2/client/dhclient.c
|
||||
/* False (default) => we write and use a pid file */
|
||||
isc_boolean_t no_pid_file = ISC_FALSE;
|
||||
|
||||
@@ -1250,6 +1257,12 @@ int find_subnet (struct subnet **sp,
|
||||
@@ -1253,6 +1260,12 @@ int find_subnet (struct subnet **sp,
|
||||
static void setup_ib_interface(struct interface_info *ip)
|
||||
{
|
||||
struct group *g;
|
||||
@ -28,7 +28,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.gpxe-cid dhcp-4.2.2/client/dhclient.c
|
||||
|
||||
/* Set the broadcast flag */
|
||||
ip->client->config->bootp_broadcast_always = 1;
|
||||
@@ -1266,8 +1279,39 @@ static void setup_ib_interface(struct in
|
||||
@@ -1269,8 +1282,39 @@ static void setup_ib_interface(struct in
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
|
||||
--- dhcp-4.2.0/client/dhc6.c.honor-expired 2010-10-07 12:55:37.000000000 +0200
|
||||
+++ dhcp-4.2.0/client/dhc6.c 2010-10-07 12:56:43.000000000 +0200
|
||||
@@ -1405,6 +1405,32 @@ start_info_request6(struct client_state
|
||||
diff -up dhcp-4.3.0a1/client/dhc6.c.honor-expired dhcp-4.3.0a1/client/dhc6.c
|
||||
--- dhcp-4.3.0a1/client/dhc6.c.honor-expired 2013-12-19 16:00:28.062183037 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 16:00:28.076182842 +0100
|
||||
@@ -1351,6 +1351,32 @@ start_info_request6(struct client_state
|
||||
go_daemon();
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
|
||||
/*
|
||||
* start_confirm6() kicks off an "init-reboot" version of the process, at
|
||||
* startup to find out if old bindings are 'fair' and at runtime whenever
|
||||
@@ -1417,8 +1446,10 @@ start_confirm6(struct client_state *clie
|
||||
@@ -1363,8 +1389,10 @@ start_confirm6(struct client_state *clie
|
||||
|
||||
/* If there is no active lease, there is nothing to check. */
|
||||
if ((client->active_lease == NULL) ||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclient.c
|
||||
--- dhcp-4.2.4b1/client/dhclient.c.improved-xid 2012-04-16 17:42:37.444217424 +0200
|
||||
+++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:45:32.105770755 +0200
|
||||
@@ -888,6 +888,26 @@ main(int argc, char **argv) {
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.improved-xid dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.improved-xid 2013-12-20 13:29:41.836260810 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 13:29:41.843260713 +0100
|
||||
@@ -894,6 +894,26 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
/* At this point, all the interfaces that the script thinks
|
||||
are relevant should be running, so now we once again call
|
||||
discover_interfaces(), and this time ask it to actually set
|
||||
@@ -902,14 +922,36 @@ main(int argc, char **argv) {
|
||||
@@ -908,14 +928,36 @@ main(int argc, char **argv) {
|
||||
Not much entropy, but we're booting, so we're not likely to
|
||||
find anything better. */
|
||||
seed = 0;
|
||||
@ -66,7 +66,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
/* Setup specific Infiniband options */
|
||||
for (ip = interfaces; ip; ip = ip->next) {
|
||||
@@ -1447,7 +1489,7 @@ void dhcpack (packet)
|
||||
@@ -1460,7 +1502,7 @@ void dhcpack (packet)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
lease = packet_to_lease (packet, client);
|
||||
if (!lease) {
|
||||
@@ -2164,7 +2206,7 @@ void dhcpnak (packet)
|
||||
@@ -2171,7 +2213,7 @@ void dhcpnak (packet)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
if (!client -> active) {
|
||||
#if defined (DEBUG)
|
||||
@@ -2290,10 +2332,10 @@ void send_discover (cpp)
|
||||
@@ -2298,10 +2340,10 @@ void send_discover (cpp)
|
||||
client -> packet.secs = htons (65535);
|
||||
client -> secs = client -> packet.secs;
|
||||
|
||||
@ -97,7 +97,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
/* Send out a packet. */
|
||||
result = send_packet(client->interface, NULL, &client->packet,
|
||||
@@ -2577,10 +2619,10 @@ void send_request (cpp)
|
||||
@@ -2570,10 +2612,10 @@ void send_request (cpp)
|
||||
client -> packet.secs = htons (65535);
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
||||
fallback_interface) {
|
||||
@@ -2620,10 +2662,10 @@ void send_decline (cpp)
|
||||
@@ -2613,10 +2655,10 @@ void send_decline (cpp)
|
||||
|
||||
int result;
|
||||
|
||||
@ -123,7 +123,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
|
||||
|
||||
/* Send out a packet. */
|
||||
result = send_packet(client->interface, NULL, &client->packet,
|
||||
@@ -2666,10 +2708,10 @@ void send_release (cpp)
|
||||
@@ -2659,10 +2701,10 @@ void send_release (cpp)
|
||||
return;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.4/common/dispatch.c.foo dhcp-4.2.4/common/dispatch.c
|
||||
--- dhcp-4.2.4/common/dispatch.c.foo 2012-07-26 21:31:43.875349675 -0500
|
||||
+++ dhcp-4.2.4/common/dispatch.c 2012-07-26 21:39:14.961710319 -0500
|
||||
@@ -324,7 +324,20 @@ void add_timeout (when, where, what, ref
|
||||
diff -up dhcp-4.3.0a1/common/dispatch.c.interval dhcp-4.3.0a1/common/dispatch.c
|
||||
--- dhcp-4.3.0a1/common/dispatch.c.interval 2013-12-20 13:51:14.385260622 +0100
|
||||
+++ dhcp-4.3.0a1/common/dispatch.c 2013-12-20 13:51:14.493259116 +0100
|
||||
@@ -343,7 +343,20 @@ void add_timeout (when, where, what, ref
|
||||
q->next = timeouts;
|
||||
timeouts = q;
|
||||
|
11
dhcp-log_perror.patch
Normal file
11
dhcp-log_perror.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.c.log_perror dhcp-4.3.0a1/server/dhcpd.c
|
||||
--- dhcp-4.3.0a1/server/dhcpd.c.log_perror 2013-12-20 13:38:15.904106904 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.c 2013-12-20 13:38:15.918106709 +0100
|
||||
@@ -241,6 +241,7 @@ main(int argc, char **argv) {
|
||||
#ifndef DEBUG
|
||||
daemon = 0;
|
||||
#endif
|
||||
+ log_perror = 0;
|
||||
} else if (!strcmp (argv [i], "-d")) {
|
||||
#ifndef DEBUG
|
||||
daemon = 0;
|
12
dhcp-logpid.patch
Normal file
12
dhcp-logpid.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.logpid dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.logpid 2013-12-19 15:51:50.588388633 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 15:51:50.593388563 +0100
|
||||
@@ -165,7 +165,7 @@ main(int argc, char **argv) {
|
||||
else if (fd != -1)
|
||||
close(fd);
|
||||
|
||||
- openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
|
||||
+ openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
|
||||
|
||||
#if !(defined(DEBUG) || defined(__CYGWIN32__))
|
||||
setlogmask(LOG_UPTO(LOG_INFO));
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.5/client/dhclient.c.lpf-ib dhcp-4.2.5/client/dhclient.c
|
||||
--- dhcp-4.2.5/client/dhclient.c.lpf-ib 2013-08-26 12:13:31.509170257 +0200
|
||||
+++ dhcp-4.2.5/client/dhclient.c 2013-08-26 12:13:31.515170176 +0200
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.lpf-ib dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.lpf-ib 2013-12-20 14:03:30.337992402 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 14:03:30.345992290 +0100
|
||||
@@ -113,6 +113,8 @@ static int check_domain_name_list(const
|
||||
static int check_option_values(struct universe *universe, unsigned int opt,
|
||||
const char *ptr, size_t len);
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.5/client/dhclient.c.lpf-ib dhcp-4.2.5/client/dhclient.c
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -909,6 +911,14 @@ main(int argc, char **argv) {
|
||||
@@ -915,6 +917,13 @@ main(int argc, char **argv) {
|
||||
}
|
||||
srandom(seed + cur_time + (unsigned)getpid());
|
||||
|
||||
@ -21,11 +21,10 @@ diff -up dhcp-4.2.5/client/dhclient.c.lpf-ib dhcp-4.2.5/client/dhclient.c
|
||||
+ setup_ib_interface(ip);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Start a configuration state machine for each interface. */
|
||||
#ifdef DHCPv6
|
||||
if (local_family == AF_INET6) {
|
||||
@@ -1185,6 +1195,29 @@ int find_subnet (struct subnet **sp,
|
||||
|
||||
/*
|
||||
* Establish a default DUID. We always do so for v6 and
|
||||
@@ -1199,6 +1208,29 @@ int find_subnet (struct subnet **sp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -55,10 +54,10 @@ diff -up dhcp-4.2.5/client/dhclient.c.lpf-ib dhcp-4.2.5/client/dhclient.c
|
||||
/* Individual States:
|
||||
*
|
||||
* Each routine is called from the dhclient_state_machine() in one of
|
||||
diff -up dhcp-4.2.5/common/bpf.c.lpf-ib dhcp-4.2.5/common/bpf.c
|
||||
--- dhcp-4.2.5/common/bpf.c.lpf-ib 2013-08-26 12:13:31.503170337 +0200
|
||||
+++ dhcp-4.2.5/common/bpf.c 2013-08-26 12:13:31.515170176 +0200
|
||||
@@ -198,11 +198,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
||||
diff -up dhcp-4.3.0a1/common/bpf.c.lpf-ib dhcp-4.3.0a1/common/bpf.c
|
||||
--- dhcp-4.3.0a1/common/bpf.c.lpf-ib 2013-12-20 14:03:30.330992500 +0100
|
||||
+++ dhcp-4.3.0a1/common/bpf.c 2013-12-20 14:03:30.345992290 +0100
|
||||
@@ -199,11 +199,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
||||
BPF_STMT(BPF_RET+BPF_K, 0),
|
||||
};
|
||||
|
||||
@ -103,21 +102,15 @@ diff -up dhcp-4.2.5/common/bpf.c.lpf-ib dhcp-4.2.5/common/bpf.c
|
||||
#if defined (HAVE_TR_SUPPORT)
|
||||
struct bpf_insn dhcp_bpf_tr_filter [] = {
|
||||
/* accept all token ring packets due to variable length header */
|
||||
diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
--- dhcp-4.2.5/common/lpf.c.lpf-ib 2013-08-26 12:13:31.503170337 +0200
|
||||
+++ dhcp-4.2.5/common/lpf.c 2013-08-26 12:14:00.196783751 +0200
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "includes/netinet/udp.h"
|
||||
#include "includes/netinet/if_ether.h"
|
||||
diff -up dhcp-4.3.0a1/common/lpf.c.lpf-ib dhcp-4.3.0a1/common/lpf.c
|
||||
--- dhcp-4.3.0a1/common/lpf.c.lpf-ib 2013-12-20 14:03:30.331992486 +0100
|
||||
+++ dhcp-4.3.0a1/common/lpf.c 2013-12-20 14:03:30.346992276 +0100
|
||||
@@ -46,6 +46,17 @@
|
||||
#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
+#include <ifaddrs.h>
|
||||
|
||||
#ifndef PACKET_AUXDATA
|
||||
#define PACKET_AUXDATA 8
|
||||
@@ -60,6 +61,15 @@ struct tpacket_auxdata
|
||||
/* Reinitializes the specified interface after an address change. This
|
||||
is not required for packet-filter APIs. */
|
||||
|
||||
+
|
||||
+/* Default broadcast address for IPoIB */
|
||||
+static unsigned char default_ib_bcast_addr[20] = {
|
||||
+ 0x00, 0xff, 0xff, 0xff,
|
||||
@ -127,10 +120,10 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
+ 0xff, 0xff, 0xff, 0xff
|
||||
+};
|
||||
+
|
||||
#ifdef USE_LPF_SEND
|
||||
void if_reinitialize_send (info)
|
||||
struct interface_info *info;
|
||||
@@ -87,10 +97,21 @@ int if_register_lpf (info)
|
||||
#endif
|
||||
|
||||
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
|
||||
@@ -92,10 +103,21 @@ int if_register_lpf (info)
|
||||
struct sockaddr common;
|
||||
} sa;
|
||||
struct ifreq ifr;
|
||||
@ -154,7 +147,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
|
||||
errno == EAFNOSUPPORT || errno == EINVAL) {
|
||||
@@ -113,6 +134,7 @@ int if_register_lpf (info)
|
||||
@@ -118,6 +140,7 @@ int if_register_lpf (info)
|
||||
/* Bind to the interface name */
|
||||
memset (&sa, 0, sizeof sa);
|
||||
sa.ll.sll_family = AF_PACKET;
|
||||
@ -162,7 +155,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
sa.ll.sll_ifindex = ifr.ifr_ifindex;
|
||||
if (bind (sock, &sa.common, sizeof sa)) {
|
||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||
@@ -128,8 +150,6 @@ int if_register_lpf (info)
|
||||
@@ -133,8 +156,6 @@ int if_register_lpf (info)
|
||||
log_fatal ("Bind socket to interface: %m");
|
||||
}
|
||||
|
||||
@ -171,7 +164,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
return sock;
|
||||
}
|
||||
#endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
|
||||
@@ -184,6 +204,8 @@ void if_deregister_send (info)
|
||||
@@ -189,6 +210,8 @@ void if_deregister_send (info)
|
||||
in bpf includes... */
|
||||
extern struct sock_filter dhcp_bpf_filter [];
|
||||
extern int dhcp_bpf_filter_len;
|
||||
@ -180,7 +173,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
|
||||
#if defined (HAVE_TR_SUPPORT)
|
||||
extern struct sock_filter dhcp_bpf_tr_filter [];
|
||||
@@ -201,11 +223,13 @@ void if_register_receive (info)
|
||||
@@ -206,11 +229,13 @@ void if_register_receive (info)
|
||||
/* Open a LPF device and hang it on this interface... */
|
||||
info -> rfdesc = if_register_lpf (info);
|
||||
|
||||
@ -199,7 +192,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
}
|
||||
|
||||
#if defined (HAVE_TR_SUPPORT)
|
||||
@@ -251,15 +275,28 @@ static void lpf_gen_filter_setup (info)
|
||||
@@ -256,15 +281,28 @@ static void lpf_gen_filter_setup (info)
|
||||
|
||||
memset(&p, 0, sizeof(p));
|
||||
|
||||
@ -237,7 +230,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
|
||||
if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p,
|
||||
sizeof p) < 0) {
|
||||
@@ -316,6 +353,54 @@ static void lpf_tr_filter_setup (info)
|
||||
@@ -321,6 +359,54 @@ static void lpf_tr_filter_setup (info)
|
||||
#endif /* USE_LPF_RECEIVE */
|
||||
|
||||
#ifdef USE_LPF_SEND
|
||||
@ -292,7 +285,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||
struct interface_info *interface;
|
||||
struct packet *packet;
|
||||
@@ -336,6 +421,11 @@ ssize_t send_packet (interface, packet,
|
||||
@@ -341,6 +427,11 @@ ssize_t send_packet (interface, packet,
|
||||
return send_fallback (interface, packet, raw,
|
||||
len, from, to, hto);
|
||||
|
||||
@ -304,7 +297,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
if (hto == NULL && interface->anycast_mac_addr.hlen)
|
||||
hto = &interface->anycast_mac_addr;
|
||||
|
||||
@@ -357,6 +447,42 @@ ssize_t send_packet (interface, packet,
|
||||
@@ -362,6 +453,42 @@ ssize_t send_packet (interface, packet,
|
||||
#endif /* USE_LPF_SEND */
|
||||
|
||||
#ifdef USE_LPF_RECEIVE
|
||||
@ -347,7 +340,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
ssize_t receive_packet (interface, buf, len, from, hfrom)
|
||||
struct interface_info *interface;
|
||||
unsigned char *buf;
|
||||
@@ -383,6 +509,10 @@ ssize_t receive_packet (interface, buf,
|
||||
@@ -388,6 +515,10 @@ ssize_t receive_packet (interface, buf,
|
||||
};
|
||||
struct cmsghdr *cmsg;
|
||||
|
||||
@ -358,10 +351,10 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
length = recvmsg (interface -> rfdesc, &msg, 0);
|
||||
if (length <= 0)
|
||||
return length;
|
||||
@@ -462,11 +592,33 @@ void maybe_setup_fallback ()
|
||||
}
|
||||
}
|
||||
@@ -469,11 +600,33 @@ void maybe_setup_fallback ()
|
||||
#endif
|
||||
|
||||
#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
|
||||
-void
|
||||
-get_hw_addr(const char *name, struct hardware *hw) {
|
||||
+struct sockaddr_ll *
|
||||
@ -395,7 +388,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
|
||||
if (strlen(name) >= sizeof(tmp.ifr_name)) {
|
||||
log_fatal("Device name too long: \"%s\"", name);
|
||||
@@ -480,16 +632,62 @@ get_hw_addr(const char *name, struct har
|
||||
@@ -487,16 +640,62 @@ get_hw_addr(const char *name, struct har
|
||||
memset(&tmp, 0, sizeof(tmp));
|
||||
strcpy(tmp.ifr_name, name);
|
||||
if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
|
||||
@ -461,7 +454,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
break;
|
||||
case ARPHRD_IEEE802:
|
||||
#ifdef ARPHRD_IEEE802_TR
|
||||
@@ -497,18 +695,48 @@ get_hw_addr(const char *name, struct har
|
||||
@@ -504,18 +703,48 @@ get_hw_addr(const char *name, struct har
|
||||
#endif /* ARPHRD_IEEE802_TR */
|
||||
hw->hlen = 7;
|
||||
hw->hbuf[0] = HTYPE_IEEE802;
|
||||
@ -514,7 +507,7 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
hw->hlen = 0;
|
||||
hw->hbuf[0] = HTYPE_RESERVED;
|
||||
/* 0xdeadbeef should never occur on the wire,
|
||||
@@ -521,10 +749,13 @@ get_hw_addr(const char *name, struct har
|
||||
@@ -528,10 +757,13 @@ get_hw_addr(const char *name, struct har
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -531,11 +524,11 @@ diff -up dhcp-4.2.5/common/lpf.c.lpf-ib dhcp-4.2.5/common/lpf.c
|
||||
+ freeifaddrs(ifaddrs);
|
||||
}
|
||||
#endif
|
||||
diff -up dhcp-4.2.5/common/socket.c.lpf-ib dhcp-4.2.5/common/socket.c
|
||||
--- dhcp-4.2.5/common/socket.c.lpf-ib 2013-01-03 01:02:24.000000000 +0100
|
||||
+++ dhcp-4.2.5/common/socket.c 2013-08-26 12:13:31.516170162 +0200
|
||||
@@ -325,7 +325,7 @@ void if_register_send (info)
|
||||
info->wfdesc = if_register_socket(info, AF_INET, 0);
|
||||
diff -up dhcp-4.3.0a1/common/socket.c.lpf-ib dhcp-4.3.0a1/common/socket.c
|
||||
--- dhcp-4.3.0a1/common/socket.c.lpf-ib 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/socket.c 2013-12-20 14:04:54.904811982 +0100
|
||||
@@ -328,7 +328,7 @@ void if_register_send (info)
|
||||
info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
||||
/* If this is a normal IPv4 address, get the hardware address. */
|
||||
if (strcmp(info->name, "fallback") != 0)
|
||||
- get_hw_addr(info->name, &info->hw_address);
|
||||
@ -543,7 +536,7 @@ diff -up dhcp-4.2.5/common/socket.c.lpf-ib dhcp-4.2.5/common/socket.c
|
||||
#if defined (USE_SOCKET_FALLBACK)
|
||||
/* Fallback only registers for send, but may need to receive as
|
||||
well. */
|
||||
@@ -388,7 +388,7 @@ void if_register_receive (info)
|
||||
@@ -391,7 +391,7 @@ void if_register_receive (info)
|
||||
#endif /* IP_PKTINFO... */
|
||||
/* If this is a normal IPv4 address, get the hardware address. */
|
||||
if (strcmp(info->name, "fallback") != 0)
|
||||
@ -552,7 +545,7 @@ diff -up dhcp-4.2.5/common/socket.c.lpf-ib dhcp-4.2.5/common/socket.c
|
||||
|
||||
if (!quiet_interface_discovery)
|
||||
log_info ("Listening on Socket/%s%s%s",
|
||||
@@ -498,7 +498,7 @@ if_register6(struct interface_info *info
|
||||
@@ -505,7 +505,7 @@ if_register6(struct interface_info *info
|
||||
if (req_multi)
|
||||
if_register_multicast(info);
|
||||
|
||||
@ -561,9 +554,18 @@ diff -up dhcp-4.2.5/common/socket.c.lpf-ib dhcp-4.2.5/common/socket.c
|
||||
|
||||
if (!quiet_interface_discovery) {
|
||||
if (info->shared_network != NULL) {
|
||||
diff -up dhcp-4.2.5/includes/dhcpd.h.lpf-ib dhcp-4.2.5/includes/dhcpd.h
|
||||
--- dhcp-4.2.5/includes/dhcpd.h.lpf-ib 2013-08-26 12:13:31.510170243 +0200
|
||||
+++ dhcp-4.2.5/includes/dhcpd.h 2013-08-26 12:13:31.517170149 +0200
|
||||
@@ -561,7 +561,7 @@ if_register_linklocal6(struct interface_
|
||||
info->rfdesc = sock;
|
||||
info->wfdesc = sock;
|
||||
|
||||
- get_hw_addr(info->name, &info->hw_address);
|
||||
+ get_hw_addr(info);
|
||||
|
||||
if (!quiet_interface_discovery) {
|
||||
if (info->shared_network != NULL) {
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.lpf-ib dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.lpf-ib 2013-12-20 14:03:30.338992388 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-20 14:03:30.348992248 +0100
|
||||
@@ -1249,6 +1249,7 @@ struct interface_info {
|
||||
struct shared_network *shared_network;
|
||||
/* Networks connected to this interface. */
|
||||
@ -572,7 +574,7 @@ diff -up dhcp-4.2.5/includes/dhcpd.h.lpf-ib dhcp-4.2.5/includes/dhcpd.h
|
||||
struct in_addr *addresses; /* Addresses associated with this
|
||||
* interface.
|
||||
*/
|
||||
@@ -2372,7 +2373,7 @@ void print_dns_status (int, struct dhcp_
|
||||
@@ -2425,7 +2426,7 @@ void print_dns_status (int, struct dhcp_
|
||||
#endif
|
||||
const char *print_time(TIME);
|
||||
|
@ -1,6 +1,45 @@
|
||||
diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.conf.5
|
||||
--- dhcp-4.2.5b1/client/dhclient.conf.5.man 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/client/dhclient.conf.5 2012-12-17 12:49:52.818451301 +0100
|
||||
diff -up dhcp-4.3.0a1/client/dhclient-script.8.man dhcp-4.3.0a1/client/dhclient-script.8
|
||||
--- dhcp-4.3.0a1/client/dhclient-script.8.man 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient-script.8 2013-12-19 15:27:17.617118805 +0100
|
||||
@@ -48,7 +48,7 @@ customizations are needed, they should b
|
||||
exit hooks provided (see HOOKS for details). These hooks will allow the
|
||||
user to override the default behaviour of the client in creating a
|
||||
.B /etc/resolv.conf
|
||||
-file.
|
||||
+file, and to handle DHCP options not handled by default.
|
||||
.PP
|
||||
No standard client script exists for some operating systems, even though
|
||||
the actual client may work, so a pioneering user may well need to create
|
||||
@@ -92,6 +92,26 @@ present. The
|
||||
.B ETCDIR/dhclient-exit-hooks
|
||||
script can modify the valid of exit_status to change the exit status
|
||||
of dhclient-script.
|
||||
+.PP
|
||||
+Immediately after dhclient brings an interface UP with a new IP address,
|
||||
+subnet mask, and routes, in the REBOOT/BOUND states, it will check for the
|
||||
+existence of an executable
|
||||
+.B ETCDIR/dhclient-up-hooks
|
||||
+script, and source it if found. This script can handle DHCP options in
|
||||
+the environment that are not handled by default. A per-interface.
|
||||
+.B ETCDIR/dhclient-${IF}-up-hooks
|
||||
+script will override the generic script and be sourced when interface
|
||||
+$IF has been brought up.
|
||||
+.PP
|
||||
+Immediately before dhclient brings an interface DOWN, removing its IP
|
||||
+address, subnet mask, and routes, in the STOP/RELEASE states, it will
|
||||
+check for the existence of an executable
|
||||
+.B ETCDIR/dhclient-down-hooks
|
||||
+script, and source it if found. This script can handle DHCP options in
|
||||
+the environment that are not handled by default. A per-interface
|
||||
+.B ETCDIR/dhclient-${IF}-down-hooks
|
||||
+script will override the generic script and be sourced when interface
|
||||
+$IF is about to be brought down.
|
||||
.SH OPERATION
|
||||
When dhclient needs to invoke the client configuration script, it
|
||||
defines a set of variables in the environment, and then invokes
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.conf.5.man dhcp-4.3.0a1/client/dhclient.conf.5
|
||||
--- dhcp-4.3.0a1/client/dhclient.conf.5.man 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.conf.5 2013-12-19 15:27:17.617118805 +0100
|
||||
@@ -202,7 +202,8 @@ responding to the client send the client
|
||||
options. Only the option names should be specified in the request
|
||||
statement - not option parameters. By default, the DHCPv4 client
|
||||
@ -38,48 +77,9 @@ diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.co
|
||||
require subnet-mask, domain-name-servers;
|
||||
script "CLIENTBINDIR/dhclient-script";
|
||||
media "media 10baseT/UTP", "media 10base2/BNC";
|
||||
diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-script.8
|
||||
--- dhcp-4.2.5b1/client/dhclient-script.8.man 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/client/dhclient-script.8 2012-12-17 12:47:48.410130998 +0100
|
||||
@@ -48,7 +48,7 @@ customizations are needed, they should b
|
||||
exit hooks provided (see HOOKS for details). These hooks will allow the
|
||||
user to override the default behaviour of the client in creating a
|
||||
.B /etc/resolv.conf
|
||||
-file.
|
||||
+file, and to handle DHCP options not handled by default.
|
||||
.PP
|
||||
No standard client script exists for some operating systems, even though
|
||||
the actual client may work, so a pioneering user may well need to create
|
||||
@@ -92,6 +92,26 @@ present. The
|
||||
.B ETCDIR/dhclient-exit-hooks
|
||||
script can modify the valid of exit_status to change the exit status
|
||||
of dhclient-script.
|
||||
+.PP
|
||||
+Immediately after dhclient brings an interface UP with a new IP address,
|
||||
+subnet mask, and routes, in the REBOOT/BOUND states, it will check for the
|
||||
+existence of an executable
|
||||
+.B ETCDIR/dhclient-up-hooks
|
||||
+script, and source it if found. This script can handle DHCP options in
|
||||
+the environment that are not handled by default. A per-interface.
|
||||
+.B ETCDIR/dhclient-${IF}-up-hooks
|
||||
+script will override the generic script and be sourced when interface
|
||||
+$IF has been brought up.
|
||||
+.PP
|
||||
+Immediately before dhclient brings an interface DOWN, removing its IP
|
||||
+address, subnet mask, and routes, in the STOP/RELEASE states, it will
|
||||
+check for the existence of an executable
|
||||
+.B ETCDIR/dhclient-down-hooks
|
||||
+script, and source it if found. This script can handle DHCP options in
|
||||
+the environment that are not handled by default. A per-interface
|
||||
+.B ETCDIR/dhclient-${IF}-down-hooks
|
||||
+script will override the generic script and be sourced when interface
|
||||
+$IF is about to be brought down.
|
||||
.SH OPERATION
|
||||
When dhclient needs to invoke the client configuration script, it
|
||||
defines a set of variables in the environment, and then invokes
|
||||
diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-4.2.5b1/common/dhcp-options.5
|
||||
--- dhcp-4.2.5b1/common/dhcp-options.5.man 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/common/dhcp-options.5 2012-12-17 12:47:48.411130985 +0100
|
||||
diff -up dhcp-4.3.0a1/common/dhcp-options.5.man dhcp-4.3.0a1/common/dhcp-options.5
|
||||
--- dhcp-4.3.0a1/common/dhcp-options.5.man 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/dhcp-options.5 2013-12-19 15:27:17.618118791 +0100
|
||||
@@ -914,6 +914,21 @@ classless IP routing - it does not inclu
|
||||
classless IP routing is now the most widely deployed routing standard,
|
||||
this option is virtually useless, and is not implemented by any of the
|
||||
@ -102,10 +102,10 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-4.2.5b1/common/dhcp-options
|
||||
.RE
|
||||
.PP
|
||||
.nf
|
||||
diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
|
||||
--- dhcp-4.2.5b1/server/dhcpd.conf.5.man 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/server/dhcpd.conf.5 2012-12-17 12:50:52.117650542 +0100
|
||||
@@ -519,6 +519,9 @@ pool {
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.conf.5.man dhcp-4.3.0a1/server/dhcpd.conf.5
|
||||
--- dhcp-4.3.0a1/server/dhcpd.conf.5.man 2013-12-13 21:49:44.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.conf.5 2013-12-19 15:30:14.266670962 +0100
|
||||
@@ -527,6 +527,9 @@ pool {
|
||||
};
|
||||
.fi
|
||||
.PP
|
||||
@ -115,7 +115,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
|
||||
The server currently does very little sanity checking, so if you
|
||||
configure it wrong, it will just fail in odd ways. I would recommend
|
||||
therefore that you either do failover or don't do failover, but don't
|
||||
@@ -533,9 +536,9 @@ primary server might look like this:
|
||||
@@ -541,9 +544,9 @@ primary server might look like this:
|
||||
failover peer "foo" {
|
||||
primary;
|
||||
address anthrax.rc.vix.com;
|
||||
@ -127,7 +127,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
|
||||
max-response-delay 60;
|
||||
max-unacked-updates 10;
|
||||
mclt 3600;
|
||||
@@ -1318,7 +1321,7 @@ the zone containing PTR records - for IS
|
||||
@@ -1241,7 +1244,7 @@ the zone containing PTR records - for IS
|
||||
.PP
|
||||
.nf
|
||||
key DHCP_UPDATER {
|
||||
@ -136,7 +136,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
|
||||
secret pRP5FapFoJ95JEL06sv4PQ==;
|
||||
};
|
||||
|
||||
@@ -1341,7 +1344,7 @@ dhcpd.conf file:
|
||||
@@ -1264,7 +1267,7 @@ dhcpd.conf file:
|
||||
.PP
|
||||
.nf
|
||||
key DHCP_UPDATER {
|
||||
@ -145,7 +145,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
|
||||
secret pRP5FapFoJ95JEL06sv4PQ==;
|
||||
};
|
||||
|
||||
@@ -2555,7 +2558,8 @@ statement
|
||||
@@ -2539,7 +2542,8 @@ statement
|
||||
The \fInext-server\fR statement is used to specify the host address of
|
||||
the server from which the initial boot file (specified in the
|
||||
\fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
|
@ -1,22 +1,7 @@
|
||||
From f113ad7822fcd691e72f61cab7412595951222db Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Hozza <thozza@redhat.com>
|
||||
Date: Wed, 3 Apr 2013 10:20:18 +0200
|
||||
Subject: [PATCH] Expose next-server DHCPv4 option to dhclient script
|
||||
|
||||
Currently dhclient does not exposes next-server option
|
||||
to the dhclient script. this patch fixes this.
|
||||
|
||||
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
||||
---
|
||||
client/dhclient.c | 14 +++++++++++---
|
||||
includes/dhcpd.h | 2 +-
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||
index 551ccbf..e8df320 100644
|
||||
--- a/client/dhclient.c
|
||||
+++ b/client/dhclient.c
|
||||
@@ -993,7 +993,7 @@ void state_selecting (cpp)
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.next-server dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.next-server 2013-12-20 13:57:06.458349572 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 13:57:06.500348986 +0100
|
||||
@@ -1486,7 +1486,7 @@ void state_selecting (cpp)
|
||||
client -> state = S_REQUESTING;
|
||||
|
||||
/* Bind to the address we received. */
|
||||
@ -25,7 +10,7 @@ index 551ccbf..e8df320 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1183,11 +1183,12 @@ void dhcpack (packet)
|
||||
@@ -1676,11 +1676,12 @@ void dhcpack (packet)
|
||||
if (client -> new -> rebind < cur_time)
|
||||
client -> new -> rebind = TIME_MAX;
|
||||
|
||||
@ -40,7 +25,7 @@ index 551ccbf..e8df320 100644
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
@@ -1209,6 +1210,13 @@ void bind_lease (client)
|
||||
@@ -1702,6 +1703,13 @@ void bind_lease (client)
|
||||
if (client -> alias)
|
||||
script_write_params (client, "alias_", client -> alias);
|
||||
|
||||
@ -54,11 +39,10 @@ index 551ccbf..e8df320 100644
|
||||
/* If the BOUND/RENEW code detects another machine using the
|
||||
offered address, it exits nonzero. We need to send a
|
||||
DHCPDECLINE and toss the lease. */
|
||||
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||
index 12ed2ba..4e93e68 100644
|
||||
--- a/includes/dhcpd.h
|
||||
+++ b/includes/dhcpd.h
|
||||
@@ -2712,7 +2712,7 @@ void state_bound (void *);
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.next-server dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.next-server 2013-12-20 13:57:06.434349907 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-20 13:57:06.502348958 +0100
|
||||
@@ -2771,7 +2771,7 @@ void state_bound (void *);
|
||||
void state_stop (void *);
|
||||
void state_panic (void *);
|
||||
|
||||
@ -67,6 +51,3 @@ index 12ed2ba..4e93e68 100644
|
||||
|
||||
void make_client_options (struct client_state *,
|
||||
struct client_lease *, u_int8_t *,
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.5/common/discover.c.error2info dhcp-4.2.5/common/discover.c
|
||||
--- dhcp-4.2.5/common/discover.c.error2info 2013-09-27 10:27:42.000000000 +0200
|
||||
+++ dhcp-4.2.5/common/discover.c 2013-09-27 10:29:30.687201624 +0200
|
||||
@@ -782,9 +782,9 @@ discover_interfaces(int state) {
|
||||
diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-4.3.0a1/common/discover.c
|
||||
--- dhcp-4.3.0a1/common/discover.c.error2info 2013-12-20 13:59:15.148553898 +0100
|
||||
+++ dhcp-4.3.0a1/common/discover.c 2013-12-20 13:59:15.181553438 +0100
|
||||
@@ -779,9 +779,9 @@ discover_interfaces(int state) {
|
||||
|
||||
/* We must have a subnet declaration for each interface. */
|
||||
if (!tmp->shared_network && (state == DISCOVER_SERVER)) {
|
||||
@ -13,7 +13,7 @@ diff -up dhcp-4.2.5/common/discover.c.error2info dhcp-4.2.5/common/discover.c
|
||||
tmp->name,
|
||||
(tmp->addresses == NULL) ?
|
||||
"no IPv4 addresses" :
|
||||
@@ -799,26 +799,26 @@ discover_interfaces(int state) {
|
||||
@@ -796,26 +796,26 @@ discover_interfaces(int state) {
|
||||
} else {
|
||||
strcpy(abuf, "no IPv6 addresses");
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
diff -up dhcp-4.2.5/common/comapi.c.leak dhcp-4.2.5/common/comapi.c
|
||||
diff -up dhcp-4.2.5/server/db.c.leak dhcp-4.2.5/server/db.c
|
||||
--- dhcp-4.2.5/server/db.c.leak 2013-07-02 13:34:56.000000000 +0200
|
||||
+++ dhcp-4.2.5/server/db.c 2013-07-02 13:37:06.335729135 +0200
|
||||
@@ -414,6 +414,7 @@ int write_host (host)
|
||||
diff -up dhcp-4.3.0a1/server/db.c.leak dhcp-4.3.0a1/server/db.c
|
||||
--- dhcp-4.3.0a1/server/db.c.leak 2013-12-20 13:39:51.629774500 +0100
|
||||
+++ dhcp-4.3.0a1/server/db.c 2013-12-20 13:39:51.673773887 +0100
|
||||
@@ -416,6 +416,7 @@ int write_host (host)
|
||||
fputc (';', db_file);
|
||||
if (errno)
|
||||
++errors;
|
||||
@ -10,10 +9,10 @@ diff -up dhcp-4.2.5/server/db.c.leak dhcp-4.2.5/server/db.c
|
||||
}
|
||||
|
||||
if (host -> named_group) {
|
||||
diff -up dhcp-4.2.5/server/omapi.c.leak dhcp-4.2.5/server/omapi.c
|
||||
--- dhcp-4.2.5/server/omapi.c.leak 2013-01-03 01:02:25.000000000 +0100
|
||||
+++ dhcp-4.2.5/server/omapi.c 2013-07-02 13:41:05.701429114 +0200
|
||||
@@ -1179,8 +1179,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
||||
diff -up dhcp-4.3.0a1/server/omapi.c.leak dhcp-4.3.0a1/server/omapi.c
|
||||
--- dhcp-4.3.0a1/server/omapi.c.leak 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/omapi.c 2013-12-20 13:39:51.674773873 +0100
|
||||
@@ -1133,8 +1133,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
||||
if (h -> type != dhcp_type_host)
|
||||
return DHCP_R_INVALIDARG;
|
||||
|
||||
@ -22,7 +21,7 @@ diff -up dhcp-4.2.5/server/omapi.c.leak dhcp-4.2.5/server/omapi.c
|
||||
struct host_decl *host = (struct host_decl *)h;
|
||||
if (host -> n_ipaddr)
|
||||
host_dereference (&host -> n_ipaddr, file, line);
|
||||
@@ -1199,7 +1197,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
||||
@@ -1153,7 +1151,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
||||
omapi_object_dereference ((omapi_object_t **)
|
||||
&host -> named_group, file, line);
|
||||
data_string_forget (&host -> auth_key_id, file, line);
|
||||
@ -30,7 +29,7 @@ diff -up dhcp-4.2.5/server/omapi.c.leak dhcp-4.2.5/server/omapi.c
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
@@ -1285,6 +1282,7 @@ isc_result_t dhcp_host_stuff_values (oma
|
||||
@@ -1239,6 +1236,7 @@ isc_result_t dhcp_host_stuff_values (oma
|
||||
ip_addrs.data, ip_addrs.len);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.5/client/dhclient.c.paranoia dhcp-4.2.5/client/dhclient.c
|
||||
--- dhcp-4.2.5/client/dhclient.c.paranoia 2013-03-26 13:14:50.574542083 +0100
|
||||
+++ dhcp-4.2.5/client/dhclient.c 2013-03-26 13:14:50.584541964 +0100
|
||||
@@ -1698,11 +1698,6 @@ int write_host (host)
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.paranoia dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.paranoia 2013-12-19 16:30:21.401211512 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 16:30:21.409211401 +0100
|
||||
@@ -1712,11 +1712,6 @@ int write_host (host)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -13,10 +13,10 @@ diff -up dhcp-4.2.5/client/dhclient.c.paranoia dhcp-4.2.5/client/dhclient.c
|
||||
void bootp (packet)
|
||||
struct packet *packet;
|
||||
{
|
||||
diff -up dhcp-4.2.5/includes/dhcpd.h.paranoia dhcp-4.2.5/includes/dhcpd.h
|
||||
--- dhcp-4.2.5/includes/dhcpd.h.paranoia 2013-03-26 13:14:50.576542059 +0100
|
||||
+++ dhcp-4.2.5/includes/dhcpd.h 2013-03-26 13:14:50.585541952 +0100
|
||||
@@ -2798,7 +2798,11 @@ void commit_leases_timeout (void *);
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.paranoia dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.paranoia 2013-12-19 16:30:21.403211484 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 16:30:21.410211387 +0100
|
||||
@@ -2851,7 +2851,11 @@ void commit_leases_timeout (void *);
|
||||
void commit_leases_readerdry(void *);
|
||||
int commit_leases (void);
|
||||
int commit_leases_timed (void);
|
||||
@ -28,10 +28,10 @@ diff -up dhcp-4.2.5/includes/dhcpd.h.paranoia dhcp-4.2.5/includes/dhcpd.h
|
||||
int new_lease_file (void);
|
||||
int group_writer (struct group_object *);
|
||||
int write_ia(const struct ia_xx *);
|
||||
diff -up dhcp-4.2.5/server/confpars.c.paranoia dhcp-4.2.5/server/confpars.c
|
||||
--- dhcp-4.2.5/server/confpars.c.paranoia 2013-03-26 13:14:50.522542705 +0100
|
||||
+++ dhcp-4.2.5/server/confpars.c 2013-03-26 13:14:50.587541928 +0100
|
||||
@@ -224,7 +224,11 @@ void trace_conf_input (trace_type_t *tty
|
||||
diff -up dhcp-4.3.0a1/server/confpars.c.paranoia dhcp-4.3.0a1/server/confpars.c
|
||||
--- dhcp-4.3.0a1/server/confpars.c.paranoia 2013-12-19 16:30:21.346212275 +0100
|
||||
+++ dhcp-4.3.0a1/server/confpars.c 2013-12-19 16:30:21.412211359 +0100
|
||||
@@ -225,7 +225,11 @@ void trace_conf_input (trace_type_t *tty
|
||||
}
|
||||
|
||||
if (!leaseconf_initialized && ttype == trace_readleases_type) {
|
||||
@ -43,10 +43,10 @@ diff -up dhcp-4.2.5/server/confpars.c.paranoia dhcp-4.2.5/server/confpars.c
|
||||
leaseconf_initialized = 1;
|
||||
postdb_startup ();
|
||||
}
|
||||
diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
|
||||
--- dhcp-4.2.5/server/db.c.paranoia 2013-03-26 13:14:50.522542705 +0100
|
||||
+++ dhcp-4.2.5/server/db.c 2013-03-26 13:14:50.588541916 +0100
|
||||
@@ -47,6 +47,10 @@ static int counting = 0;
|
||||
diff -up dhcp-4.3.0a1/server/db.c.paranoia dhcp-4.3.0a1/server/db.c
|
||||
--- dhcp-4.3.0a1/server/db.c.paranoia 2013-12-19 16:30:21.346212275 +0100
|
||||
+++ dhcp-4.3.0a1/server/db.c 2013-12-19 16:30:21.412211359 +0100
|
||||
@@ -48,6 +48,10 @@ static int counting = 0;
|
||||
static int count = 0;
|
||||
TIME write_time;
|
||||
int lease_file_is_corrupt = 0;
|
||||
@ -57,7 +57,7 @@ diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
|
||||
|
||||
/* Write a single binding scope value in parsable format.
|
||||
*/
|
||||
@@ -1026,8 +1030,11 @@ int commit_leases_timed()
|
||||
@@ -1052,8 +1056,11 @@ int commit_leases_timed()
|
||||
return (1);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
|
||||
{
|
||||
isc_result_t status;
|
||||
|
||||
@@ -1046,6 +1053,11 @@ void db_startup (testp)
|
||||
@@ -1072,6 +1079,11 @@ void db_startup (testp)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -83,7 +83,7 @@ diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
|
||||
#if defined (TRACING)
|
||||
/* If we're playing back, there is no lease file, so we can't
|
||||
append it, so we create one immediately (maybe this isn't
|
||||
@@ -1108,6 +1120,17 @@ int new_lease_file ()
|
||||
@@ -1134,6 +1146,17 @@ int new_lease_file ()
|
||||
log_error ("Can't create new lease file: %m");
|
||||
return 0;
|
||||
}
|
||||
@ -101,9 +101,9 @@ diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
|
||||
if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
|
||||
log_error("Can't fdopen new lease file: %m");
|
||||
close(db_fd);
|
||||
diff -up dhcp-4.2.5/server/dhcpd.8.paranoia dhcp-4.2.5/server/dhcpd.8
|
||||
--- dhcp-4.2.5/server/dhcpd.8.paranoia 2013-01-03 01:02:25.000000000 +0100
|
||||
+++ dhcp-4.2.5/server/dhcpd.8 2013-03-26 13:28:16.576604471 +0100
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.8.paranoia dhcp-4.3.0a1/server/dhcpd.8
|
||||
--- dhcp-4.3.0a1/server/dhcpd.8.paranoia 2013-12-11 01:01:03.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.8 2013-12-19 16:30:21.413211345 +0100
|
||||
@@ -82,6 +82,18 @@ dhcpd - Dynamic Host Configuration Proto
|
||||
.I trace-output-file
|
||||
]
|
||||
@ -139,10 +139,10 @@ diff -up dhcp-4.2.5/server/dhcpd.8.paranoia dhcp-4.2.5/server/dhcpd.8
|
||||
.PP
|
||||
.I Modifying default file locations:
|
||||
The following options can be used to modify the locations
|
||||
diff -up dhcp-4.2.5/server/dhcpd.c.paranoia dhcp-4.2.5/server/dhcpd.c
|
||||
--- dhcp-4.2.5/server/dhcpd.c.paranoia 2013-03-26 13:14:50.523542693 +0100
|
||||
+++ dhcp-4.2.5/server/dhcpd.c 2013-03-26 13:14:50.589541904 +0100
|
||||
@@ -702,7 +702,11 @@ main(int argc, char **argv) {
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.c.paranoia dhcp-4.3.0a1/server/dhcpd.c
|
||||
--- dhcp-4.3.0a1/server/dhcpd.c.paranoia 2013-12-19 16:30:21.347212261 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.c 2013-12-19 16:30:21.414211331 +0100
|
||||
@@ -623,7 +623,11 @@ main(int argc, char **argv) {
|
||||
group_write_hook = group_writer;
|
||||
|
||||
/* Start up the database... */
|
||||
@ -154,7 +154,7 @@ diff -up dhcp-4.2.5/server/dhcpd.c.paranoia dhcp-4.2.5/server/dhcpd.c
|
||||
|
||||
if (lftest)
|
||||
exit (0);
|
||||
@@ -773,22 +777,6 @@ main(int argc, char **argv) {
|
||||
@@ -694,22 +698,6 @@ main(int argc, char **argv) {
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ diff -up dhcp-4.2.5/server/dhcpd.c.paranoia dhcp-4.2.5/server/dhcpd.c
|
||||
/*
|
||||
* Deal with pid files. If the user told us
|
||||
* not to write a file we don't read one either
|
||||
@@ -825,6 +813,22 @@ main(int argc, char **argv) {
|
||||
@@ -746,6 +734,22 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf
|
||||
--- dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths 2012-08-24 21:11:21.000000000 +0200
|
||||
+++ dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf 2012-10-26 18:10:08.716560729 +0200
|
||||
diff -up dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf
|
||||
--- dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths 2013-11-07 20:15:08.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf 2013-12-19 15:34:16.262247711 +0100
|
||||
@@ -42,7 +42,7 @@ option dhcp6.domain-search "test.example
|
||||
option dhcp6.info-refresh-time 21600;
|
||||
|
||||
@ -10,10 +10,10 @@ diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.2.4-P2/doc/ex
|
||||
|
||||
# Static definition (must be global)
|
||||
host myclient {
|
||||
diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-4.2.4b1/includes/dhcpd.h
|
||||
--- dhcp-4.2.4b1/includes/dhcpd.h.paths 2012-04-18 11:12:34.000000000 +0200
|
||||
+++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-18 11:14:38.541272405 +0200
|
||||
@@ -1420,7 +1420,7 @@ typedef unsigned char option_mask [16];
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.paths dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.paths 2013-12-19 15:34:16.253247840 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 15:34:16.263247697 +0100
|
||||
@@ -1429,7 +1429,7 @@ typedef unsigned char option_mask [16];
|
||||
#else /* !DEBUG */
|
||||
|
||||
#ifndef _PATH_DHCPD_CONF
|
||||
@ -22,7 +22,7 @@ diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-4.2.4b1/includes/dhcpd.h
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef _PATH_DHCPD_DB
|
||||
@@ -1442,11 +1442,11 @@ typedef unsigned char option_mask [16];
|
||||
@@ -1451,11 +1451,11 @@ typedef unsigned char option_mask [16];
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef _PATH_DHCLIENT_CONF
|
@ -1,9 +1,8 @@
|
||||
diff --git a/server/confpars.c b/server/confpars.c
|
||||
index 12ab0e6..4454be9 100644
|
||||
--- a/server/confpars.c
|
||||
+++ b/server/confpars.c
|
||||
@@ -3756,6 +3756,19 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
|
||||
share->ipv6_pools[num_pools+1] = NULL;
|
||||
diff -up dhcp-4.3.0a1/server/confpars.c.range6 dhcp-4.3.0a1/server/confpars.c
|
||||
--- dhcp-4.3.0a1/server/confpars.c.range6 2013-12-20 13:53:44.899161427 +0100
|
||||
+++ dhcp-4.3.0a1/server/confpars.c 2013-12-20 13:56:31.595835977 +0100
|
||||
@@ -3925,6 +3925,18 @@ add_ipv6_pond_to_network(struct group *g
|
||||
return;
|
||||
}
|
||||
|
||||
+static void
|
||||
@ -18,20 +17,19 @@ index 12ab0e6..4454be9 100644
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
|
||||
/* address-range6-declaration :== ip-address6 ip-address6 SEMI
|
||||
| ip-address6 SLASH number SEMI
|
||||
| ip-address6 [SLASH number] TEMPORARY SEMI */
|
||||
@@ -3788,6 +3801,8 @@ parse_address_range6(struct parse *cfile, struct group *group) {
|
||||
return;
|
||||
}
|
||||
@@ -3967,6 +3979,8 @@ parse_address_range6(struct parse *cfile
|
||||
memset(&net, 0, sizeof(net));
|
||||
net.cidrnet.lo_addr = lo;
|
||||
|
||||
+ check_addr_in_subnet(group->subnet, &lo);
|
||||
+
|
||||
/*
|
||||
* See if we we're using range or CIDR notation or TEMPORARY
|
||||
*/
|
||||
@@ -3855,6 +3870,8 @@ parse_address_range6(struct parse *cfile, struct group *group) {
|
||||
@@ -4036,6 +4050,8 @@ parse_address_range6(struct parse *cfile
|
||||
return;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff -up dhcp-4.2.0/client/dhclient.c.ifup dhcp-4.2.0/client/dhclient.c
|
||||
--- dhcp-4.2.0/client/dhclient.c.ifup 2010-07-21 13:30:10.000000000 +0200
|
||||
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:37:03.000000000 +0200
|
||||
@@ -497,9 +497,81 @@ main(int argc, char **argv) {
|
||||
kill(oldpid, SIGTERM);
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.ifup dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.ifup 2013-12-19 14:53:08.817760677 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 15:05:16.290518574 +0100
|
||||
@@ -521,9 +521,81 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
fclose(pidfd);
|
||||
+ } else {
|
184
dhcp-remove-bind.patch
Normal file
184
dhcp-remove-bind.patch
Normal file
@ -0,0 +1,184 @@
|
||||
diff -up dhcp-4.3.0a1/Makefile.am.remove-bind dhcp-4.3.0a1/Makefile.am
|
||||
--- dhcp-4.3.0a1/Makefile.am.remove-bind 2013-12-13 21:49:44.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/Makefile.am 2013-12-19 14:23:48.907263942 +0100
|
||||
@@ -25,7 +25,13 @@ EXTRA_DIST = RELNOTES LICENSE \
|
||||
bind/Makefile bind/bind.tar.gz bind/version.tmp \
|
||||
common/tests/Atffile server/tests/Atffile
|
||||
|
||||
-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
|
||||
+if BUNDLED_BIND
|
||||
+SUBDIRS = bind
|
||||
+else
|
||||
+SUBDIRS =
|
||||
+endif
|
||||
+
|
||||
+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
|
||||
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.3.0a1/client/Makefile.am.remove-bind dhcp-4.3.0a1/client/Makefile.am
|
||||
--- dhcp-4.3.0a1/client/Makefile.am.remove-bind 2013-12-19 14:23:48.904263983 +0100
|
||||
+++ dhcp-4.3.0a1/client/Makefile.am 2013-12-19 14:32:27.845095985 +0100
|
||||
@@ -4,8 +4,8 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.3.0a1/common/tests/Makefile.am.remove-bind dhcp-4.3.0a1/common/tests/Makefile.am
|
||||
--- dhcp-4.3.0a1/common/tests/Makefile.am.remove-bind 2013-12-19 14:23:48.905263969 +0100
|
||||
+++ dhcp-4.3.0a1/common/tests/Makefile.am 2013-12-19 14:33:01.260634412 +0100
|
||||
@@ -13,15 +13,14 @@ ATF_TESTS += alloc_unittest dns_unittest
|
||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
alloc_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
||||
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
||||
+ ../../omapip/libomapi.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
dns_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
||||
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
||||
-
|
||||
+ ../../omapip/libomapi.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
check: $(ATF_TESTS)
|
||||
atf-run | atf-report
|
||||
|
||||
diff -up dhcp-4.3.0a1/configure.ac.remove-bind dhcp-4.3.0a1/configure.ac
|
||||
--- dhcp-4.3.0a1/configure.ac.remove-bind 2013-12-19 14:23:48.906263956 +0100
|
||||
+++ dhcp-4.3.0a1/configure.ac 2013-12-19 14:37:44.358723889 +0100
|
||||
@@ -552,20 +552,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
|
||||
|
||||
libbind=
|
||||
AC_ARG_WITH(libbind,
|
||||
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
|
||||
- (default is ./bind)]),
|
||||
+ AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH
|
||||
+ (default is ./bind/includes)]),
|
||||
use_libbind="$withval", use_libbind="no")
|
||||
case "$use_libbind" in
|
||||
+yes|no)
|
||||
+ libbind="\${top_srcdir}/bind/include"
|
||||
+ ;;
|
||||
+*)
|
||||
+ libbind="$use_libbind"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
|
||||
+AC_ARG_WITH(libbind-libs,
|
||||
+ AC_HELP_STRING([--with-libbind-libs=PATH],
|
||||
+ [bind9 export libraries are in PATH]),
|
||||
+ [libbind_libs="$withval"], [libbind_libs='no'])
|
||||
+case "$libbind_libs" in
|
||||
yes)
|
||||
- libbind="\${top_srcdir}/bind"
|
||||
+ AC_MSG_ERROR([Specify path to bind9 libraries])
|
||||
;;
|
||||
no)
|
||||
- libbind="\${top_srcdir}/bind"
|
||||
+ BUNDLED_BIND=yes
|
||||
;;
|
||||
*)
|
||||
- libbind="$use_libbind"
|
||||
+ BIND9_LIBDIR="-L$libbind_libs"
|
||||
+ BUNDLED_BIND=no
|
||||
;;
|
||||
esac
|
||||
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
|
||||
+AC_SUBST([BIND9_LIBDIR])
|
||||
|
||||
# OpenLDAP support.
|
||||
AC_ARG_WITH(ldap,
|
||||
@@ -600,7 +617,7 @@ fi
|
||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||
|
||||
# Try to add the bind include directory
|
||||
-CFLAGS="$CFLAGS -I$libbind/include"
|
||||
+CFLAGS="$CFLAGS -I$libbind"
|
||||
|
||||
case "$host" in
|
||||
*-darwin*)
|
||||
diff -up dhcp-4.3.0a1/dhcpctl/Makefile.am.remove-bind dhcp-4.3.0a1/dhcpctl/Makefile.am
|
||||
--- dhcp-4.3.0a1/dhcpctl/Makefile.am.remove-bind 2013-12-19 14:23:48.906263956 +0100
|
||||
+++ dhcp-4.3.0a1/dhcpctl/Makefile.am 2013-12-19 14:40:06.497754274 +0100
|
||||
@@ -6,12 +6,9 @@ EXTRA_DIST = $(man_MANS)
|
||||
|
||||
omshell_SOURCES = omshell.c
|
||||
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
-
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||
|
||||
cltest_SOURCES = cltest.c
|
||||
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
diff -up dhcp-4.3.0a1/omapip/Makefile.am.remove-bind dhcp-4.3.0a1/omapip/Makefile.am
|
||||
--- dhcp-4.3.0a1/omapip/Makefile.am.remove-bind 2013-12-19 14:23:48.908263928 +0100
|
||||
+++ dhcp-4.3.0a1/omapip/Makefile.am 2013-12-19 14:40:51.440118923 +0100
|
||||
@@ -10,6 +10,5 @@ man_MANS = omapi.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
-
|
||||
+svtest_LDADD = libomapi.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
diff -up dhcp-4.3.0a1/relay/Makefile.am.remove-bind dhcp-4.3.0a1/relay/Makefile.am
|
||||
--- dhcp-4.3.0a1/relay/Makefile.am.remove-bind 2013-12-19 14:23:48.908263928 +0100
|
||||
+++ dhcp-4.3.0a1/relay/Makefile.am 2013-12-19 14:41:27.302612345 +0100
|
||||
@@ -3,8 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.3.0a1/server/Makefile.am.remove-bind dhcp-4.3.0a1/server/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/Makefile.am.remove-bind 2013-12-19 14:23:48.910263900 +0100
|
||||
+++ dhcp-4.3.0a1/server/Makefile.am 2013-12-19 14:42:18.065895883 +0100
|
||||
@@ -13,10 +13,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
||||
-
|
||||
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
diff -up dhcp-4.3.0a1/server/tests/Makefile.am.remove-bind dhcp-4.3.0a1/server/tests/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/tests/Makefile.am.remove-bind 2013-12-19 14:23:48.911263886 +0100
|
||||
+++ dhcp-4.3.0a1/server/tests/Makefile.am 2013-12-19 14:43:32.943840285 +0100
|
||||
@@ -18,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||
../ldap.c ../ldap_casa.c ../dhcpd.c
|
||||
|
||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
|
||||
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
|
||||
- $(top_builddir)/bind/lib/libisc.a
|
||||
+ $(top_builddir)/dhcpctl/libdhcpctl.a \
|
||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
ATF_TESTS =
|
||||
TESTS =
|
46
dhcp-remove-dst.patch
Normal file
46
dhcp-remove-dst.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff -up dhcp-4.3.0a1/Makefile.am.remove-dst dhcp-4.3.0a1/Makefile.am
|
||||
--- dhcp-4.3.0a1/Makefile.am.remove-dst 2013-12-19 14:48:03.744033290 +0100
|
||||
+++ dhcp-4.3.0a1/Makefile.am 2013-12-19 14:48:03.753033163 +0100
|
||||
@@ -31,7 +31,7 @@ else
|
||||
SUBDIRS =
|
||||
endif
|
||||
|
||||
-SUBDIRS += includes tests common dst omapip client dhcpctl relay server
|
||||
+SUBDIRS += includes tests common omapip client dhcpctl relay server
|
||||
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.3.0a1/configure.ac.remove-dst dhcp-4.3.0a1/configure.ac
|
||||
--- dhcp-4.3.0a1/configure.ac.remove-dst 2013-12-19 14:48:03.745033276 +0100
|
||||
+++ dhcp-4.3.0a1/configure.ac 2013-12-19 14:48:03.752033177 +0100
|
||||
@@ -632,7 +632,6 @@ AC_CONFIG_FILES([
|
||||
common/Makefile
|
||||
common/tests/Makefile
|
||||
dhcpctl/Makefile
|
||||
- dst/Makefile
|
||||
includes/Makefile
|
||||
omapip/Makefile
|
||||
relay/Makefile
|
||||
diff -up dhcp-4.3.0a1/includes/Makefile.am.remove-dst dhcp-4.3.0a1/includes/Makefile.am
|
||||
--- dhcp-4.3.0a1/includes/Makefile.am.remove-dst 2013-11-07 20:15:08.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/includes/Makefile.am 2013-12-19 14:48:03.752033177 +0100
|
||||
@@ -1,7 +1,6 @@
|
||||
nobase_include_HEADERS = omapip/alloc.h omapip/buffer.h omapip/convert.h \
|
||||
omapip/hash.h omapip/isclib.h omapip/omapip.h \
|
||||
- omapip/omapip_p.h omapip/result.h omapip/trace.h \
|
||||
- isc-dhcp/dst.h
|
||||
+ omapip/omapip_p.h omapip/result.h omapip/trace.h
|
||||
|
||||
EXTRA_DIST = cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
|
||||
heap.h inet.h minires.h osdep.h site.h statement.h tree.h \
|
||||
diff -up dhcp-4.3.0a1/server/ddns.c.remove-dst dhcp-4.3.0a1/server/ddns.c
|
||||
--- dhcp-4.3.0a1/server/ddns.c.remove-dst 2013-12-19 14:48:03.754033149 +0100
|
||||
+++ dhcp-4.3.0a1/server/ddns.c 2013-12-19 14:49:14.102046556 +0100
|
||||
@@ -35,7 +35,6 @@
|
||||
*/
|
||||
|
||||
#include "dhcpd.h"
|
||||
-#include "dst/md5.h"
|
||||
#include <dns/result.h>
|
||||
|
||||
char *ddns_standard_tag = "ddns-dhcid";
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
|
||||
--- dhcp-4.2.1b1/client/dhc6.c.retransmission 2011-01-28 08:40:56.000000000 +0100
|
||||
+++ dhcp-4.2.1b1/client/dhc6.c 2011-01-28 08:39:22.000000000 +0100
|
||||
@@ -361,7 +361,7 @@ dhc6_retrans_init(struct client_state *c
|
||||
diff -up dhcp-4.3.0a1/client/dhc6.c.retransmission dhcp-4.3.0a1/client/dhc6.c
|
||||
--- dhcp-4.3.0a1/client/dhc6.c.retransmission 2013-12-19 15:57:09.629945386 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 15:57:09.634945316 +0100
|
||||
@@ -302,7 +302,7 @@ dhc6_retrans_init(struct client_state *c
|
||||
static void
|
||||
dhc6_retrans_advance(struct client_state *client)
|
||||
{
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
|
||||
|
||||
/* elapsed = cur - start */
|
||||
elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
|
||||
@@ -378,6 +378,8 @@ dhc6_retrans_advance(struct client_state
|
||||
@@ -319,6 +319,8 @@ dhc6_retrans_advance(struct client_state
|
||||
elapsed.tv_sec += 1;
|
||||
elapsed.tv_usec -= 1000000;
|
||||
}
|
||||
@ -19,7 +19,7 @@ diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
|
||||
|
||||
/*
|
||||
* RT for each subsequent message transmission is based on the previous
|
||||
@@ -415,13 +417,10 @@ dhc6_retrans_advance(struct client_state
|
||||
@@ -356,13 +358,10 @@ dhc6_retrans_advance(struct client_state
|
||||
elapsed.tv_usec -= 1000000;
|
||||
}
|
||||
if (elapsed.tv_sec >= client->MRD) {
|
||||
@ -37,7 +37,7 @@ diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
|
||||
}
|
||||
client->txcount++;
|
||||
}
|
||||
@@ -1497,7 +1496,7 @@ check_timing6 (struct client_state *clie
|
||||
@@ -1439,7 +1438,7 @@ check_timing6 (struct client_state *clie
|
||||
}
|
||||
|
||||
/* Check if finished (-1 argument). */
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
|
||||
--- dhcp-4.2.5b1/client/clparse.c.rfc3442 2012-12-17 13:23:34.387564654 +0100
|
||||
+++ dhcp-4.2.5b1/client/clparse.c 2012-12-17 13:23:34.437563996 +0100
|
||||
diff -up dhcp-4.3.0a1/client/clparse.c.rfc3442 dhcp-4.3.0a1/client/clparse.c
|
||||
--- dhcp-4.3.0a1/client/clparse.c.rfc3442 2013-12-19 15:57:58.641263026 +0100
|
||||
+++ dhcp-4.3.0a1/client/clparse.c 2013-12-19 15:57:58.685262413 +0100
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
struct client_config top_level_config;
|
||||
@ -35,9 +35,9 @@ diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
|
||||
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
||||
if (default_requested_options[code] == NULL)
|
||||
log_fatal("Unable to find option definition for "
|
||||
diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-options.5
|
||||
--- dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 2012-12-17 13:23:34.376564797 +0100
|
||||
+++ dhcp-4.2.5b1/common/dhcp-options.5 2012-12-17 13:25:18.435141385 +0100
|
||||
diff -up dhcp-4.3.0a1/common/dhcp-options.5.rfc3442 dhcp-4.3.0a1/common/dhcp-options.5
|
||||
--- dhcp-4.3.0a1/common/dhcp-options.5.rfc3442 2013-12-19 15:57:58.627263221 +0100
|
||||
+++ dhcp-4.3.0a1/common/dhcp-options.5 2013-12-19 15:57:58.686262399 +0100
|
||||
@@ -116,6 +116,26 @@ hexadecimal, separated by colons. For e
|
||||
or
|
||||
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
|
||||
@ -95,10 +95,10 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-opt
|
||||
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
|
||||
[\fB,\fR \fIip-address\fR...]\fB;\fR
|
||||
.fi
|
||||
diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
|
||||
--- dhcp-4.2.5b1/common/inet.c.rfc3442 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/common/inet.c 2012-12-17 13:23:34.440563957 +0100
|
||||
@@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
|
||||
diff -up dhcp-4.3.0a1/common/inet.c.rfc3442 dhcp-4.3.0a1/common/inet.c
|
||||
--- dhcp-4.3.0a1/common/inet.c.rfc3442 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/inet.c 2013-12-19 15:57:58.686262399 +0100
|
||||
@@ -527,6 +527,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
@ -159,9 +159,9 @@ diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
|
||||
/* piaddr() turns an iaddr structure into a printable address. */
|
||||
/* XXX: should use a const pointer rather than passing the structure */
|
||||
const char *
|
||||
diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
|
||||
--- dhcp-4.2.5b1/common/options.c.rfc3442 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/common/options.c 2012-12-17 13:29:38.961536040 +0100
|
||||
diff -up dhcp-4.3.0a1/common/options.c.rfc3442 dhcp-4.3.0a1/common/options.c
|
||||
--- dhcp-4.3.0a1/common/options.c.rfc3442 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/options.c 2013-12-19 15:57:58.687262386 +0100
|
||||
@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
|
||||
* packet.
|
||||
*/
|
||||
@ -246,9 +246,9 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
|
||||
case '6':
|
||||
iaddr.len = 16;
|
||||
memcpy(iaddr.iabuf, dp, 16);
|
||||
diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
|
||||
--- dhcp-4.2.5b1/common/parse.c.rfc3442 2012-12-17 13:23:34.408564378 +0100
|
||||
+++ dhcp-4.2.5b1/common/parse.c 2012-12-17 13:23:34.444563905 +0100
|
||||
diff -up dhcp-4.3.0a1/common/parse.c.rfc3442 dhcp-4.3.0a1/common/parse.c
|
||||
--- dhcp-4.3.0a1/common/parse.c.rfc3442 2013-12-19 15:57:58.660262761 +0100
|
||||
+++ dhcp-4.3.0a1/common/parse.c 2013-12-19 15:57:58.689262358 +0100
|
||||
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
|
||||
case IP6_ADDRESS:
|
||||
type = '6';
|
||||
break;
|
||||
@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
|
||||
@@ -5077,6 +5115,15 @@ int parse_option_token (rv, cfile, fmt,
|
||||
}
|
||||
break;
|
||||
|
||||
@ -327,7 +327,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
|
||||
case '6': /* IPv6 address. */
|
||||
if (!parse_ip6_addr(cfile, &addr)) {
|
||||
return 0;
|
||||
@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
|
||||
@@ -5354,6 +5401,13 @@ int parse_option_decl (oc, cfile)
|
||||
goto exit;
|
||||
len = ip_addr.len;
|
||||
dp = ip_addr.iabuf;
|
||||
@ -341,9 +341,9 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
|
||||
|
||||
alloc:
|
||||
if (hunkix + len > sizeof hunkbuf) {
|
||||
diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
|
||||
--- dhcp-4.2.5b1/common/tables.c.rfc3442 2012-12-17 13:23:34.398564508 +0100
|
||||
+++ dhcp-4.2.5b1/common/tables.c 2012-12-17 13:23:34.445563891 +0100
|
||||
diff -up dhcp-4.3.0a1/common/tables.c.rfc3442 dhcp-4.3.0a1/common/tables.c
|
||||
--- dhcp-4.3.0a1/common/tables.c.rfc3442 2013-12-19 15:57:58.652262873 +0100
|
||||
+++ dhcp-4.3.0a1/common/tables.c 2013-12-19 15:57:58.690262344 +0100
|
||||
@@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig
|
||||
Format codes:
|
||||
|
||||
@ -360,28 +360,9 @@ diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
|
||||
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
||||
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
||||
#if 0
|
||||
diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
|
||||
--- dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 2012-12-17 13:23:34.382564719 +0100
|
||||
+++ dhcp-4.2.5b1/includes/dhcpd.h 2012-12-17 13:23:34.446563877 +0100
|
||||
@@ -2678,6 +2678,7 @@ isc_result_t range2cidr(struct iaddrcidr
|
||||
const struct iaddr *lo, const struct iaddr *hi);
|
||||
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
|
||||
const char *piaddr (struct iaddr);
|
||||
+const char *pdestdesc (struct iaddr);
|
||||
char *piaddrmask(struct iaddr *, struct iaddr *);
|
||||
char *piaddrcidr(const struct iaddr *, unsigned int);
|
||||
u_int16_t validate_port(char *);
|
||||
@@ -2887,6 +2888,7 @@ void parse_client_lease_declaration (str
|
||||
int parse_option_decl (struct option_cache **, struct parse *);
|
||||
void parse_string_list (struct parse *, struct string_list **, int);
|
||||
int parse_ip_addr (struct parse *, struct iaddr *);
|
||||
+int parse_destination_descriptor (struct parse *, struct iaddr *);
|
||||
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
||||
void parse_reject_statement (struct parse *, struct client_config *);
|
||||
|
||||
diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
|
||||
--- dhcp-4.2.5b1/includes/dhcp.h.rfc3442 2012-10-23 21:02:13.000000000 +0200
|
||||
+++ dhcp-4.2.5b1/includes/dhcp.h 2012-12-17 13:23:34.446563877 +0100
|
||||
diff -up dhcp-4.3.0a1/includes/dhcp.h.rfc3442 dhcp-4.3.0a1/includes/dhcp.h
|
||||
--- dhcp-4.3.0a1/includes/dhcp.h.rfc3442 2013-12-11 01:01:03.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcp.h 2013-12-19 15:57:58.691262330 +0100
|
||||
@@ -163,6 +163,7 @@ struct dhcp_packet {
|
||||
#define DHO_ASSOCIATED_IP 92
|
||||
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
||||
@ -390,16 +371,35 @@ diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
|
||||
#define DHO_VIVCO_SUBOPTIONS 124
|
||||
#define DHO_VIVSO_SUBOPTIONS 125
|
||||
|
||||
diff -up dhcp-4.2.5b1/includes/dhctoken.h.rfc3442 dhcp-4.2.5b1/includes/dhctoken.h
|
||||
--- dhcp-4.2.5b1/includes/dhctoken.h.rfc3442 2012-12-17 13:23:34.348565167 +0100
|
||||
+++ dhcp-4.2.5b1/includes/dhctoken.h 2012-12-17 13:23:34.446563877 +0100
|
||||
@@ -365,7 +365,8 @@ enum dhcp_token {
|
||||
PRIMARY6 = 666,
|
||||
SECONDARY6 = 667,
|
||||
TOKEN_INFINIBAND = 668,
|
||||
- BOOTP_BROADCAST_ALWAYS = 669
|
||||
+ BOOTP_BROADCAST_ALWAYS = 669,
|
||||
+ DESTINATION_DESCRIPTOR = 670
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.rfc3442 dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.rfc3442 2013-12-19 15:57:58.637263082 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 15:57:58.691262330 +0100
|
||||
@@ -2731,6 +2731,7 @@ isc_result_t range2cidr(struct iaddrcidr
|
||||
const struct iaddr *lo, const struct iaddr *hi);
|
||||
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
|
||||
const char *piaddr (struct iaddr);
|
||||
+const char *pdestdesc (struct iaddr);
|
||||
char *piaddrmask(struct iaddr *, struct iaddr *);
|
||||
char *piaddrcidr(const struct iaddr *, unsigned int);
|
||||
u_int16_t validate_port(char *);
|
||||
@@ -2940,6 +2941,7 @@ void parse_client_lease_declaration (str
|
||||
int parse_option_decl (struct option_cache **, struct parse *);
|
||||
void parse_string_list (struct parse *, struct string_list **, int);
|
||||
int parse_ip_addr (struct parse *, struct iaddr *);
|
||||
+int parse_destination_descriptor (struct parse *, struct iaddr *);
|
||||
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
||||
void parse_reject_statement (struct parse *, struct client_config *);
|
||||
|
||||
diff -up dhcp-4.3.0a1/includes/dhctoken.h.rfc3442 dhcp-4.3.0a1/includes/dhctoken.h
|
||||
--- dhcp-4.3.0a1/includes/dhctoken.h.rfc3442 2013-12-19 15:57:58.692262316 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhctoken.h 2013-12-19 15:59:10.660260438 +0100
|
||||
@@ -374,7 +374,8 @@ enum dhcp_token {
|
||||
POOL6 = 669,
|
||||
V6RELAY = 670,
|
||||
V6RELOPT = 671,
|
||||
- BOOTP_BROADCAST_ALWAYS = 672
|
||||
+ BOOTP_BROADCAST_ALWAYS = 672,
|
||||
+ DESTINATION_DESCRIPTOR = 673
|
||||
};
|
||||
|
||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
@ -1,11 +1,11 @@
|
||||
diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-options.5
|
||||
--- dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 2012-12-17 13:43:44.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/common/dhcp-options.5 2012-12-17 13:45:18.777638579 +0100
|
||||
@@ -1771,7 +1771,48 @@ The \fBlq-relay-data\fR option is used i
|
||||
diff -up dhcp-4.3.0a1/common/dhcp-options.5.rfc5970 dhcp-4.3.0a1/common/dhcp-options.5
|
||||
--- dhcp-4.3.0a1/common/dhcp-options.5.rfc5970 2013-12-20 13:40:33.758187974 +0100
|
||||
+++ dhcp-4.3.0a1/common/dhcp-options.5 2013-12-20 13:42:32.416535547 +0100
|
||||
@@ -1770,6 +1770,46 @@ The \fBlq-relay-data\fR option is used i
|
||||
.PP
|
||||
The \fBlq-client-link\fR option is used internally by for lease query.
|
||||
.RE
|
||||
.PP
|
||||
+
|
||||
+.PP
|
||||
+.B option
|
||||
+.B dhcp6.bootfile-url
|
||||
+.I string
|
||||
@ -16,9 +16,8 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-opt
|
||||
+boot file. Used primarily for UEFI network booting, it contains an RFC3986
|
||||
+compliant URI which the client may use to boot an operating system. This option
|
||||
+is defined in RFC5970
|
||||
.RE
|
||||
+.RE
|
||||
+.PP
|
||||
+
|
||||
+.B option
|
||||
+.B dhcp6.arch-type
|
||||
+.I arch-id \fR[\fB,\fR arch-id\fR...]
|
||||
@ -33,7 +32,6 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-opt
|
||||
+This option is defined in RFC5970
|
||||
+ .RE
|
||||
+.PP
|
||||
+
|
||||
+.B option
|
||||
+.B dhcp6.net-id
|
||||
+.I uint8 uint8 uint8
|
||||
@ -47,12 +45,12 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-opt
|
||||
+This option is defined in RFC5970
|
||||
+.RE
|
||||
+.PP
|
||||
.SH DEFINING NEW OPTIONS
|
||||
The Internet Systems Consortium DHCP client and server provide the
|
||||
capability to define new options. Each DHCP option has a name, a
|
||||
diff -up dhcp-4.2.5b1/common/tables.c.rfc5970 dhcp-4.2.5b1/common/tables.c
|
||||
--- dhcp-4.2.5b1/common/tables.c.rfc5970 2012-12-17 13:43:44.204939024 +0100
|
||||
+++ dhcp-4.2.5b1/common/tables.c 2012-12-17 13:43:44.286937948 +0100
|
||||
.SH ACCESSING DHCPV6 RELAY OPTIONS
|
||||
.PP
|
||||
.B v6relay (\fBrelay-number\f, \fBoption\f)
|
||||
diff -up dhcp-4.3.0a1/common/tables.c.rfc5970 dhcp-4.3.0a1/common/tables.c
|
||||
--- dhcp-4.3.0a1/common/tables.c.rfc5970 2013-12-20 13:40:33.691188907 +0100
|
||||
+++ dhcp-4.3.0a1/common/tables.c 2013-12-20 13:40:33.759187960 +0100
|
||||
@@ -463,6 +463,18 @@ static struct option dhcpv6_options[] =
|
||||
{ "lq-relay-data", "6X", &dhcpv6_universe, 47, 1 },
|
||||
{ "lq-client-link", "6A", &dhcpv6_universe, 48, 1 },
|
||||
@ -72,10 +70,10 @@ diff -up dhcp-4.2.5b1/common/tables.c.rfc5970 dhcp-4.2.5b1/common/tables.c
|
||||
{ NULL, NULL, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
diff -up dhcp-4.2.5b1/includes/dhcp6.h.rfc5970 dhcp-4.2.5b1/includes/dhcp6.h
|
||||
--- dhcp-4.2.5b1/includes/dhcp6.h.rfc5970 2012-12-04 20:45:42.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/includes/dhcp6.h 2012-12-17 13:43:44.286937948 +0100
|
||||
@@ -75,6 +75,11 @@
|
||||
diff -up dhcp-4.3.0a1/includes/dhcp6.h.rfc5970 dhcp-4.3.0a1/includes/dhcp6.h
|
||||
--- dhcp-4.3.0a1/includes/dhcp6.h.rfc5970 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcp6.h 2013-12-20 13:40:33.760187946 +0100
|
||||
@@ -76,6 +76,11 @@
|
||||
#define D6O_CLT_TIME 46 /* RFC5007 */
|
||||
#define D6O_LQ_RELAY_DATA 47 /* RFC5007 */
|
||||
#define D6O_LQ_CLIENT_LINK 48 /* RFC5007 */
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
--- dhcp-4.2.5b1/client/dhc6.c.sendDecline 2012-12-05 02:17:38.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/client/dhc6.c 2012-12-17 13:21:16.922444939 +0100
|
||||
diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
||||
--- dhcp-4.3.0a1/client/dhc6.c.sendDecline 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 15:56:18.297660118 +0100
|
||||
@@ -96,6 +96,8 @@ void do_select6(void *input);
|
||||
void do_refresh6(void *input);
|
||||
static void do_release6(void *input);
|
||||
@ -10,7 +10,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
static void start_informed(struct client_state *client);
|
||||
void informed_handler(struct packet *packet, struct client_state *client);
|
||||
void bound_handler(struct packet *packet, struct client_state *client);
|
||||
@@ -2080,6 +2082,7 @@ start_release6(struct client_state *clie
|
||||
@@ -2017,6 +2019,7 @@ start_release6(struct client_state *clie
|
||||
cancel_timeout(do_select6, client);
|
||||
cancel_timeout(do_refresh6, client);
|
||||
cancel_timeout(do_release6, client);
|
||||
@ -18,7 +18,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
client->state = S_STOPPED;
|
||||
|
||||
/*
|
||||
@@ -2713,6 +2716,7 @@ dhc6_check_reply(struct client_state *cl
|
||||
@@ -2650,6 +2653,7 @@ dhc6_check_reply(struct client_state *cl
|
||||
break;
|
||||
|
||||
case S_STOPPED:
|
||||
@ -26,7 +26,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
action = dhc6_stop_action;
|
||||
break;
|
||||
|
||||
@@ -2814,6 +2818,7 @@ dhc6_check_reply(struct client_state *cl
|
||||
@@ -2751,6 +2755,7 @@ dhc6_check_reply(struct client_state *cl
|
||||
break;
|
||||
|
||||
case S_STOPPED:
|
||||
@ -34,7 +34,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
/* Nothing critical to do at this stage. */
|
||||
break;
|
||||
|
||||
@@ -3804,17 +3809,23 @@ reply_handler(struct packet *packet, str
|
||||
@@ -3741,17 +3746,23 @@ reply_handler(struct packet *packet, str
|
||||
cancel_timeout(do_select6, client);
|
||||
cancel_timeout(do_refresh6, client);
|
||||
cancel_timeout(do_release6, client);
|
||||
@ -66,7 +66,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4342,7 +4353,11 @@ start_bound(struct client_state *client)
|
||||
@@ -4279,7 +4290,11 @@ start_bound(struct client_state *client)
|
||||
dhc6_marshall_values("new_", client, lease, ia, addr);
|
||||
script_write_requested6(client);
|
||||
|
||||
@ -79,7 +79,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
|
||||
}
|
||||
|
||||
/* XXX: maybe we should loop on the old values instead? */
|
||||
@@ -4390,6 +4405,149 @@ start_bound(struct client_state *client)
|
||||
@@ -4327,6 +4342,149 @@ start_bound(struct client_state *client)
|
||||
dhc6_check_times(client);
|
||||
}
|
||||
|
124
dhcp-sharedlib.patch
Normal file
124
dhcp-sharedlib.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff -up dhcp-4.3.0a1/client/Makefile.am.sharedlib dhcp-4.3.0a1/client/Makefile.am
|
||||
--- dhcp-4.3.0a1/client/Makefile.am.sharedlib 2013-12-20 14:23:14.303534850 +0100
|
||||
+++ dhcp-4.3.0a1/client/Makefile.am 2013-12-20 14:23:14.312534725 +0100
|
||||
@@ -4,7 +4,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.3.0a1/common/tests/Makefile.am.sharedlib dhcp-4.3.0a1/common/tests/Makefile.am
|
||||
--- dhcp-4.3.0a1/common/tests/Makefile.am.sharedlib 2013-12-20 14:23:14.304534836 +0100
|
||||
+++ dhcp-4.3.0a1/common/tests/Makefile.am 2013-12-20 14:23:14.313534711 +0100
|
||||
@@ -13,13 +13,13 @@ ATF_TESTS += alloc_unittest dns_unittest
|
||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
alloc_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a \
|
||||
+ ../../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
||||
dns_unittest_LDADD += ../libdhcp.a \
|
||||
- ../../omapip/libomapi.a \
|
||||
+ ../../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
check: $(ATF_TESTS)
|
||||
atf-run | atf-report
|
||||
diff -up dhcp-4.3.0a1/configure.ac.sharedlib dhcp-4.3.0a1/configure.ac
|
||||
--- dhcp-4.3.0a1/configure.ac.sharedlib 2013-12-20 14:23:14.308534781 +0100
|
||||
+++ dhcp-4.3.0a1/configure.ac 2013-12-20 14:23:14.313534711 +0100
|
||||
@@ -39,7 +39,8 @@ fi
|
||||
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
-AC_PROG_RANLIB
|
||||
+# Use libtool to simplify building of shared libraries
|
||||
+AC_PROG_LIBTOOL
|
||||
AC_CONFIG_HEADERS([includes/config.h])
|
||||
|
||||
# we sometimes need to know byte order for building packets
|
||||
diff -up dhcp-4.3.0a1/dhcpctl/Makefile.am.sharedlib dhcp-4.3.0a1/dhcpctl/Makefile.am
|
||||
--- dhcp-4.3.0a1/dhcpctl/Makefile.am.sharedlib 2013-12-20 14:23:14.304534836 +0100
|
||||
+++ dhcp-4.3.0a1/dhcpctl/Makefile.am 2013-12-20 14:23:21.998428024 +0100
|
||||
@@ -1,14 +1,14 @@
|
||||
bin_PROGRAMS = omshell
|
||||
-lib_LIBRARIES = libdhcpctl.a
|
||||
+lib_LTLIBRARIES = libdhcpctl.la
|
||||
noinst_PROGRAMS = cltest
|
||||
man_MANS = omshell.1 dhcpctl.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
omshell_SOURCES = omshell.c
|
||||
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
|
||||
|
||||
cltest_SOURCES = cltest.c
|
||||
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
diff -up dhcp-4.3.0a1/omapip/Makefile.am.sharedlib dhcp-4.3.0a1/omapip/Makefile.am
|
||||
--- dhcp-4.3.0a1/omapip/Makefile.am.sharedlib 2013-12-20 14:23:14.304534836 +0100
|
||||
+++ dhcp-4.3.0a1/omapip/Makefile.am 2013-12-20 14:23:14.313534711 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
-lib_LIBRARIES = libomapi.a
|
||||
+lib_LTLIBRARIES = libomapi.la
|
||||
noinst_PROGRAMS = svtest
|
||||
|
||||
-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
||||
+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
||||
errwarn.c listener.c dispatch.c generic.c support.c \
|
||||
handle.c message.c convert.c hash.c auth.c inet_addr.c \
|
||||
array.c trace.c toisc.c iscprint.c isclib.c
|
||||
@@ -10,5 +10,5 @@ man_MANS = omapi.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
-svtest_LDADD = libomapi.a \
|
||||
+svtest_LDADD = libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
diff -up dhcp-4.3.0a1/relay/Makefile.am.sharedlib dhcp-4.3.0a1/relay/Makefile.am
|
||||
--- dhcp-4.3.0a1/relay/Makefile.am.sharedlib 2013-12-20 14:23:14.305534822 +0100
|
||||
+++ dhcp-4.3.0a1/relay/Makefile.am 2013-12-20 14:23:14.314534697 +0100
|
||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.3.0a1/server/Makefile.am.sharedlib dhcp-4.3.0a1/server/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/Makefile.am.sharedlib 2013-12-20 14:23:14.305534822 +0100
|
||||
+++ dhcp-4.3.0a1/server/Makefile.am 2013-12-20 14:23:14.314534697 +0100
|
||||
@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
|
||||
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dhcpctl/libdhcpctl.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.3.0a1/server/tests/Makefile.am.sharedlib dhcp-4.3.0a1/server/tests/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/tests/Makefile.am.sharedlib 2013-12-20 14:23:14.305534822 +0100
|
||||
+++ dhcp-4.3.0a1/server/tests/Makefile.am 2013-12-20 14:23:14.314534697 +0100
|
||||
@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
|
||||
../ldap.c ../ldap_casa.c ../dhcpd.c
|
||||
|
||||
-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
||||
- $(top_builddir)/dhcpctl/libdhcpctl.a \
|
||||
+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
|
||||
+ $(top_builddir)/dhcpctl/libdhcpctl.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
ATF_TESTS =
|
@ -1,7 +1,19 @@
|
||||
diff -up dhcp-4.2.5b1/configure.ac.systemtap dhcp-4.2.5b1/configure.ac
|
||||
--- dhcp-4.2.5b1/configure.ac.systemtap 2012-12-17 16:56:40.563881316 +0100
|
||||
+++ dhcp-4.2.5b1/configure.ac 2012-12-17 16:56:40.597880870 +0100
|
||||
@@ -554,6 +554,35 @@ else
|
||||
diff -up dhcp-4.3.0a1/Makefile.am.systemtap dhcp-4.3.0a1/Makefile.am
|
||||
--- dhcp-4.3.0a1/Makefile.am.systemtap 2013-12-20 13:30:26.149645305 +0100
|
||||
+++ dhcp-4.3.0a1/Makefile.am 2013-12-20 13:30:26.307643109 +0100
|
||||
@@ -33,5 +33,8 @@ endif
|
||||
|
||||
SUBDIRS += includes tests common omapip client dhcpctl relay server
|
||||
|
||||
+SUBDIRS += tapset
|
||||
+#DIST_SUBDIRS = $(SUBDIRS)
|
||||
+
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.3.0a1/configure.ac.systemtap dhcp-4.3.0a1/configure.ac
|
||||
--- dhcp-4.3.0a1/configure.ac.systemtap 2013-12-20 13:30:26.229644193 +0100
|
||||
+++ dhcp-4.3.0a1/configure.ac 2013-12-20 13:31:39.195630065 +0100
|
||||
@@ -524,6 +524,35 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
@ -37,29 +49,43 @@ diff -up dhcp-4.2.5b1/configure.ac.systemtap dhcp-4.2.5b1/configure.ac
|
||||
# Solaris needs some libraries for functions
|
||||
AC_SEARCH_LIBS(socket, [socket])
|
||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
||||
@@ -701,6 +730,7 @@ AC_OUTPUT([
|
||||
@@ -675,6 +704,7 @@ AC_CONFIG_FILES([
|
||||
tests/Makefile
|
||||
server/tests/Makefile
|
||||
doc/devel/doxyfile
|
||||
+ tapset/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
sh util/bindvar.sh
|
||||
diff -up dhcp-4.2.5b1/Makefile.am.systemtap dhcp-4.2.5b1/Makefile.am
|
||||
--- dhcp-4.2.5b1/Makefile.am.systemtap 2012-12-17 16:56:40.461882654 +0100
|
||||
+++ dhcp-4.2.5b1/Makefile.am 2012-12-17 16:56:40.597880870 +0100
|
||||
@@ -30,5 +30,8 @@ endif
|
||||
diff -up dhcp-4.3.0a1/server/Makefile.am.systemtap dhcp-4.3.0a1/server/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/Makefile.am.systemtap 2013-12-20 13:30:26.156645207 +0100
|
||||
+++ dhcp-4.3.0a1/server/Makefile.am 2013-12-20 13:34:16.057447630 +0100
|
||||
@@ -10,7 +10,7 @@ dist_sysconf_DATA = dhcpd.conf.example
|
||||
sbin_PROGRAMS = dhcpd
|
||||
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||
omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
|
||||
- dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
+ dhcpv6.c mdb6.c ldap.c ldap_casa.c probes.d trace.h
|
||||
|
||||
SUBDIRS += includes tests common omapip client dhcpctl relay server
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dhcpctl/libdhcpctl.la \
|
||||
@@ -18,3 +18,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
+SUBDIRS += tapset
|
||||
+#DIST_SUBDIRS = $(SUBDIRS)
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+BUILT_SOURCES = probes.h
|
||||
+probes.h: probes.d
|
||||
+ $(DTRACE) -C -h -s $< -o $@
|
||||
+
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
--- dhcp-4.2.5b1/server/dhcp.c.systemtap 2012-12-17 16:56:40.483882364 +0100
|
||||
+++ dhcp-4.2.5b1/server/dhcp.c 2012-12-17 16:56:40.599880842 +0100
|
||||
+probes.o: probes.d
|
||||
+ $(DTRACE) -C -G -s $< -o $@
|
||||
+
|
||||
+dhcpd_LDADD += probes.o
|
||||
+endif
|
||||
diff -up dhcp-4.3.0a1/server/dhcp.c.systemtap dhcp-4.3.0a1/server/dhcp.c
|
||||
--- dhcp-4.3.0a1/server/dhcp.c.systemtap 2013-12-20 13:30:26.182644846 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcp.c 2013-12-20 13:32:22.909022163 +0100
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
@ -132,7 +158,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
/* DHCPDECLINE must specify address. */
|
||||
if (!(oc = lookup_option (&dhcp_universe, packet -> options,
|
||||
DHO_DHCP_REQUESTED_ADDRESS)))
|
||||
@@ -970,6 +984,8 @@ void dhcpdecline (packet, ms_nulltp)
|
||||
@@ -967,6 +981,8 @@ void dhcpdecline (packet, ms_nulltp)
|
||||
option_state_dereference (&options, MDL);
|
||||
if (lease)
|
||||
lease_dereference (&lease, MDL);
|
||||
@ -141,16 +167,16 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
}
|
||||
|
||||
void dhcpinform (packet, ms_nulltp)
|
||||
@@ -993,6 +1009,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
struct interface_info *interface;
|
||||
int result;
|
||||
@@ -994,6 +1010,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
int h_w_fixed_addr = 0;
|
||||
#endif
|
||||
|
||||
+ TRACE(DHCPD_INFORM_START());
|
||||
+
|
||||
/* The client should set ciaddr to its IP address, but apparently
|
||||
it's common for clients not to do this, so we'll use their IP
|
||||
source address if they didn't set ciaddr. */
|
||||
@@ -1350,6 +1368,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
@@ -1567,6 +1585,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
|
||||
if (subnet)
|
||||
subnet_dereference (&subnet, MDL);
|
||||
@ -159,7 +185,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
}
|
||||
|
||||
void nak_lease (packet, cip)
|
||||
@@ -1366,6 +1386,8 @@ void nak_lease (packet, cip)
|
||||
@@ -1583,6 +1603,8 @@ void nak_lease (packet, cip)
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
struct option_cache *oc = (struct option_cache *)0;
|
||||
|
||||
@ -168,7 +194,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
option_state_allocate (&options, MDL);
|
||||
memset (&outgoing, 0, sizeof outgoing);
|
||||
memset (&raw, 0, sizeof raw);
|
||||
@@ -1532,6 +1554,7 @@ void nak_lease (packet, cip)
|
||||
@@ -1749,6 +1771,7 @@ void nak_lease (packet, cip)
|
||||
packet->interface->name);
|
||||
}
|
||||
|
||||
@ -176,7 +202,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
}
|
||||
|
||||
void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
|
||||
@@ -1573,6 +1596,8 @@ void ack_lease (packet, lease, offer, wh
|
||||
@@ -1792,6 +1815,8 @@ void ack_lease (packet, lease, offer, wh
|
||||
if (lease -> state)
|
||||
return;
|
||||
|
||||
@ -185,7 +211,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
/* Save original cltt for comparison later. */
|
||||
lease_cltt = lease->cltt;
|
||||
|
||||
@@ -2936,6 +2961,8 @@ void ack_lease (packet, lease, offer, wh
|
||||
@@ -3225,6 +3250,8 @@ void ack_lease (packet, lease, offer, wh
|
||||
#endif
|
||||
dhcp_reply(lease);
|
||||
}
|
||||
@ -194,7 +220,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3088,6 +3115,8 @@ void dhcp_reply (lease)
|
||||
@@ -3377,6 +3404,8 @@ void dhcp_reply (lease)
|
||||
if (!state)
|
||||
log_fatal ("dhcp_reply was supplied lease with no state!");
|
||||
|
||||
@ -203,7 +229,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
/* Compose a response for the client... */
|
||||
memset (&raw, 0, sizeof raw);
|
||||
memset (&d1, 0, sizeof d1);
|
||||
@@ -3309,6 +3338,8 @@ void dhcp_reply (lease)
|
||||
@@ -3598,6 +3627,8 @@ void dhcp_reply (lease)
|
||||
|
||||
free_lease_state (state, MDL);
|
||||
lease -> state = (struct lease_state *)0;
|
||||
@ -212,7 +238,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
}
|
||||
|
||||
int find_lease (struct lease **lp,
|
||||
@@ -3331,6 +3362,8 @@ int find_lease (struct lease **lp,
|
||||
@@ -3620,6 +3651,8 @@ int find_lease (struct lease **lp,
|
||||
struct data_string client_identifier;
|
||||
struct hardware h;
|
||||
|
||||
@ -221,7 +247,7 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
#if defined(FAILOVER_PROTOCOL)
|
||||
/* Quick check to see if the peer has leases. */
|
||||
if (peer_has_leases) {
|
||||
@@ -4058,6 +4091,9 @@ int find_lease (struct lease **lp,
|
||||
@@ -4347,6 +4380,9 @@ int find_lease (struct lease **lp,
|
||||
#if defined (DEBUG_FIND_LEASE)
|
||||
log_info ("Not returning a lease.");
|
||||
#endif
|
||||
@ -231,9 +257,9 @@ diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -up dhcp-4.2.5b1/server/dhcpd.c.systemtap dhcp-4.2.5b1/server/dhcpd.c
|
||||
--- dhcp-4.2.5b1/server/dhcpd.c.systemtap 2012-12-17 16:56:40.578881119 +0100
|
||||
+++ dhcp-4.2.5b1/server/dhcpd.c 2012-12-17 16:56:40.599880842 +0100
|
||||
diff -up dhcp-4.3.0a1/server/dhcpd.c.systemtap dhcp-4.3.0a1/server/dhcpd.c
|
||||
--- dhcp-4.3.0a1/server/dhcpd.c.systemtap 2013-12-20 13:30:26.281643471 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpd.c 2013-12-20 13:33:26.013144200 +0100
|
||||
@@ -58,6 +58,8 @@ static const char url [] =
|
||||
# undef group
|
||||
#endif /* PARANOIA */
|
||||
@ -243,26 +269,27 @@ diff -up dhcp-4.2.5b1/server/dhcpd.c.systemtap dhcp-4.2.5b1/server/dhcpd.c
|
||||
#ifndef UNIT_TEST
|
||||
static void usage(void);
|
||||
#endif
|
||||
@@ -865,6 +867,7 @@ main(int argc, char **argv) {
|
||||
omapi_set_int_value ((omapi_object_t *)dhcp_control_object,
|
||||
(omapi_object_t *)0, "state", server_running);
|
||||
@@ -793,6 +795,8 @@ main(int argc, char **argv) {
|
||||
/* Log that we are about to start working */
|
||||
log_info("Server starting service.");
|
||||
|
||||
+ TRACE(DHCPD_MAIN());
|
||||
/* Receive packets and dispatch them... */
|
||||
dispatch ();
|
||||
|
||||
diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
--- dhcp-4.2.5b1/server/dhcpv6.c.systemtap 2012-12-17 16:56:40.571881210 +0100
|
||||
+++ dhcp-4.2.5b1/server/dhcpv6.c 2012-12-17 16:56:40.601880816 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
+ TRACE(DHCPD_MAIN());
|
||||
+
|
||||
/*
|
||||
* Receive packets and dispatch them...
|
||||
* dispatch() will never return.
|
||||
diff -up dhcp-4.3.0a1/server/dhcpv6.c.systemtap dhcp-4.3.0a1/server/dhcpv6.c
|
||||
--- dhcp-4.3.0a1/server/dhcpv6.c.systemtap 2013-12-20 13:30:26.272643596 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcpv6.c 2013-12-20 13:33:48.296834064 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
/*! \file server/dhcpv6.c */
|
||||
|
||||
#include "dhcpd.h"
|
||||
+#include "trace.h"
|
||||
|
||||
#ifdef DHCPv6
|
||||
|
||||
@@ -4212,6 +4213,8 @@ static void
|
||||
@@ -4763,6 +4764,8 @@ static void
|
||||
dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
|
||||
@ -271,7 +298,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -4225,6 +4228,8 @@ dhcpv6_solicit(struct data_string *reply
|
||||
@@ -4776,6 +4779,8 @@ dhcpv6_solicit(struct data_string *reply
|
||||
* Clean up.
|
||||
*/
|
||||
data_string_forget(&client_id, MDL);
|
||||
@ -280,7 +307,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4238,6 +4243,8 @@ dhcpv6_request(struct data_string *reply
|
||||
@@ -4789,6 +4794,8 @@ dhcpv6_request(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
@ -289,7 +316,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -4255,6 +4262,8 @@ dhcpv6_request(struct data_string *reply
|
||||
@@ -4806,6 +4813,8 @@ dhcpv6_request(struct data_string *reply
|
||||
*/
|
||||
data_string_forget(&client_id, MDL);
|
||||
data_string_forget(&server_id, MDL);
|
||||
@ -298,7 +325,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/* Find a DHCPv6 packet's shared network from hints in the packet.
|
||||
@@ -4367,6 +4376,8 @@ dhcpv6_confirm(struct data_string *reply
|
||||
@@ -4918,6 +4927,8 @@ dhcpv6_confirm(struct data_string *reply
|
||||
struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data;
|
||||
int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options));
|
||||
|
||||
@ -307,7 +334,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Basic client message validation.
|
||||
*/
|
||||
@@ -4553,6 +4564,8 @@ exit:
|
||||
@@ -5104,6 +5115,8 @@ exit:
|
||||
option_state_dereference(&cli_enc_opt_state, MDL);
|
||||
if (opt_state != NULL)
|
||||
option_state_dereference(&opt_state, MDL);
|
||||
@ -316,7 +343,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4567,6 +4580,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
@@ -5118,6 +5131,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
@ -325,7 +352,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate the request.
|
||||
*/
|
||||
@@ -4584,6 +4599,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
@@ -5135,6 +5150,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
*/
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
@ -334,7 +361,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4597,6 +4614,8 @@ static void
|
||||
@@ -5148,6 +5165,8 @@ static void
|
||||
dhcpv6_rebind(struct data_string *reply, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
|
||||
@ -343,7 +370,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
if (!valid_client_msg(packet, &client_id)) {
|
||||
return;
|
||||
}
|
||||
@@ -4604,6 +4623,8 @@ dhcpv6_rebind(struct data_string *reply,
|
||||
@@ -5155,6 +5174,8 @@ dhcpv6_rebind(struct data_string *reply,
|
||||
lease_to_client(reply, packet, &client_id, NULL);
|
||||
|
||||
data_string_forget(&client_id, MDL);
|
||||
@ -352,7 +379,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5048,6 +5069,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
@@ -5599,6 +5620,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
@ -361,7 +388,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -5068,6 +5091,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
@@ -5619,6 +5642,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
@ -370,7 +397,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5516,6 +5541,8 @@ dhcpv6_release(struct data_string *reply
|
||||
@@ -6067,6 +6092,8 @@ dhcpv6_release(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
@ -379,7 +406,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -5537,6 +5564,8 @@ dhcpv6_release(struct data_string *reply
|
||||
@@ -6088,6 +6115,8 @@ dhcpv6_release(struct data_string *reply
|
||||
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
@ -388,7 +415,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5549,6 +5578,8 @@ dhcpv6_information_request(struct data_s
|
||||
@@ -6100,6 +6129,8 @@ dhcpv6_information_request(struct data_s
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
@ -397,7 +424,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -5580,6 +5611,8 @@ dhcpv6_information_request(struct data_s
|
||||
@@ -6131,6 +6162,8 @@ dhcpv6_information_request(struct data_s
|
||||
data_string_forget(&client_id, MDL);
|
||||
}
|
||||
data_string_forget(&server_id, MDL);
|
||||
@ -406,7 +433,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5608,6 +5641,8 @@ dhcpv6_relay_forw(struct data_string *re
|
||||
@@ -6159,6 +6192,8 @@ dhcpv6_relay_forw(struct data_string *re
|
||||
struct dhcpv6_relay_packet *reply;
|
||||
int reply_ofs;
|
||||
|
||||
@ -415,7 +442,7 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
/*
|
||||
* Initialize variables for early exit.
|
||||
*/
|
||||
@@ -5867,6 +5902,8 @@ exit:
|
||||
@@ -6418,6 +6453,8 @@ exit:
|
||||
if (enc_packet != NULL) {
|
||||
packet_dereference(&enc_packet, MDL);
|
||||
}
|
||||
@ -424,9 +451,9 @@ diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
|
||||
}
|
||||
|
||||
static void
|
||||
diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
--- dhcp-4.2.5b1/server/failover.c.systemtap 2012-12-05 02:17:39.000000000 +0100
|
||||
+++ dhcp-4.2.5b1/server/failover.c 2012-12-17 16:56:40.603880790 +0100
|
||||
diff -up dhcp-4.3.0a1/server/failover.c.systemtap dhcp-4.3.0a1/server/failover.c
|
||||
--- dhcp-4.3.0a1/server/failover.c.systemtap 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/failover.c 2013-12-20 13:30:26.314643012 +0100
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "dhcpd.h"
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -436,7 +463,7 @@ diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
#if defined (FAILOVER_PROTOCOL)
|
||||
dhcp_failover_state_t *failover_states;
|
||||
static isc_result_t do_a_failover_option (omapi_object_t *,
|
||||
@@ -1712,6 +1714,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
@@ -1710,6 +1712,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
struct lease *l;
|
||||
struct timeval tv;
|
||||
|
||||
@ -445,7 +472,7 @@ diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
/* If we're in certain states where we're sending updates, and the peer
|
||||
* state changes, we need to re-schedule any pending updates just to
|
||||
* be on the safe side. This results in retransmission.
|
||||
@@ -1939,6 +1943,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
@@ -1941,6 +1945,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
break;
|
||||
}
|
||||
|
||||
@ -454,7 +481,7 @@ diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -2422,6 +2428,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
@@ -2428,6 +2434,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
if (state -> me.state != normal)
|
||||
return 0;
|
||||
|
||||
@ -463,7 +490,7 @@ diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
state->last_balance = cur_time;
|
||||
|
||||
for (s = shared_networks ; s ; s = s->next) {
|
||||
@@ -2582,6 +2590,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
@@ -2588,6 +2596,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
if (leases_queued)
|
||||
commit_leases();
|
||||
|
||||
@ -472,35 +499,9 @@ diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
|
||||
return leases_queued;
|
||||
}
|
||||
|
||||
diff -up dhcp-4.2.5b1/server/Makefile.am.systemtap dhcp-4.2.5b1/server/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/Makefile.am.systemtap 2012-12-17 16:56:40.563881316 +0100
|
||||
+++ dhcp-4.2.5b1/server/Makefile.am 2012-12-17 16:56:40.603880790 +0100
|
||||
@@ -10,7 +10,7 @@ dist_sysconf_DATA = dhcpd.conf.example
|
||||
sbin_PROGRAMS = dhcpd
|
||||
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||
omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
|
||||
- dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
+ dhcpv6.c mdb6.c ldap.c ldap_casa.c probes.d trace.h
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
||||
@@ -19,3 +19,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+BUILT_SOURCES = probes.h
|
||||
+probes.h: probes.d
|
||||
+ $(DTRACE) -C -h -s $< -o $@
|
||||
+
|
||||
+probes.o: probes.d
|
||||
+ $(DTRACE) -C -G -s $< -o $@
|
||||
+
|
||||
+dhcpd_LDADD += probes.o
|
||||
+endif
|
||||
diff -up dhcp-4.2.5b1/server/probes.d.systemtap dhcp-4.2.5b1/server/probes.d
|
||||
--- dhcp-4.2.5b1/server/probes.d.systemtap 2012-12-17 16:56:40.603880790 +0100
|
||||
+++ dhcp-4.2.5b1/server/probes.d 2012-12-17 16:56:40.603880790 +0100
|
||||
diff -up dhcp-4.3.0a1/server/probes.d.systemtap dhcp-4.3.0a1/server/probes.d
|
||||
--- dhcp-4.3.0a1/server/probes.d.systemtap 2013-12-20 13:30:26.314643012 +0100
|
||||
+++ dhcp-4.3.0a1/server/probes.d 2013-12-20 13:30:26.314643012 +0100
|
||||
@@ -0,0 +1,43 @@
|
||||
+provider dhcpd {
|
||||
+ probe main();
|
||||
@ -545,12 +546,12 @@ diff -up dhcp-4.2.5b1/server/probes.d.systemtap dhcp-4.2.5b1/server/probes.d
|
||||
+ probe failover_set_state_start(int, int) /* state, new_state */
|
||||
+ probe failover_set_state_done()
|
||||
+};
|
||||
diff -up dhcp-4.2.5b1/server/tests/Makefile.am.systemtap dhcp-4.2.5b1/server/tests/Makefile.am
|
||||
--- dhcp-4.2.5b1/server/tests/Makefile.am.systemtap 2012-12-17 16:56:40.564881302 +0100
|
||||
+++ dhcp-4.2.5b1/server/tests/Makefile.am 2012-12-17 16:56:57.505650518 +0100
|
||||
@@ -20,6 +20,10 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
|
||||
$(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
diff -up dhcp-4.3.0a1/server/tests/Makefile.am.systemtap dhcp-4.3.0a1/server/tests/Makefile.am
|
||||
--- dhcp-4.3.0a1/server/tests/Makefile.am.systemtap 2013-12-20 13:30:26.315642998 +0100
|
||||
+++ dhcp-4.3.0a1/server/tests/Makefile.am 2013-12-20 13:34:57.263873891 +0100
|
||||
@@ -21,6 +21,10 @@ DHCPLIBS = $(top_builddir)/common/libdhc
|
||||
$(top_builddir)/dhcpctl/libdhcpctl.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+DHCPLIBS += ../probes.o
|
||||
@ -559,9 +560,9 @@ diff -up dhcp-4.2.5b1/server/tests/Makefile.am.systemtap dhcp-4.2.5b1/server/tes
|
||||
ATF_TESTS =
|
||||
TESTS =
|
||||
if HAVE_ATF
|
||||
diff -up dhcp-4.2.5b1/server/trace.h.systemtap dhcp-4.2.5b1/server/trace.h
|
||||
--- dhcp-4.2.5b1/server/trace.h.systemtap 2012-12-17 16:56:40.604880777 +0100
|
||||
+++ dhcp-4.2.5b1/server/trace.h 2012-12-17 16:56:40.604880777 +0100
|
||||
diff -up dhcp-4.3.0a1/server/trace.h.systemtap dhcp-4.3.0a1/server/trace.h
|
||||
--- dhcp-4.3.0a1/server/trace.h.systemtap 2013-12-20 13:30:26.315642998 +0100
|
||||
+++ dhcp-4.3.0a1/server/trace.h 2013-12-20 13:30:26.315642998 +0100
|
||||
@@ -0,0 +1,11 @@
|
||||
+// trace.h
|
||||
+
|
||||
@ -574,9 +575,39 @@ diff -up dhcp-4.2.5b1/server/trace.h.systemtap dhcp-4.2.5b1/server/trace.h
|
||||
+// Wrap the probe to allow it to be removed when no systemtap available
|
||||
+#define TRACE(probe)
|
||||
+#endif
|
||||
diff -up dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap dhcp-4.2.5b1/tapset/dhcpd.stp
|
||||
--- dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap 2012-12-17 16:56:40.604880777 +0100
|
||||
+++ dhcp-4.2.5b1/tapset/dhcpd.stp 2012-12-17 16:56:40.604880777 +0100
|
||||
diff -up dhcp-4.3.0a1/tapset/Makefile.am.systemtap dhcp-4.3.0a1/tapset/Makefile.am
|
||||
--- dhcp-4.3.0a1/tapset/Makefile.am.systemtap 2013-12-20 13:30:26.315642998 +0100
|
||||
+++ dhcp-4.3.0a1/tapset/Makefile.am 2013-12-20 13:30:26.315642998 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+# Makefile.am for dhcp/tapset
|
||||
+# Jiri Popelka
|
||||
+
|
||||
+.PHONY: clean-local install-data-hook uninstall-local
|
||||
+
|
||||
+#
|
||||
+EXTRA_DIST = dhcpd.stp
|
||||
+TAPSET_FILES = $(EXTRA_DIST)
|
||||
+TAPSET_INSTALL_DIR = $(DESTDIR)@ABS_TAPSET_DIR@
|
||||
+
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+all-local: $(TAPSET_FILES)
|
||||
+
|
||||
+clean-local:
|
||||
+
|
||||
+install-data-hook:
|
||||
+ $(MKDIR_P) $(TAPSET_INSTALL_DIR)
|
||||
+ $(INSTALL_DATA) $(TAPSET_FILES) $(TAPSET_INSTALL_DIR)
|
||||
+
|
||||
+uninstall-local:
|
||||
+ @list='$(TAPSET_FILES)'; for p in $$list; do \
|
||||
+ echo " rm -f '$(TAPSET_INSTALL_DIR)/$$p'"; \
|
||||
+ rm -f "$(TAPSET_INSTALL_DIR)/$$p"; \
|
||||
+ done
|
||||
+endif
|
||||
+
|
||||
diff -up dhcp-4.3.0a1/tapset/dhcpd.stp.systemtap dhcp-4.3.0a1/tapset/dhcpd.stp
|
||||
--- dhcp-4.3.0a1/tapset/dhcpd.stp.systemtap 2013-12-20 13:30:26.315642998 +0100
|
||||
+++ dhcp-4.3.0a1/tapset/dhcpd.stp 2013-12-20 13:30:26.315642998 +0100
|
||||
@@ -0,0 +1,212 @@
|
||||
+/* dhcpd tapset
|
||||
+ Copyright (C) 2011, Red Hat Inc.
|
||||
@ -790,33 +821,3 @@ diff -up dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap dhcp-4.2.5b1/tapset/dhcpd.stp
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
diff -up dhcp-4.2.5b1/tapset/Makefile.am.systemtap dhcp-4.2.5b1/tapset/Makefile.am
|
||||
--- dhcp-4.2.5b1/tapset/Makefile.am.systemtap 2012-12-17 16:56:40.604880777 +0100
|
||||
+++ dhcp-4.2.5b1/tapset/Makefile.am 2012-12-17 16:56:40.604880777 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+# Makefile.am for dhcp/tapset
|
||||
+# Jiri Popelka
|
||||
+
|
||||
+.PHONY: clean-local install-data-hook uninstall-local
|
||||
+
|
||||
+#
|
||||
+EXTRA_DIST = dhcpd.stp
|
||||
+TAPSET_FILES = $(EXTRA_DIST)
|
||||
+TAPSET_INSTALL_DIR = $(DESTDIR)@ABS_TAPSET_DIR@
|
||||
+
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+all-local: $(TAPSET_FILES)
|
||||
+
|
||||
+clean-local:
|
||||
+
|
||||
+install-data-hook:
|
||||
+ $(MKDIR_P) $(TAPSET_INSTALL_DIR)
|
||||
+ $(INSTALL_DATA) $(TAPSET_FILES) $(TAPSET_INSTALL_DIR)
|
||||
+
|
||||
+uninstall-local:
|
||||
+ @list='$(TAPSET_FILES)'; for p in $$list; do \
|
||||
+ echo " rm -f '$(TAPSET_INSTALL_DIR)/$$p'"; \
|
||||
+ rm -f "$(TAPSET_INSTALL_DIR)/$$p"; \
|
||||
+ done
|
||||
+endif
|
||||
+
|
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
|
||||
--- dhcp-4.2.4b1/server/bootp.c.unicast 2012-04-10 23:27:06.000000000 +0200
|
||||
+++ dhcp-4.2.4b1/server/bootp.c 2012-04-16 17:28:42.095919022 +0200
|
||||
diff -up dhcp-4.3.0a1/server/bootp.c.unicast dhcp-4.3.0a1/server/bootp.c
|
||||
--- dhcp-4.3.0a1/server/bootp.c.unicast 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/bootp.c 2013-12-19 15:12:12.974671154 +0100
|
||||
@@ -59,6 +59,7 @@ void bootp (packet)
|
||||
char msgbuf [1024];
|
||||
int ignorep;
|
||||
@ -18,7 +18,7 @@ diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
|
||||
log_info ("%s: network unknown", msgbuf);
|
||||
return;
|
||||
}
|
||||
@@ -399,6 +400,15 @@ void bootp (packet)
|
||||
@@ -396,6 +397,15 @@ void bootp (packet)
|
||||
|
||||
goto out;
|
||||
}
|
||||
@ -34,10 +34,10 @@ diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
|
||||
|
||||
/* If it comes from a client that already knows its address
|
||||
and is not requesting a broadcast response, and we can
|
||||
diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
|
||||
--- dhcp-4.2.4b1/server/dhcp.c.unicast 2012-03-09 12:28:12.000000000 +0100
|
||||
+++ dhcp-4.2.4b1/server/dhcp.c 2012-04-16 17:26:55.067418285 +0200
|
||||
@@ -4299,6 +4299,7 @@ int locate_network (packet)
|
||||
diff -up dhcp-4.3.0a1/server/dhcp.c.unicast dhcp-4.3.0a1/server/dhcp.c
|
||||
--- dhcp-4.3.0a1/server/dhcp.c.unicast 2013-12-13 21:50:38.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/server/dhcp.c 2013-12-19 15:12:12.975671140 +0100
|
||||
@@ -4627,6 +4627,7 @@ int locate_network (packet)
|
||||
struct data_string data;
|
||||
struct subnet *subnet = (struct subnet *)0;
|
||||
struct option_cache *oc;
|
||||
@ -45,7 +45,7 @@ diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
|
||||
|
||||
/* See if there's a Relay Agent Link Selection Option, or a
|
||||
* Subnet Selection Option. The Link-Select and Subnet-Select
|
||||
@@ -4314,12 +4315,24 @@ int locate_network (packet)
|
||||
@@ -4642,12 +4643,24 @@ int locate_network (packet)
|
||||
from the interface, if there is one. If not, fail. */
|
||||
if (!oc && !packet -> raw -> giaddr.s_addr) {
|
||||
if (packet -> interface -> shared_network) {
|
||||
@ -75,7 +75,7 @@ diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
|
||||
}
|
||||
|
||||
/* If there's an option indicating link connection, and it's valid,
|
||||
@@ -4342,7 +4355,10 @@ int locate_network (packet)
|
||||
@@ -4670,7 +4683,10 @@ int locate_network (packet)
|
||||
data_string_forget (&data, MDL);
|
||||
} else {
|
||||
ia.len = 4;
|
||||
@ -87,7 +87,7 @@ diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
|
||||
}
|
||||
|
||||
/* If we know the subnet on which the IP address lives, use it. */
|
||||
@@ -4350,7 +4366,10 @@ int locate_network (packet)
|
||||
@@ -4678,7 +4694,10 @@ int locate_network (packet)
|
||||
shared_network_reference (&packet -> shared_network,
|
||||
subnet -> shared_network, MDL);
|
||||
subnet_dereference (&subnet, MDL);
|
@ -1,7 +1,7 @@
|
||||
diff -up dhcp-4.2.2b1/common/bpf.c.xen dhcp-4.2.2b1/common/bpf.c
|
||||
--- dhcp-4.2.2b1/common/bpf.c.xen 2009-11-20 02:48:59.000000000 +0100
|
||||
+++ dhcp-4.2.2b1/common/bpf.c 2011-07-01 14:00:16.936959001 +0200
|
||||
@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf,
|
||||
diff -up dhcp-4.3.0a1/common/bpf.c.xen dhcp-4.3.0a1/common/bpf.c
|
||||
--- dhcp-4.3.0a1/common/bpf.c.xen 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/bpf.c 2013-12-19 15:14:40.226614464 +0100
|
||||
@@ -486,7 +486,7 @@ ssize_t receive_packet (interface, buf,
|
||||
offset = decode_udp_ip_header (interface,
|
||||
interface -> rbuf,
|
||||
interface -> rbuf_offset,
|
||||
@ -10,10 +10,10 @@ diff -up dhcp-4.2.2b1/common/bpf.c.xen dhcp-4.2.2b1/common/bpf.c
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0) {
|
||||
diff -up dhcp-4.2.2b1/common/dlpi.c.xen dhcp-4.2.2b1/common/dlpi.c
|
||||
--- dhcp-4.2.2b1/common/dlpi.c.xen 2011-05-11 16:20:59.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/common/dlpi.c 2011-07-01 14:00:16.937958997 +0200
|
||||
@@ -693,7 +693,7 @@ ssize_t receive_packet (interface, buf,
|
||||
diff -up dhcp-4.3.0a1/common/dlpi.c.xen dhcp-4.3.0a1/common/dlpi.c
|
||||
--- dhcp-4.3.0a1/common/dlpi.c.xen 2013-12-11 01:25:12.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/dlpi.c 2013-12-19 15:14:40.227614451 +0100
|
||||
@@ -691,7 +691,7 @@ ssize_t receive_packet (interface, buf,
|
||||
length -= offset;
|
||||
#endif
|
||||
offset = decode_udp_ip_header (interface, dbuf, bufix,
|
||||
@ -22,13 +22,13 @@ diff -up dhcp-4.2.2b1/common/dlpi.c.xen dhcp-4.2.2b1/common/dlpi.c
|
||||
|
||||
/*
|
||||
* If the IP or UDP checksum was bad, skip the packet...
|
||||
diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
--- dhcp-4.2.2b1/common/lpf.c.xen 2011-05-10 16:38:58.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/common/lpf.c 2011-07-01 14:11:24.725748028 +0200
|
||||
@@ -29,19 +29,33 @@
|
||||
diff -up dhcp-4.3.0a1/common/lpf.c.xen dhcp-4.3.0a1/common/lpf.c
|
||||
--- dhcp-4.3.0a1/common/lpf.c.xen 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/lpf.c 2013-12-19 15:25:33.635559701 +0100
|
||||
@@ -29,14 +29,15 @@
|
||||
|
||||
#include "dhcpd.h"
|
||||
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
#include <errno.h>
|
||||
@ -42,7 +42,9 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
#include "includes/netinet/ip.h"
|
||||
#include "includes/netinet/udp.h"
|
||||
#include "includes/netinet/if_ether.h"
|
||||
#include <net/if.h>
|
||||
@@ -51,6 +52,19 @@
|
||||
/* Reinitializes the specified interface after an address change. This
|
||||
is not required for packet-filter APIs. */
|
||||
|
||||
+#ifndef PACKET_AUXDATA
|
||||
+#define PACKET_AUXDATA 8
|
||||
@ -57,10 +59,10 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
/* Reinitializes the specified interface after an address change. This
|
||||
is not required for packet-filter APIs. */
|
||||
|
||||
@@ -67,10 +81,14 @@ int if_register_lpf (info)
|
||||
#ifdef USE_LPF_SEND
|
||||
void if_reinitialize_send (info)
|
||||
struct interface_info *info;
|
||||
@@ -73,10 +87,14 @@ int if_register_lpf (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
int sock;
|
||||
@ -77,7 +79,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
htons((short)ETH_P_ALL))) < 0) {
|
||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
|
||||
@@ -85,11 +103,17 @@ int if_register_lpf (info)
|
||||
@@ -91,11 +109,17 @@ int if_register_lpf (info)
|
||||
log_fatal ("Open a socket for LPF: %m");
|
||||
}
|
||||
|
||||
@ -98,7 +100,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
|
||||
errno == EAFNOSUPPORT || errno == EINVAL) {
|
||||
@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
|
||||
@@ -177,9 +201,18 @@ static void lpf_gen_filter_setup (struct
|
||||
void if_register_receive (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
@ -117,7 +119,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
#if defined (HAVE_TR_SUPPORT)
|
||||
if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
|
||||
lpf_tr_filter_setup (info);
|
||||
@@ -295,7 +328,6 @@ ssize_t send_packet (interface, packet,
|
||||
@@ -301,7 +334,6 @@ ssize_t send_packet (interface, packet,
|
||||
double hh [16];
|
||||
double ih [1536 / sizeof (double)];
|
||||
unsigned char *buf = (unsigned char *)ih;
|
||||
@ -125,7 +127,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
int result;
|
||||
int fudge;
|
||||
|
||||
@@ -316,17 +348,7 @@ ssize_t send_packet (interface, packet,
|
||||
@@ -322,17 +354,7 @@ ssize_t send_packet (interface, packet,
|
||||
(unsigned char *)raw, len);
|
||||
memcpy (buf + ibufp, raw, len);
|
||||
|
||||
@ -144,7 +146,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
if (result < 0)
|
||||
log_error ("send_packet: %m");
|
||||
return result;
|
||||
@@ -343,14 +365,35 @@ ssize_t receive_packet (interface, buf,
|
||||
@@ -349,14 +371,35 @@ ssize_t receive_packet (interface, buf,
|
||||
{
|
||||
int length = 0;
|
||||
int offset = 0;
|
||||
@ -181,7 +183,7 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
bufix = 0;
|
||||
/* Decode the physical header... */
|
||||
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
|
||||
@@ -367,7 +410,7 @@ ssize_t receive_packet (interface, buf,
|
||||
@@ -373,7 +416,7 @@ ssize_t receive_packet (interface, buf,
|
||||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
|
||||
@ -190,10 +192,10 @@ diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
diff -up dhcp-4.2.2b1/common/nit.c.xen dhcp-4.2.2b1/common/nit.c
|
||||
--- dhcp-4.2.2b1/common/nit.c.xen 2009-11-20 02:49:01.000000000 +0100
|
||||
+++ dhcp-4.2.2b1/common/nit.c 2011-07-01 14:00:16.939958989 +0200
|
||||
@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf,
|
||||
diff -up dhcp-4.3.0a1/common/nit.c.xen dhcp-4.3.0a1/common/nit.c
|
||||
--- dhcp-4.3.0a1/common/nit.c.xen 2013-11-07 20:15:08.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/nit.c 2013-12-19 15:14:40.228614437 +0100
|
||||
@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf,
|
||||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix,
|
||||
@ -202,10 +204,10 @@ diff -up dhcp-4.2.2b1/common/nit.c.xen dhcp-4.2.2b1/common/nit.c
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
|
||||
--- dhcp-4.2.2b1/common/packet.c.xen 2009-07-23 20:52:20.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/common/packet.c 2011-07-01 14:00:16.939958989 +0200
|
||||
@@ -211,7 +211,7 @@ ssize_t
|
||||
diff -up dhcp-4.3.0a1/common/packet.c.xen dhcp-4.3.0a1/common/packet.c
|
||||
--- dhcp-4.3.0a1/common/packet.c.xen 2013-12-11 01:01:02.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/packet.c 2013-12-19 15:14:40.228614437 +0100
|
||||
@@ -226,7 +226,7 @@ ssize_t
|
||||
decode_udp_ip_header(struct interface_info *interface,
|
||||
unsigned char *buf, unsigned bufix,
|
||||
struct sockaddr_in *from, unsigned buflen,
|
||||
@ -214,7 +216,7 @@ diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
|
||||
{
|
||||
unsigned char *data;
|
||||
struct ip ip;
|
||||
@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_in
|
||||
@@ -337,7 +337,7 @@ decode_udp_ip_header(struct interface_in
|
||||
8, IPPROTO_UDP + ulen))));
|
||||
|
||||
udp_packets_seen++;
|
||||
@ -223,10 +225,10 @@ diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
|
||||
udp_packets_bad_checksum++;
|
||||
if (udp_packets_seen > 4 &&
|
||||
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
|
||||
diff -up dhcp-4.2.2b1/common/upf.c.xen dhcp-4.2.2b1/common/upf.c
|
||||
--- dhcp-4.2.2b1/common/upf.c.xen 2009-11-20 02:49:01.000000000 +0100
|
||||
+++ dhcp-4.2.2b1/common/upf.c 2011-07-01 14:00:16.940958986 +0200
|
||||
@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf,
|
||||
diff -up dhcp-4.3.0a1/common/upf.c.xen dhcp-4.3.0a1/common/upf.c
|
||||
--- dhcp-4.3.0a1/common/upf.c.xen 2013-11-07 20:15:08.000000000 +0100
|
||||
+++ dhcp-4.3.0a1/common/upf.c 2013-12-19 15:14:40.228614437 +0100
|
||||
@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf,
|
||||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix,
|
||||
@ -235,10 +237,10 @@ diff -up dhcp-4.2.2b1/common/upf.c.xen dhcp-4.2.2b1/common/upf.c
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
diff -up dhcp-4.2.2b1/includes/dhcpd.h.xen dhcp-4.2.2b1/includes/dhcpd.h
|
||||
--- dhcp-4.2.2b1/includes/dhcpd.h.xen 2011-07-01 14:00:16.000000000 +0200
|
||||
+++ dhcp-4.2.2b1/includes/dhcpd.h 2011-07-01 14:12:18.069642470 +0200
|
||||
@@ -2796,7 +2796,7 @@ ssize_t decode_hw_header (struct interfa
|
||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.xen dhcp-4.3.0a1/includes/dhcpd.h
|
||||
--- dhcp-4.3.0a1/includes/dhcpd.h.xen 2013-12-19 15:14:40.213614645 +0100
|
||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 15:14:40.229614423 +0100
|
||||
@@ -2867,7 +2867,7 @@ ssize_t decode_hw_header (struct interfa
|
||||
unsigned, struct hardware *);
|
||||
ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
|
||||
unsigned, struct sockaddr_in *,
|
197
dhcp.spec
197
dhcp.spec
@ -9,23 +9,22 @@
|
||||
|
||||
|
||||
#%%global patchver P2
|
||||
#%%global prever rc1
|
||||
%global prever a1
|
||||
|
||||
#%%global VERSION %{version}-%{patchver}
|
||||
#%%global VERSION %{version}%{prever}
|
||||
%global VERSION %{version}
|
||||
#%%global VERSION %{version}
|
||||
%global VERSION %{version}%{prever}
|
||||
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.2.5
|
||||
Release: 28%{?dist}
|
||||
Version: 4.3.0
|
||||
Release: 0.1.%{prever}%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
# So we are stuck with it.
|
||||
Epoch: 12
|
||||
License: ISC
|
||||
Group: System Environment/Daemons
|
||||
URL: http://isc.org/products/DHCP/
|
||||
Source0: ftp://ftp.isc.org/isc/dhcp/%{VERSION}/dhcp-%{VERSION}.tar.gz
|
||||
Source1: dhclient-script
|
||||
@ -37,58 +36,55 @@ Source6: dhcpd.service
|
||||
Source7: dhcpd6.service
|
||||
Source8: dhcrelay.service
|
||||
|
||||
|
||||
Patch0: dhcp-4.2.0-errwarn-message.patch
|
||||
Patch1: dhcp-4.2.4-dhclient-options.patch
|
||||
Patch2: dhcp-4.2.0-release-by-ifup.patch
|
||||
Patch3: dhcp-4.2.0-dhclient-decline-backoff.patch
|
||||
Patch4: dhcp-4.2.4-unicast-bootp.patch
|
||||
Patch7: dhcp-4.2.0-default-requested-options.patch
|
||||
Patch8: dhcp-4.2.2-xen-checksum.patch
|
||||
Patch10: dhcp-4.2.5-manpages.patch
|
||||
Patch11: dhcp-4.2.4-paths.patch
|
||||
Patch12: dhcp-4.2.2-CLOEXEC.patch
|
||||
Patch14: dhcp-4.2.0-garbage-chars.patch
|
||||
Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch
|
||||
Patch18: dhcp-4.2.4-64_bit_lease_parse.patch
|
||||
Patch19: dhcp-4.2.2-capability.patch
|
||||
Patch20: dhcp-4.2.0-logpid.patch
|
||||
Patch21: dhcp-4.2.4-UseMulticast.patch
|
||||
Patch22: dhcp-4.2.5-sendDecline.patch
|
||||
Patch23: dhcp-4.2.1-retransmission.patch
|
||||
Patch25: dhcp-4.2.5-rfc3442-classless-static-routes.patch
|
||||
Patch27: dhcp-4.2.0-honor-expired.patch
|
||||
Patch28: dhcp-4.2.5-remove-bind.patch
|
||||
Patch29: dhcp-4.2.4-P1-remove-dst.patch
|
||||
Patch30: dhcp-4.2.5-sharedlib.patch
|
||||
Patch31: dhcp-4.2.5-PPP.patch
|
||||
Patch32: dhcp-4.2.5-paranoia.patch
|
||||
Patch33: dhcp-4.2.5-lpf-ib.patch
|
||||
Patch34: dhcp-4.2.4-improved-xid.patch
|
||||
Patch35: dhcp-4.2.2-gpxe-cid.patch
|
||||
Patch36: dhcp-4.2.5-systemtap.patch
|
||||
Patch37: dhcp-4.2.3-dhclient-decline-onetry.patch
|
||||
Patch38: dhcp-4.2.3-P2-log_perror.patch
|
||||
Patch39: dhcp-4.2.4-getifaddrs.patch
|
||||
Patch40: dhcp-4.2.5-omapi-leak.patch
|
||||
Patch41: dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch
|
||||
Patch42: dhcp-4.2.4-failOverPeer.patch
|
||||
Patch43: dhcp-4.2.5b1-atf-pkgconfig.patch
|
||||
Patch44: dhcp-4.2.4-P1-interval.patch
|
||||
Patch45: dhcp-4.2.4-P2-conflex-do-forward-updates.patch
|
||||
Patch46: dhcp-4.2.4-P2-dupl-key.patch
|
||||
Patch47: dhcp-4.2.5-range6.patch
|
||||
Patch48: dhcp-4.2.5-next-server.patch
|
||||
Patch49: dhcp-dhclient6-bind.patch
|
||||
Patch50: dhcp-no-subnet-error2info.patch
|
||||
Patch51: dhcp-ffff-checksum.patch
|
||||
Patch0: dhcp-remove-bind.patch
|
||||
Patch1: dhcp-remove-dst.patch
|
||||
Patch2: dhcp-sharedlib.patch
|
||||
Patch3: dhcp-errwarn-message.patch
|
||||
Patch4: dhcp-dhclient-options.patch
|
||||
Patch5: dhcp-release-by-ifup.patch
|
||||
Patch6: dhcp-dhclient-decline-backoff.patch
|
||||
Patch7: dhcp-unicast-bootp.patch
|
||||
Patch8: dhcp-default-requested-options.patch
|
||||
Patch9: dhcp-xen-checksum.patch
|
||||
Patch10: dhcp-manpages.patch
|
||||
Patch11: dhcp-paths.patch
|
||||
Patch12: dhcp-CLOEXEC.patch
|
||||
Patch13: dhcp-garbage-chars.patch
|
||||
Patch14: dhcp-add_timeout_when_NULL.patch
|
||||
Patch15: dhcp-64_bit_lease_parse.patch
|
||||
Patch16: dhcp-capability.patch
|
||||
Patch17: dhcp-logpid.patch
|
||||
Patch18: dhcp-UseMulticast.patch
|
||||
Patch19: dhcp-sendDecline.patch
|
||||
Patch20: dhcp-retransmission.patch
|
||||
Patch21: dhcp-rfc3442-classless-static-routes.patch
|
||||
Patch22: dhcp-honor-expired.patch
|
||||
Patch23: dhcp-PPP.patch
|
||||
Patch24: dhcp-paranoia.patch
|
||||
Patch25: dhcp-lpf-ib.patch
|
||||
Patch26: dhcp-improved-xid.patch
|
||||
Patch27: dhcp-gpxe-cid.patch
|
||||
Patch28: dhcp-systemtap.patch
|
||||
Patch29: dhcp-dhclient-decline-onetry.patch
|
||||
Patch30: dhcp-log_perror.patch
|
||||
Patch31: dhcp-getifaddrs.patch
|
||||
Patch32: dhcp-omapi-leak.patch
|
||||
Patch33: dhcp-rfc5970-dhcpv6-options-for-network-boot.patch
|
||||
Patch34: dhcp-failOverPeer.patch
|
||||
Patch35: dhcp-interval.patch
|
||||
Patch36: dhcp-conflex-do-forward-updates.patch
|
||||
Patch37: dhcp-dupl-key.patch
|
||||
Patch38: dhcp-range6.patch
|
||||
Patch39: dhcp-next-server.patch
|
||||
Patch40: dhcp-no-subnet-error2info.patch
|
||||
Patch41: dhcp-ffff-checksum.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openldap-devel
|
||||
BuildRequires: libcap-ng-devel
|
||||
BuildRequires: bind-lite-devel
|
||||
BuildRequires: bind-lite-devel >= 32:9.9.5-0.1.b1
|
||||
BuildRequires: systemd
|
||||
%if 0%{?fedora}
|
||||
# %%check
|
||||
@ -127,7 +123,6 @@ the ISC DHCP service and relay agent.
|
||||
|
||||
%package -n dhclient
|
||||
Summary: Provides the ISC DHCP client daemon and dhclient-script
|
||||
Group: System Environment/Base
|
||||
# dhclient-script requires:
|
||||
Requires: coreutils grep hostname initscripts iproute iputils sed
|
||||
Requires: %{name}-common = %{epoch}:%{version}-%{release}
|
||||
@ -146,7 +141,6 @@ provides the ISC DHCP client daemon.
|
||||
|
||||
%package common
|
||||
Summary: Common files used by ISC dhcp client and server
|
||||
Group: System Environment/Base
|
||||
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description common
|
||||
@ -160,7 +154,6 @@ This package provides common files used by dhcp and dhclient package.
|
||||
|
||||
%package libs
|
||||
Summary: Shared libraries used by ISC dhcp client and server
|
||||
Group: System Environment/Base
|
||||
|
||||
%description libs
|
||||
This package contains shared libraries used by ISC dhcp client and server
|
||||
@ -168,7 +161,6 @@ This package contains shared libraries used by ISC dhcp client and server
|
||||
|
||||
%package devel
|
||||
Summary: Development headers and libraries for interfacing to the DHCP server
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description devel
|
||||
@ -186,41 +178,44 @@ rm -rf dst/
|
||||
rm -rf includes/isc-dhcp
|
||||
|
||||
# Fire away bundled BIND source.
|
||||
%patch28 -p1 -b .remove-bind %{?_rawbuild}
|
||||
%patch0 -p1 -b .remove-bind %{?_rawbuild}
|
||||
|
||||
# Fire away libdst
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30692])
|
||||
%patch29 -p1 -b .remove-dst %{?_rawbuild}
|
||||
%patch1 -p1 -b .remove-dst %{?_rawbuild}
|
||||
|
||||
#Build dhcp's libraries as shared libs instead of static libs.
|
||||
%patch2 -p1 -b .sharedlib
|
||||
|
||||
# Replace the standard ISC warning message about requesting help with an
|
||||
# explanation that this is a patched build of ISC DHCP and bugs should be
|
||||
# reported through bugzilla.redhat.com
|
||||
%patch0 -p1 -b .errwarn
|
||||
%patch3 -p1 -b .errwarn
|
||||
|
||||
# Add more dhclient options (-I, -B, -H, -F, -timeout, -V, and -R)
|
||||
%patch1 -p1 -b .options
|
||||
%patch4 -p1 -b .options
|
||||
|
||||
# Handle releasing interfaces requested by /sbin/ifup
|
||||
# pid file is assumed to be /var/run/dhclient-$interface.pid
|
||||
%patch2 -p1 -b .ifup
|
||||
%patch5 -p1 -b .ifup
|
||||
|
||||
# If we receive a DHCP offer in dhclient and it's DECLINEd in dhclient-script,
|
||||
# backoff for an amount of time before trying again
|
||||
%patch3 -p1 -b .backoff
|
||||
%patch6 -p1 -b .backoff
|
||||
|
||||
# Support unicast BOOTP for IBM pSeries systems (and maybe others)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19146])
|
||||
%patch4 -p1 -b .unicast
|
||||
%patch7 -p1 -b .unicast
|
||||
|
||||
# Add NIS domain, NIS servers, NTP servers, interface-mtu and domain-search
|
||||
# to the list of default requested DHCP options
|
||||
%patch7 -p1 -b .requested
|
||||
%patch8 -p1 -b .requested
|
||||
|
||||
# Handle partial UDP checksums (#221964)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #22806] - by Michael S. Tsirkin)
|
||||
# http://comments.gmane.org/gmane.comp.emulators.kvm.devel/65236
|
||||
# https://lists.isc.org/pipermail/dhcp-hackers/2010-April/001835.html
|
||||
%patch8 -p1 -b .xen
|
||||
%patch9 -p1 -b .xen
|
||||
|
||||
# Various man-page-only fixes
|
||||
%patch10 -p1 -b .man
|
||||
@ -233,129 +228,118 @@ rm -rf includes/isc-dhcp
|
||||
%patch12 -p1 -b .cloexec
|
||||
|
||||
# Fix 'garbage in format string' error (#450042)
|
||||
%patch14 -p1 -b .garbage
|
||||
%patch13 -p1 -b .garbage
|
||||
|
||||
# Handle cases in add_timeout() where the function is called with a NULL
|
||||
# value for the 'when' parameter
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19867])
|
||||
%patch17 -p1 -b .dracut
|
||||
%patch14 -p1 -b .dracut
|
||||
|
||||
# Ensure 64-bit platforms parse lease file dates & times correctly (#448615, #628258)
|
||||
# (Partly submitted to dhcp-bugs@isc.org - [ISC-Bugs #22033])
|
||||
%patch18 -p1 -b .64-bit_lease_parse
|
||||
%patch15 -p1 -b .64-bit_lease_parse
|
||||
|
||||
# Drop unnecessary capabilities in
|
||||
# dhclient (#517649, #546765), dhcpd/dhcrelay (#699713)
|
||||
%patch19 -p1 -b .capability
|
||||
%patch16 -p1 -b .capability
|
||||
|
||||
# dhclient logs its pid to make troubleshooting NM managed systems
|
||||
# with multiple dhclients running easier (#546792)
|
||||
%patch20 -p1 -b .logpid
|
||||
%patch17 -p1 -b .logpid
|
||||
|
||||
# Discard unicast Request/Renew/Release/Decline message
|
||||
# (unless we set unicast option) and respond with Reply
|
||||
# with UseMulticast Status Code option (#573090)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21235])
|
||||
%patch21 -p1 -b .UseMulticast
|
||||
%patch18 -p1 -b .UseMulticast
|
||||
|
||||
# If any of the bound addresses are found to be in use on the link,
|
||||
# the dhcpv6 client sends a Decline message to the server
|
||||
# as described in section 18.1.7 of RFC-3315 (#559147)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21237])
|
||||
%patch22 -p1 -b .sendDecline
|
||||
%patch19 -p1 -b .sendDecline
|
||||
|
||||
# In client initiated message exchanges stop retransmission
|
||||
# upon reaching the MRD rather than at some point after it (#559153)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21238])
|
||||
%patch23 -p1 -b .retransmission
|
||||
%patch20 -p1 -b .retransmission
|
||||
|
||||
# RFC 3442 - Classless Static Route Option for DHCPv4 (#516325)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24572])
|
||||
%patch25 -p1 -b .rfc3442
|
||||
%patch21 -p1 -b .rfc3442
|
||||
|
||||
# check whether there is any unexpired address in previous lease
|
||||
# prior to confirming (INIT-REBOOT) the lease (#585418)
|
||||
# (Submitted to dhcp-suggest@isc.org - [ISC-Bugs #22675])
|
||||
%patch27 -p1 -b .honor-expired
|
||||
|
||||
#Build dhcp's libraries as shared libs instead of static libs.
|
||||
%patch30 -p1 -b .sharedlib
|
||||
%patch22 -p1 -b .honor-expired
|
||||
|
||||
# DHCPv6 over PPP support (#626514)
|
||||
%patch31 -p1 -b .PPP
|
||||
%patch23 -p1 -b .PPP
|
||||
|
||||
# dhcpd: BEFORE changing of the effective user/group ID:
|
||||
# - write PID file (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #25806])
|
||||
# - chown leases file (#866714)
|
||||
%patch32 -p1 -b .paranoia
|
||||
%patch24 -p1 -b .paranoia
|
||||
|
||||
# IPoIB support (#660681)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24249])
|
||||
%patch33 -p1 -b .lpf-ib
|
||||
%patch34 -p1 -b .improved-xid
|
||||
%patch35 -p1 -b .gpxe-cid
|
||||
%patch25 -p1 -b .lpf-ib
|
||||
%patch26 -p1 -b .improved-xid
|
||||
%patch27 -p1 -b .gpxe-cid
|
||||
|
||||
# http://sourceware.org/systemtap/wiki/SystemTap
|
||||
%patch36 -p1 -b .systemtap
|
||||
%patch28 -p1 -b .systemtap
|
||||
|
||||
# Send DHCPDECLINE and exit(2) when duplicate address was detected and
|
||||
# dhclient had been started with '-1' (#756759).
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #26735])
|
||||
%patch37 -p1 -b .decline-onetry
|
||||
%patch29 -p1 -b .decline-onetry
|
||||
|
||||
# Don't send log messages to the standard error descriptor by default (#790387)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28049])
|
||||
%patch38 -p1 -b .log_perror
|
||||
%patch30 -p1 -b .log_perror
|
||||
|
||||
# Use getifaddrs() to scan for interfaces on Linux (#449946)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28761])
|
||||
%patch39 -p1 -b .getifaddrs
|
||||
%patch31 -p1 -b .getifaddrs
|
||||
|
||||
# Fix several memory leaks in omapi (#978420)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #33990])
|
||||
%patch40 -p1 -b .leak
|
||||
%patch32 -p1 -b .leak
|
||||
|
||||
# RFC5970 - DHCPv6 Options for Network Boot (#798735)
|
||||
%patch41 -p1 -b .rfc5970
|
||||
%patch33 -p1 -b .rfc5970
|
||||
|
||||
# Dhcpd does not correctly follow DhcpFailOverPeerDN (#838400)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30402])
|
||||
%patch42 -p1 -b .failOverPeer
|
||||
|
||||
# To be able to build with '--with-atf'.
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #32206])
|
||||
%patch43 -p1 -b .pkgconfig
|
||||
%patch34 -p1 -b .failOverPeer
|
||||
|
||||
# isc_time_nowplusinterval() is not safe with 64-bit time_t (#662254, #789601)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28038])
|
||||
%patch44 -p1 -b .interval
|
||||
%patch35 -p1 -b .interval
|
||||
|
||||
# do-forward-updates statement wasn't recognized (#863646)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #31328])
|
||||
%patch45 -p1 -b .forward-updates
|
||||
%patch36 -p1 -b .forward-updates
|
||||
|
||||
# multiple key statements in zone definition causes inappropriate error (#873794)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #31892])
|
||||
%patch46 -p1 -b .dupl-key
|
||||
%patch37 -p1 -b .dupl-key
|
||||
|
||||
# Make sure range6 is correct for subnet6 where it's declared (#902966)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #32453])
|
||||
%patch47 -p1 -b .range6
|
||||
%patch38 -p1 -b .range6
|
||||
|
||||
# Expose next-server DHCPv4 option to dhclient script
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #33098])
|
||||
%patch48 -p1 -b .next-server
|
||||
|
||||
# dhclient -6: bind socket to interface (#1001742)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784])
|
||||
%patch49 -p1 -b .dhclient6-bind
|
||||
%patch39 -p1 -b .next-server
|
||||
|
||||
# 'No subnet declaration for <iface>' should be info, not error.
|
||||
%patch50 -p1 -b .error2info
|
||||
%patch40 -p1 -b .error2info
|
||||
|
||||
# dhcpd rejects the udp packet with checksum=0xffff (#1015997)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #25587])
|
||||
%patch51 -p1 -b .ffff
|
||||
%patch41 -p1 -b .ffff
|
||||
|
||||
# Update paths in all man pages
|
||||
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
||||
@ -641,6 +625,9 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 19 2013 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-0.1.a1
|
||||
- 4.3.0a1: requires bind-9.9.5
|
||||
|
||||
* Thu Nov 21 2013 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.5-28
|
||||
- dhclient-script: set address lifetimes (#1032809)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user