###############################################################################
name = dhcp
-version = 4.2.4
-release = 2
+version = 4.2.5
+release = 1
groups = Networking/Daemons
url = http://isc.org/products/DHCP/
# Apply patches in a special order.
patches = \
- dhcp-4.2.2-remove-bind.patch \
+ dhcp-4.2.5-remove-bind.patch \
dhcp-4.2.4-P1-remove-dst.patch \
dhcp-4.2.0-errwarn-message.patch \
- dhcp-4.2.4-options.patch \
+ dhcp-4.2.4-dhclient-options.patch \
dhcp-4.2.0-release-by-ifup.patch \
dhcp-4.2.0-dhclient-decline-backoff.patch \
dhcp-4.2.4-unicast-bootp.patch \
- dhcp-4.2.2-dhclient-usage.patch \
dhcp-4.2.0-default-requested-options.patch \
dhcp-4.2.2-xen-checksum.patch \
- dhcp-4.2.1-manpages.patch \
+ dhcp-4.2.5-manpages.patch \
dhcp-4.2.4-paths.patch \
dhcp-4.2.2-CLOEXEC.patch \
dhcp-4.2.0-garbage-chars.patch \
- dhcp-4.2.0-missing-ipv6-not-fatal.patch \
dhcp-4.2.0-add_timeout_when_NULL.patch \
dhcp-4.2.4-64_bit_lease_parse.patch \
dhcp-4.2.2-capability.patch \
dhcp-4.2.0-logpid.patch \
dhcp-4.2.4-UseMulticast.patch \
- dhcp-4.2.1-sendDecline.patch \
+ dhcp-4.2.5-sendDecline.patch \
dhcp-4.2.1-retransmission.patch \
- dhcp-4.2.4-rfc3442-classless-static-routes.patch \
+ dhcp-4.2.5-rfc3442-classless-static-routes.patch \
dhcp-4.2.0-honor-expired.patch \
- dhcp-4.2.2-sharedlib.patch \
- dhcp-4.2.4-PPP.patch \
- dhcp-4.2.3-paranoia.patch \
- dhcp-4.2.4-lpf-ib.patch \
+ dhcp-4.2.5-sharedlib.patch \
+ dhcp-4.2.5-PPP.patch \
+ dhcp-4.2.5-paranoia.patch \
+ dhcp-4.2.5-lpf-ib.patch \
dhcp-4.2.4-improved-xid.patch \
dhcp-4.2.2-gpxe-cid.patch \
- dhcp-4.2.4-systemtap.patch \
+ dhcp-4.2.5-systemtap.patch \
dhcp-4.2.3-dhclient-decline-onetry.patch \
dhcp-4.2.3-P2-log_perror.patch \
dhcp-4.2.4-getifaddrs.patch \
dhcp-4.2.4-send_release.patch \
- dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch \
- dhcp-4.2.4-failOverPeer.patch \
- dhcp-4.2.4-P1-dhclient6-leases_semicolon_expected.patch \
- dhcp-4.2.4-P1-interval.patch
+ dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch \
+ dhcp-4.2.4-failOverPeer.patch \
+ dhcp-4.2.5b1-atf-pkgconfig.patch \
+ dhcp-4.2.4-P1-interval.patch \
+ dhcp-4.2.4-P2-conflex-do-forward-updates.patch \
+ dhcp-4.2.4-P2-dupl-key.patch \
+ dhcp-4.2.5-range6.patch \
+ dhcp-4.2.5-next-server.patch
build
requires
+++ /dev/null
-diff -up dhcp-4.2.0/common/discover.c.noipv6 dhcp-4.2.0/common/discover.c
---- dhcp-4.2.0/common/discover.c.noipv6 2010-07-21 14:31:13.000000000 +0200
-+++ dhcp-4.2.0/common/discover.c 2010-07-21 16:04:57.000000000 +0200
-@@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list
- }
-
- #ifdef DHCPv6
-- if (local_family == AF_INET6) {
-+ if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
- ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
-@@ -454,6 +454,8 @@ begin_iface_scan(struct iface_conf_list
- ifaces->fp = NULL;
- return 0;
- }
-+ } else {
-+ ifaces->fp6 = NULL;
- }
- #endif
-
-@@ -721,7 +723,7 @@ next_iface(struct iface_info *info, int
- return 1;
- }
- #ifdef DHCPv6
-- if (!(*err)) {
-+ if (!(*err) && ifaces->fp6) {
- if (local_family == AF_INET6)
- return next_iface6(info, err, ifaces);
- }
-@@ -740,7 +742,8 @@ end_iface_scan(struct iface_conf_list *i
- ifaces->sock = -1;
- #ifdef DHCPv6
- if (local_family == AF_INET6) {
-- fclose(ifaces->fp6);
-+ if (ifaces->fp6)
-+ fclose(ifaces->fp6);
- ifaces->fp6 = NULL;
- }
- #endif
if (sock < 0) {
if (errno == EBUSY) {
continue;
-diff -up dhcp-4.2.2b1/common/discover.c.cloexec dhcp-4.2.2b1/common/discover.c
---- dhcp-4.2.2b1/common/discover.c.cloexec 2011-06-27 18:18:20.000000000 +0200
-+++ dhcp-4.2.2b1/common/discover.c 2011-07-01 14:13:31.031887673 +0200
-@@ -421,7 +421,7 @@ begin_iface_scan(struct iface_conf_list
- int len;
- int i;
-
-- ifaces->fp = fopen("/proc/net/dev", "r");
-+ ifaces->fp = fopen("/proc/net/dev", "re");
- if (ifaces->fp == NULL) {
- log_error("Error opening '/proc/net/dev' to list interfaces");
- return 0;
-@@ -456,7 +456,7 @@ begin_iface_scan(struct iface_conf_list
-
- #ifdef DHCPv6
- if (local_family == AF_INET6) {
-- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
-+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
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
+++ /dev/null
-diff -up dhcp-4.2.2b1/client/dhclient.c.usage dhcp-4.2.2b1/client/dhclient.c
---- dhcp-4.2.2b1/client/dhclient.c.usage 2011-07-01 13:55:16.000000000 +0200
-+++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 13:58:55.243800602 +0200
-@@ -1047,6 +1047,10 @@ static void usage()
- " [-s server-addr] [-cf config-file] "
- "[-lf lease-file]\n"
- " [-pf pid-file] [--no-pid] [-e VAR=val]\n"
-+ " [-I <dhcp-client-identifier>] [-B]\n"
-+ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
-+ " [-V <vendor-class-identifier>]\n"
-+ " [-R <request option list>]\n"
- " [-sf script-file] [interface]");
- }
-
+++ /dev/null
-diff -up dhcp-4.2.2/client/Makefile.am.sharedlib dhcp-4.2.2/client/Makefile.am
---- dhcp-4.2.2/client/Makefile.am.sharedlib 2011-10-09 20:07:40.000000000 +0200
-+++ dhcp-4.2.2/client/Makefile.am 2011-10-09 20:07:40.000000000 +0200
-@@ -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.2/configure.ac.sharedlib dhcp-4.2.2/configure.ac
---- dhcp-4.2.2/configure.ac.sharedlib 2011-10-09 20:07:40.000000000 +0200
-+++ dhcp-4.2.2/configure.ac 2011-10-09 20:07:40.000000000 +0200
-@@ -30,7 +30,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.2/dhcpctl/Makefile.am.sharedlib dhcp-4.2.2/dhcpctl/Makefile.am
---- dhcp-4.2.2/dhcpctl/Makefile.am.sharedlib 2011-10-09 20:07:39.000000000 +0200
-+++ dhcp-4.2.2/dhcpctl/Makefile.am 2011-10-09 20:07:40.000000000 +0200
-@@ -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.2/omapip/Makefile.am.sharedlib dhcp-4.2.2/omapip/Makefile.am
---- dhcp-4.2.2/omapip/Makefile.am.sharedlib 2011-10-09 20:07:39.000000000 +0200
-+++ dhcp-4.2.2/omapip/Makefile.am 2011-10-09 20:07:40.000000000 +0200
-@@ -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.2/relay/Makefile.am.sharedlib dhcp-4.2.2/relay/Makefile.am
---- dhcp-4.2.2/relay/Makefile.am.sharedlib 2011-10-09 20:07:40.000000000 +0200
-+++ dhcp-4.2.2/relay/Makefile.am 2011-10-09 20:07:40.000000000 +0200
-@@ -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.2/server/Makefile.am.sharedlib dhcp-4.2.2/server/Makefile.am
---- dhcp-4.2.2/server/Makefile.am.sharedlib 2011-10-09 20:07:39.000000000 +0200
-+++ dhcp-4.2.2/server/Makefile.am 2011-10-09 20:08:26.000000000 +0200
-@@ -7,8 +7,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)
+++ /dev/null
-diff -up dhcp-4.2.3-P1/server/dhcpd.c.paranoia dhcp-4.2.3-P1/server/dhcpd.c
---- dhcp-4.2.3-P1/server/dhcpd.c.paranoia 2011-12-20 18:02:26.000000000 +0100
-+++ dhcp-4.2.3-P1/server/dhcpd.c 2011-12-20 18:03:43.840037108 +0100
-@@ -771,22 +771,6 @@ main(int argc, char **argv) {
- exit (0);
- }
-
--#if defined (PARANOIA)
-- /* change uid to the specified one */
--
-- if (set_gid) {
-- if (setgroups (0, (void *)0))
-- log_fatal ("setgroups: %m");
-- if (setgid (set_gid))
-- log_fatal ("setgid(%d): %m", (int) set_gid);
-- }
--
-- if (set_uid) {
-- if (setuid (set_uid))
-- log_fatal ("setuid(%d): %m", (int) set_uid);
-- }
--#endif /* PARANOIA */
--
- /*
- * Deal with pid files. If the user told us
- * not to write a file we don't read one either
-@@ -823,6 +807,22 @@ main(int argc, char **argv) {
- }
- }
-
-+#if defined (PARANOIA)
-+ /* change uid to the specified one */
-+
-+ if (set_gid) {
-+ if (setgroups (0, (void *)0))
-+ log_fatal ("setgroups: %m");
-+ if (setgid (set_gid))
-+ log_fatal ("setgid(%d): %m", (int) set_gid);
-+ }
-+
-+ if (set_uid) {
-+ if (setuid (set_uid))
-+ log_fatal ("setuid(%d): %m", (int) set_uid);
-+ }
-+#endif /* PARANOIA */
-+
- /* If we were requested to log to stdout on the command line,
- keep doing so; otherwise, stop. */
- if (log_perror == -1)
+++ /dev/null
-diff -up dhcp-4.2.4-P1/client/dhclient.c.dhclient6-leases_semicolon dhcp-4.2.4-P1/client/dhclient.c
---- dhcp-4.2.4-P1/client/dhclient.c.dhclient6-leases_semicolon 2012-07-25 15:20:22.187164614 +0200
-+++ dhcp-4.2.4-P1/client/dhclient.c 2012-07-25 15:20:26.648152028 +0200
-@@ -3236,10 +3236,21 @@ void write_lease_option (struct option_c
- }
- if (evaluate_option_cache (&ds, packet, lease, client_state,
- in_options, cfg_options, scope, oc, MDL)) {
-- fprintf(leaseFile, "%soption %s%s%s %s;\n", preamble,
-- name, dot, oc->option->name,
-- pretty_print_option(oc->option, ds.data, ds.len,
-- 1, 1));
-+ /* The option name */
-+ fprintf(leaseFile, "%soption %s%s%s", preamble,
-+ name, dot, oc->option->name);
-+
-+ /* The option value if there is one */
-+ if ((oc->option->format == NULL) ||
-+ (oc->option->format[0] != 'Z')) {
-+ fprintf(leaseFile, " %s",
-+ pretty_print_option(oc->option, ds.data,
-+ ds.len, 1, 1));
-+ }
-+
-+ /* The closing semi-colon and newline */
-+ fprintf(leaseFile, ";\n");
-+
- data_string_forget (&ds, MDL);
- }
- }
-diff -up dhcp-4.2.4-P1/common/parse.c.dhclient6-leases_semicolon dhcp-4.2.4-P1/common/parse.c
---- dhcp-4.2.4-P1/common/parse.c.dhclient6-leases_semicolon 2012-07-25 15:10:39.683557386 +0200
-+++ dhcp-4.2.4-P1/common/parse.c 2012-07-25 15:16:50.826762985 +0200
-@@ -5772,7 +5772,7 @@ int parse_option_decl (oc, cfile)
- goto alloc;
-
- case 'Z': /* Zero-length option */
-- token = next_token(&val, (unsigned *)0, cfile);
-+ token = peek_token(&val, (unsigned *)0, cfile);
- if (token != SEMI) {
- parse_warn(cfile,
- "semicolon expected.");
--- /dev/null
+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;
--- /dev/null
+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);
-diff -up dhcp-4.2.4b1/client/clparse.c.options dhcp-4.2.4b1/client/clparse.c
---- dhcp-4.2.4b1/client/clparse.c.options 2012-03-09 12:28:10.000000000 +0100
-+++ dhcp-4.2.4b1/client/clparse.c 2012-04-16 17:24:58.794047046 +0200
+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
+ .B -w
+ ]
+ [
++.B -B
++]
++[
++.B -I
++.I dhcp-client-identifier
++]
++[
++.B -H
++.I host-name
++]
++[
++.B -F
++.I fqdn.fqdn
++]
++[
++.B -V
++.I vendor-class-identifier
++]
++[
++.B -R
++.I request-option-list
++]
++[
++.B -timeout
++.I timeout
++]
++[
+ .B -v
+ ]
+ [
+@@ -264,6 +291,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.
++
++.TP
++.BI \-B
++Set the BOOTP broadcast flag in request packets so servers will always
++broadcast replies.
++
++.TP
++.BI \-I\ <dhcp-client-identifier>
++Specify the dhcp-client-identifier option to send to the DHCP server.
++
++.TP
++.BI \-H\ <host-name>
++Specify the host-name option to send to the DHCP server. The host-name
++string only contains the client's hostname prefix, to which the server will
++append the ddns-domainname or domain-name options, if any, to derive the
++fully qualified domain name of the client. The
++.B -H
++option cannot be used with the
++.B -F
++option.
++
++.TP
++.BI \-F\ <fqdn.fqdn>
++Specify the fqdn.fqdn option to send to the DHCP server. This option cannot
++be used with the
++.B -H
++option. The fqdn.fqdn option must specify the complete domain name of the
++client host, which the server may use for dynamic DNS updates.
++
++.TP
++.BI \-V\ <vendor-class-identifier>
++Specify the vendor-class-identifier option to send to the DHCP server.
++
++.TP
++.BI \-R\ <option>[,<option>...]
++Specify the list of options the client is to request from the server. The
++option list must be a single string consisting of option names separated
++by at least one command and optional space characters. The default option
++list is:
++
++.BR
++ subnet-mask, broadcast-address, time-offset, routers,
++.BR
++ domain-search, domain-name, domain-name-servers, host-name,
++.BR
++ nis-domain, nis-servers, ntp-servers, interface-mtu
++
++.TP
++.B -R
++option does not append options to the default request, it overrides the
++default request list. Keep this in mind if you want to request an
++additional option besides the default request list. You will have to
++specify all option names for the
++.B -R
++parameter.
++
++.TP
++.BI \-timeout\ <timeout>
++Specify the time after which
++.B dhclient
++will decide that no DHCP servers can be contacted when no responses have been
++received.
++
+ .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)
*/
default:
lose = 0;
stmt = (struct executable_statement *)0;
-diff -up dhcp-4.2.4b1/client/dhclient.c.options dhcp-4.2.4b1/client/dhclient.c
---- dhcp-4.2.4b1/client/dhclient.c.options 2012-04-11 22:43:24.000000000 +0200
-+++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:24:58.795047032 +0200
+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
@@ -39,6 +39,12 @@
#include <limits.h>
#include <dns/result.h>
/* Parse the lease database. */
read_client_leases();
-@@ -2421,7 +2671,8 @@ void make_discover (client, lease)
+@@ -715,6 +965,10 @@ static void usage()
+ " [-s server-addr] [-cf config-file] "
+ "[-lf lease-file]\n"
+ " [-pf pid-file] [--no-pid] [-e VAR=val]\n"
++ " [-I <dhcp-client-identifier>] [-B]\n"
++ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
++ " [-V <vendor-class-identifier>]\n"
++ " [-R <request option list>]\n"
+ " [-sf script-file] [interface]");
+ }
+
+@@ -2421,7 +2675,8 @@ void make_discover (client, lease)
client -> packet.xid = random ();
client -> packet.secs = 0; /* filled in by send_discover. */
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2505,7 +2756,9 @@ void make_request (client, lease)
+@@ -2505,7 +2760,9 @@ void make_request (client, lease)
} else {
memset (&client -> packet.ciaddr, 0,
sizeof client -> packet.ciaddr);
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2567,7 +2820,8 @@ void make_decline (client, lease)
+@@ -2567,7 +2824,8 @@ void make_decline (client, lease)
client -> packet.hops = 0;
client -> packet.xid = client -> xid;
client -> packet.secs = 0; /* Filled in by send_request. */
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-diff -up dhcp-4.2.4b1/common/conflex.c.options dhcp-4.2.4b1/common/conflex.c
---- dhcp-4.2.4b1/common/conflex.c.options 2012-02-16 22:09:14.000000000 +0100
-+++ dhcp-4.2.4b1/common/conflex.c 2012-04-16 17:24:58.796047018 +0200
+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)
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
break;
case 'c':
if (!strcasecmp(atom + 1, "ase"))
-diff -up dhcp-4.2.4b1/includes/dhcpd.h.options dhcp-4.2.4b1/includes/dhcpd.h
---- dhcp-4.2.4b1/includes/dhcpd.h.options 2012-04-10 02:55:06.000000000 +0200
-+++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:24:58.797047004 +0200
-@@ -1147,6 +1147,9 @@ struct client_config {
+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
+@@ -1153,6 +1153,9 @@ struct client_config {
int do_forward_update; /* If nonzero, and if we have the
information we need, update the
A record for the address we get. */
};
/* Per-interface state used in the dhcp client... */
-diff -up dhcp-4.2.4b1/includes/dhctoken.h.options dhcp-4.2.4b1/includes/dhctoken.h
---- dhcp-4.2.4b1/includes/dhctoken.h.options 2012-02-16 22:09:15.000000000 +0100
-+++ dhcp-4.2.4b1/includes/dhctoken.h 2012-04-16 17:25:53.819276248 +0200
+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,
-diff -up dhcp-4.2.4rc2/common/discover.c.getifaddrs dhcp-4.2.4rc2/common/discover.c
---- dhcp-4.2.4rc2/common/discover.c.getifaddrs 2012-05-25 18:05:29.592024035 +0200
-+++ dhcp-4.2.4rc2/common/discover.c 2012-05-25 18:12:05.254266023 +0200
-@@ -379,394 +379,13 @@ end_iface_scan(struct iface_conf_list *i
+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) {
ifaces->sock = -1;
}
- int len;
- int i;
-
-- ifaces->fp = fopen("/proc/net/dev", "re");
+- ifaces->fp = fopen("/proc/net/dev", "r");
- if (ifaces->fp == NULL) {
- log_error("Error opening '/proc/net/dev' to list interfaces");
- return 0;
- }
-
-#ifdef DHCPv6
-- if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
-- ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
+- if (local_family == AF_INET6) {
+- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
- ifaces->fp = NULL;
- return 0;
- }
-- } else {
-- ifaces->fp6 = NULL;
- }
-#endif
-
- return 1;
- }
-#ifdef DHCPv6
-- if (!(*err) && ifaces->fp6) {
+- if (!(*err)) {
- if (local_family == AF_INET6)
- return next_iface6(info, err, ifaces);
- }
- ifaces->sock = -1;
-#ifdef DHCPv6
- if (local_family == AF_INET6) {
-- if (ifaces->fp6)
-- fclose(ifaces->fp6);
+- fclose(ifaces->fp6);
- ifaces->fp6 = NULL;
- }
-#endif
* -----------
*
- * FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs()
-+ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
++ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
* function.
*
* The getifaddrs() man page describes the use.
-@@ -814,6 +433,8 @@ begin_iface_scan(struct iface_conf_list
+@@ -811,6 +433,8 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
*/
int
next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
if (ifaces->next == NULL) {
*err = 0;
return 0;
-@@ -825,8 +446,20 @@ next_iface(struct iface_info *info, int
+@@ -822,8 +446,20 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
return 0;
}
strcpy(info->name, ifaces->next->ifa_name);
info->flags = ifaces->next->ifa_flags;
ifaces->next = ifaces->next->ifa_next;
*err = 0;
+--
+1.8.1
+
+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
+@@ -42,7 +42,7 @@ option dhcp6.domain-search "test.example
+ option dhcp6.info-refresh-time 21600;
+
+ # The path of the lease file
+-dhcpv6-lease-file-name "/usr/local/var/db/dhcpd6.leases";
++dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases";
+
+ # 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
+++ 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
hw->hbuf[0] = HTYPE_FDDI;
- memcpy(&hw->hbuf[1], sa->sa_data, 16);
+ memcpy(&hw->hbuf[1], sa->sa_data, 6);
break;
+#if defined(ARPHRD_PPP)
+ case ARPHRD_PPP:
-diff -up dhcp-4.2.4/client/dhclient.c.lpf-ib dhcp-4.2.4/client/dhclient.c
---- dhcp-4.2.4/client/dhclient.c.lpf-ib 2012-07-18 21:08:48.100835005 +0200
-+++ dhcp-4.2.4/client/dhclient.c 2012-07-18 21:08:48.111834856 +0200
+diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-4.2.4-P2/client/dhclient.c
+--- dhcp-4.2.4-P2/client/dhclient.c.lpf-ib 2012-11-30 14:05:07.399394154 +0100
++++ dhcp-4.2.4-P2/client/dhclient.c 2012-11-30 14:05:07.406394070 +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);
/* Individual States:
*
* Each routine is called from the dhclient_state_machine() in one of
-diff -up dhcp-4.2.4/common/bpf.c.lpf-ib dhcp-4.2.4/common/bpf.c
---- dhcp-4.2.4/common/bpf.c.lpf-ib 2012-07-18 21:08:48.101834991 +0200
-+++ dhcp-4.2.4/common/bpf.c 2012-07-18 21:08:48.111834856 +0200
+diff -up dhcp-4.2.4-P2/common/bpf.c.lpf-ib dhcp-4.2.4-P2/common/bpf.c
+--- dhcp-4.2.4-P2/common/bpf.c.lpf-ib 2012-11-30 14:05:07.394394214 +0100
++++ dhcp-4.2.4-P2/common/bpf.c 2012-11-30 14:05:07.407394058 +0100
@@ -198,11 +198,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
BPF_STMT(BPF_RET+BPF_K, 0),
};
#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.4/common/lpf.c.lpf-ib dhcp-4.2.4/common/lpf.c
---- dhcp-4.2.4/common/lpf.c.lpf-ib 2012-07-18 21:08:48.101834991 +0200
-+++ dhcp-4.2.4/common/lpf.c 2012-07-18 21:10:47.367210799 +0200
+diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
+--- dhcp-4.2.4-P2/common/lpf.c.lpf-ib 2012-11-30 14:05:07.394394214 +0100
++++ dhcp-4.2.4-P2/common/lpf.c 2012-11-30 14:19:27.211031532 +0100
@@ -42,6 +42,7 @@
#include "includes/netinet/udp.h"
#include "includes/netinet/if_ether.h"
if (strlen(name) >= sizeof(tmp.ifr_name)) {
log_fatal("Device name too long: \"%s\"", name);
-@@ -479,16 +630,44 @@ get_hw_addr(const char *name, struct har
+@@ -479,16 +630,52 @@ get_hw_addr(const char *name, struct har
memset(&tmp, 0, sizeof(tmp));
strcpy(tmp.ifr_name, name);
if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
+ log_fatal("Error getting hardware address for \"%s\": %m",
name);
}
++ close(sock);
sa = &tmp.ifr_hwaddr;
- switch (sa->sa_family) {
++ // needs to be freed outside this function
+ sll = dmalloc (sizeof (struct sockaddr_ll), MDL);
+ if (!sll)
+ log_fatal("Unable to allocate memory for link layer address");
+ struct ifaddrs *ifaddrs = NULL;
+ struct ifaddrs *ifa = NULL;
+ struct sockaddr_ll *sll = NULL;
++ int sll_allocated = 0;
+
+ if (getifaddrs(&ifaddrs) == -1)
+ log_fatal("Failed to get interfaces");
+ * Fall back to ioctl(SIOCGIFHWADDR).
+ */
+ sll = ioctl_get_ll(name);
++ if (sll != NULL)
++ sll_allocated = 1;
++ else
++ // shouldn't happed
++ log_fatal("Unexpected internal error");
+ }
+
+ switch (sll->sll_hatype) {
break;
case ARPHRD_IEEE802:
#ifdef ARPHRD_IEEE802_TR
-@@ -496,18 +675,35 @@ get_hw_addr(const char *name, struct har
+@@ -496,18 +683,35 @@ get_hw_addr(const char *name, struct har
#endif /* ARPHRD_IEEE802_TR */
hw->hlen = 7;
hw->hbuf[0] = HTYPE_IEEE802;
+ memcpy(&hw->hbuf[1], sll->sll_addr, 6);
break;
case ARPHRD_FDDI:
- hw->hlen = 17;
+ hw->hlen = 7;
hw->hbuf[0] = HTYPE_FDDI;
-- memcpy(&hw->hbuf[1], sa->sa_data, 16);
-+ memcpy(&hw->hbuf[1], sll->sll_addr, 16);
+- memcpy(&hw->hbuf[1], sa->sa_data, 6);
++ memcpy(&hw->hbuf[1], sll->sll_addr, 6);
+ break;
+ case ARPHRD_INFINIBAND:
+ /* For Infiniband, save the broadcast address and store
hw->hlen = 0;
hw->hbuf[0] = HTYPE_RESERVED;
/* 0xdeadbeef should never occur on the wire,
-@@ -520,10 +716,11 @@ get_hw_addr(const char *name, struct har
+@@ -520,10 +724,13 @@ get_hw_addr(const char *name, struct har
break;
#endif
default:
}
- close(sock);
++ if (sll_allocated)
++ dfree(sll, MDL);
+ freeifaddrs(ifaddrs);
}
#endif
-diff -up dhcp-4.2.4/common/socket.c.lpf-ib dhcp-4.2.4/common/socket.c
---- dhcp-4.2.4/common/socket.c.lpf-ib 2012-03-09 12:28:11.000000000 +0100
-+++ dhcp-4.2.4/common/socket.c 2012-07-18 21:08:48.112834843 +0200
+diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
+--- dhcp-4.2.4-P2/common/socket.c.lpf-ib 2012-08-24 21:11:21.000000000 +0200
++++ dhcp-4.2.4-P2/common/socket.c 2012-11-30 14:05:07.408394046 +0100
@@ -325,7 +325,7 @@ void if_register_send (info)
info->wfdesc = if_register_socket(info, AF_INET, 0);
/* If this is a normal IPv4 address, get the hardware address. */
if (!quiet_interface_discovery) {
if (info->shared_network != NULL) {
-diff -up dhcp-4.2.4/includes/dhcpd.h.lpf-ib dhcp-4.2.4/includes/dhcpd.h
---- dhcp-4.2.4/includes/dhcpd.h.lpf-ib 2012-07-18 21:08:48.102834978 +0200
-+++ dhcp-4.2.4/includes/dhcpd.h 2012-07-18 21:08:48.114834815 +0200
-@@ -1243,6 +1243,7 @@ struct interface_info {
+diff -up dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib dhcp-4.2.4-P2/includes/dhcpd.h
+--- dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib 2012-11-30 14:05:07.400394142 +0100
++++ dhcp-4.2.4-P2/includes/dhcpd.h 2012-11-30 14:05:07.409394034 +0100
+@@ -1249,6 +1249,7 @@ struct interface_info {
struct shared_network *shared_network;
/* Networks connected to this interface. */
struct hardware hw_address; /* Its physical address. */
struct in_addr *addresses; /* Addresses associated with this
* interface.
*/
-@@ -2360,7 +2361,7 @@ void print_dns_status (int, struct dhcp_
+@@ -2368,7 +2369,7 @@ void print_dns_status (int, struct dhcp_
#endif
const char *print_time(TIME);
-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
- .B -w
- ]
- [
-+.B -B
-+]
-+[
-+.B -I
-+.I dhcp-client-identifier
-+]
-+[
-+.B -H
-+.I host-name
-+]
-+[
-+.B -F
-+.I fqdn.fqdn
-+]
-+[
-+.B -V
-+.I vendor-class-identifier
-+]
-+[
-+.B -R
-+.I request-option-list
-+]
-+[
-+.B -timeout
-+.I timeout
-+]
-+[
- .B -v
- ]
- [
-@@ -264,6 +291,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.
-+
-+.TP
-+.BI \-B
-+Set the BOOTP broadcast flag in request packets so servers will always
-+broadcast replies.
-+
-+.TP
-+.BI \-I\ <dhcp-client-identifier>
-+Specify the dhcp-client-identifier option to send to the DHCP server.
-+
-+.TP
-+.BI \-H\ <host-name>
-+Specify the host-name option to send to the DHCP server. The host-name
-+string only contains the client's hostname prefix, to which the server will
-+append the ddns-domainname or domain-name options, if any, to derive the
-+fully qualified domain name of the client. The
-+.B -H
-+option cannot be used with the
-+.B -F
-+option.
-+
-+.TP
-+.BI \-F\ <fqdn.fqdn>
-+Specify the fqdn.fqdn option to send to the DHCP server. This option cannot
-+be used with the
-+.B -H
-+option. The fqdn.fqdn option must specify the complete domain name of the
-+client host, which the server may use for dynamic DNS updates.
-+
-+.TP
-+.BI \-V\ <vendor-class-identifier>
-+Specify the vendor-class-identifier option to send to the DHCP server.
-+
-+.TP
-+.BI \-R\ <option>[,<option>...]
-+Specify the list of options the client is to request from the server. The
-+option list must be a single string consisting of option names separated
-+by at least one command and optional space characters. The default option
-+list is:
-+
-+.BR
-+ subnet-mask, broadcast-address, time-offset, routers,
-+.BR
-+ domain-search, domain-name, domain-name-servers, host-name,
-+.BR
-+ nis-domain, nis-servers, ntp-servers, interface-mtu
-+
-+.TP
-+.B -R
-+option does not append options to the default request, it overrides the
-+default request list. Keep this in mind if you want to request an
-+additional option besides the default request list. You will have to
-+specify all option names for the
-+.B -R
-+parameter.
-+
-+.TP
-+.BI \-timeout\ <timeout>
-+Specify the time after which
-+.B dhclient
-+will decide that no DHCP servers can be contacted when no responses have been
-+received.
-+
- .TP
- .BI \-n
- Do not configure any interfaces. This is most likely to be useful in
-diff -up dhcp-4.2.1b1/client/dhclient.conf.5.man dhcp-4.2.1b1/client/dhclient.conf.5
---- dhcp-4.2.1b1/client/dhclient.conf.5.man 2010-09-15 01:03:56.000000000 +0200
-+++ dhcp-4.2.1b1/client/dhclient.conf.5 2011-01-27 18:22:56.000000000 +0100
-@@ -186,7 +186,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
+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
+@@ -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
requests the subnet-mask, broadcast-address, time-offset, routers,
-domain-name, domain-name-servers and host-name options while the DHCPv6
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
client requests the dhcp6 name-servers and domain-search options. Note
that if you enter a \'request\' statement, you over-ride these defaults
and these options will not be requested.
-@@ -672,6 +673,17 @@ know the DHCP service(s) anycast MAC add
+@@ -688,6 +689,17 @@ know the DHCP service(s) anycast MAC add
client. The \fIlink-type\fR and \fImac-address\fR parameters are configured
in a similar manner to the \fBhardware\fR statement.
.PP
+.PP
.SH SAMPLE
The following configuration file is used on a laptop running NetBSD
- 1.3. The laptop has an IP alias of 192.5.5.213, and has one
-@@ -697,7 +709,7 @@ interface "ep0" {
+ 1.3. The laptop has an IP alias of 192.5.5.213, and has one
+@@ -713,7 +725,7 @@ interface "ep0" {
supersede domain-search "fugue.com", "rc.vix.com", "home.vix.com";
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
require subnet-mask, domain-name-servers;
script "CLIENTBINDIR/dhclient-script";
media "media 10baseT/UTP", "media 10base2/BNC";
-diff -up dhcp-4.2.1b1/client/dhclient-script.8.man dhcp-4.2.1b1/client/dhclient-script.8
---- dhcp-4.2.1b1/client/dhclient-script.8.man 2010-07-06 21:03:11.000000000 +0200
-+++ dhcp-4.2.1b1/client/dhclient-script.8 2011-01-27 18:24:44.000000000 +0100
-@@ -47,7 +47,7 @@ customizations are needed, they should b
+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
.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
-@@ -91,6 +91,26 @@ present. The
+@@ -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.
.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.1b1/common/dhcp-options.5.man dhcp-4.2.1b1/common/dhcp-options.5
---- dhcp-4.2.1b1/common/dhcp-options.5.man 2010-07-13 22:56:56.000000000 +0200
-+++ dhcp-4.2.1b1/common/dhcp-options.5 2011-01-27 18:25:57.000000000 +0100
-@@ -913,6 +913,21 @@ classless IP routing - it does not inclu
+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
+@@ -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
popular DHCP clients, for example the Microsoft DHCP client.
.RE
.PP
.nf
-diff -up dhcp-4.2.1b1/server/dhcpd.conf.5.man dhcp-4.2.1b1/server/dhcpd.conf.5
---- dhcp-4.2.1b1/server/dhcpd.conf.5.man 2010-07-06 21:03:12.000000000 +0200
-+++ dhcp-4.2.1b1/server/dhcpd.conf.5 2011-01-27 18:29:12.000000000 +0100
+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 {
};
.fi
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
-@@ -1305,7 +1308,7 @@ the zone containing PTR records - for IS
+@@ -1318,7 +1321,7 @@ the zone containing PTR records - for IS
.PP
.nf
key DHCP_UPDATER {
secret pRP5FapFoJ95JEL06sv4PQ==;
};
-@@ -1328,7 +1331,7 @@ dhcpd.conf file:
+@@ -1341,7 +1344,7 @@ dhcpd.conf file:
.PP
.nf
key DHCP_UPDATER {
secret pRP5FapFoJ95JEL06sv4PQ==;
};
-@@ -2540,7 +2543,8 @@ statement
+@@ -2555,7 +2558,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
+ \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
-be a numeric IP address or a domain name.
+be a numeric IP address or a domain name. If no \fInext-server\fR statement
+applies to a given client, the address 0.0.0.0 is used.
--- /dev/null
+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)
+ client -> state = S_REQUESTING;
+
+ /* Bind to the address we received. */
+- bind_lease (client);
++ bind_lease (client, NULL);
+ return;
+ }
+
+@@ -1183,11 +1183,12 @@ void dhcpack (packet)
+ if (client -> new -> rebind < cur_time)
+ client -> new -> rebind = TIME_MAX;
+
+- bind_lease (client);
++ bind_lease (client, &packet -> raw -> siaddr);
+ }
+
+-void bind_lease (client)
++void bind_lease (client, siaddr)
+ struct client_state *client;
++ struct in_addr *siaddr;
+ {
+ struct timeval tv;
+
+@@ -1209,6 +1210,13 @@ void bind_lease (client)
+ if (client -> alias)
+ script_write_params (client, "alias_", client -> alias);
+
++ if (siaddr) {
++ char buf[INET_ADDRSTRLEN];
++
++ if (inet_ntop (AF_INET, (void *) siaddr, buf, sizeof (buf)))
++ client_envadd (client, "new_", "next_server", "%s", buf);
++ }
++
+ /* 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 *);
+ void state_stop (void *);
+ void state_panic (void *);
+
+-void bind_lease (struct client_state *);
++void bind_lease (struct client_state *, struct in_addr *);
+
+ void make_client_options (struct client_state *,
+ struct client_lease *, u_int8_t *,
+--
+1.8.1.4
+
--- /dev/null
+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)
+ return 0;
+ }
+
+-void db_startup (testp)
+- int testp;
+-{
+-}
+-
+ 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 *);
+ void commit_leases_readerdry(void *);
+ int commit_leases (void);
+ int commit_leases_timed (void);
++#if defined (PARANOIA)
++void db_startup (int, uid_t, gid_t);
++#else
+ void db_startup (int);
++#endif /* PARANOIA */
+ 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
+ }
+
+ if (!leaseconf_initialized && ttype == trace_readleases_type) {
++#if defined (PARANOIA)
++ db_startup (0, 0, 0);
++#else
+ db_startup (0);
++#endif /* PARANOIA */
+ 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;
+ static int count = 0;
+ TIME write_time;
+ int lease_file_is_corrupt = 0;
++#if defined (PARANOIA)
++uid_t global_set_uid = 0;
++gid_t global_set_gid = 0;
++#endif /* PARANOIA */
+
+ /* Write a single binding scope value in parsable format.
+ */
+@@ -1026,8 +1030,11 @@ int commit_leases_timed()
+ return (1);
+ }
+
+-void db_startup (testp)
+- int testp;
++#if defined (PARANOIA)
++void db_startup (int testp, uid_t set_uid, gid_t set_gid)
++#else
++void db_startup (int testp)
++#endif /* PARANOIA */
+ {
+ isc_result_t status;
+
+@@ -1046,6 +1053,11 @@ void db_startup (testp)
+ }
+ #endif
+
++#if defined (PARANOIA)
++ global_set_uid = set_uid;
++ global_set_gid = set_gid;
++#endif /* PARANOIA */
++
+ #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 ()
+ log_error ("Can't create new lease file: %m");
+ return 0;
+ }
++
++#if defined (PARANOIA)
++ if (global_set_uid && !geteuid() &&
++ global_set_gid && !getegid())
++ if (fchown(db_fd, global_set_uid, global_set_gid)) {
++ log_fatal ("Can't chown new lease file: %m");
++ close(db_fd);
++ goto fdfail;
++ }
++#endif /* PARANOIA */
++
+ 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
+@@ -82,6 +82,18 @@ dhcpd - Dynamic Host Configuration Proto
+ .I trace-output-file
+ ]
+ [
++.B -user
++.I user
++]
++[
++.B -group
++.I group
++]
++[
++.B -chroot
++.I dir
++]
++[
+ .B -play
+ .I trace-playback-file
+ ]
+@@ -269,6 +281,15 @@ lease file.
+ .TP
+ .BI --version
+ Print version number and exit.
++.TP
++.BI \-user \ user
++Setuid to user after completing privileged operations, such as creating sockets that listen on privileged ports.
++.TP
++.BI \-group \ group
++Setgid to group after completing privileged operations, such as creating sockets that listen on privileged ports.
++.TP
++.BI \-chroot \ dir
++Chroot to directory after processing the command line arguments, but before reading the configuration file.
+ .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) {
+ group_write_hook = group_writer;
+
+ /* Start up the database... */
++#if defined (PARANOIA)
++ db_startup (lftest, set_uid, set_gid);
++#else
+ db_startup (lftest);
++#endif /* PARANOIA */
+
+ if (lftest)
+ exit (0);
+@@ -773,22 +777,6 @@ main(int argc, char **argv) {
+ exit (0);
+ }
+
+-#if defined (PARANOIA)
+- /* change uid to the specified one */
+-
+- if (set_gid) {
+- if (setgroups (0, (void *)0))
+- log_fatal ("setgroups: %m");
+- if (setgid (set_gid))
+- log_fatal ("setgid(%d): %m", (int) set_gid);
+- }
+-
+- if (set_uid) {
+- if (setuid (set_uid))
+- log_fatal ("setuid(%d): %m", (int) set_uid);
+- }
+-#endif /* PARANOIA */
+-
+ /*
+ * 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) {
+ }
+ }
+
++#if defined (PARANOIA)
++ /* change uid to the specified one */
++
++ if (set_gid) {
++ if (setgroups (0, (void *)0))
++ log_fatal ("setgroups: %m");
++ if (setgid (set_gid))
++ log_fatal ("setgid(%d): %m", (int) set_gid);
++ }
++
++ if (set_uid) {
++ if (setuid (set_uid))
++ log_fatal ("setuid(%d): %m", (int) set_uid);
++ }
++#endif /* PARANOIA */
++
+ /* If we were requested to log to stdout on the command line,
+ keep doing so; otherwise, stop. */
+ if (log_perror == -1)
--- /dev/null
+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;
+ }
+
++static void
++check_addr_in_subnet(struct subnet *subnet, struct iaddr *addr) {
++ char lowbuf [INET6_ADDRSTRLEN], netbuf [INET6_ADDRSTRLEN];
++
++ if (!addr_eq(subnet->net, subnet_number(*addr, subnet->netmask))) {
++ strcpy(lowbuf, piaddr(*addr));
++ strcpy(netbuf, piaddr(subnet->net));
++ log_fatal("bad range6, address %s not in subnet6 %s/%d",
++ lowbuf, netbuf, subnet->prefix_len);
++ }
++
++}
++
+ /* 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;
+ }
+
++ 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) {
+ return;
+ }
+
++ check_addr_in_subnet(group->subnet, &hi);
++
+ /*
+ * Convert our range to a set of CIDR networks.
+ */
-diff -up dhcp-4.2.2/client/Makefile.am.rh637017 dhcp-4.2.2/client/Makefile.am
---- dhcp-4.2.2/client/Makefile.am.rh637017 2010-09-15 00:32:36.000000000 +0200
-+++ dhcp-4.2.2/client/Makefile.am 2011-08-11 17:28:58.923897561 +0200
-@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
+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 \
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.2/common/tests/Makefile.am.rh637017 dhcp-4.2.2/common/tests/Makefile.am
---- dhcp-4.2.2/common/tests/Makefile.am.rh637017 2009-10-28 05:12:30.000000000 +0100
-+++ dhcp-4.2.2/common/tests/Makefile.am 2011-08-11 17:33:45.258637236 +0200
-@@ -6,6 +6,5 @@ TESTS = test_alloc
-
- test_alloc_SOURCES = test_alloc.c
- test_alloc_LDADD = ../libdhcp.a ../../tests/libt_api.a \
+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
-diff -up dhcp-4.2.2/configure.ac.rh637017 dhcp-4.2.2/configure.ac
---- dhcp-4.2.2/configure.ac.rh637017 2011-07-20 02:32:18.000000000 +0200
-+++ dhcp-4.2.2/configure.ac 2011-08-11 17:28:58.924897535 +0200
-@@ -512,20 +512,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
+
+ 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],
# OpenLDAP support.
AC_ARG_WITH(ldap,
-@@ -562,7 +579,7 @@ fi
+@@ -631,7 +648,7 @@ fi
CFLAGS="$CFLAGS $STD_CWARNINGS"
# Try to add the bind include directory
AC_C_FLEXIBLE_ARRAY_MEMBER
-diff -up dhcp-4.2.2/dhcpctl/Makefile.am.rh637017 dhcp-4.2.2/dhcpctl/Makefile.am
---- dhcp-4.2.2/dhcpctl/Makefile.am.rh637017 2009-10-28 05:12:30.000000000 +0100
-+++ dhcp-4.2.2/dhcpctl/Makefile.am 2011-08-11 17:28:58.924897535 +0200
+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
- ../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.2/Makefile.am.rh637017 dhcp-4.2.2/Makefile.am
---- dhcp-4.2.2/Makefile.am.rh637017 2010-03-25 00:30:38.000000000 +0100
-+++ dhcp-4.2.2/Makefile.am 2011-08-11 17:28:58.925897509 +0200
-@@ -21,7 +21,13 @@ EXTRA_DIST = RELNOTES LICENSE \
- util/bindvar.sh \
- bind/Makefile bind/bind.tar.gz bind/version.tmp
+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
nobase_include_HEADERS = dhcpctl/dhcpctl.h
-diff -up dhcp-4.2.2/omapip/Makefile.am.rh637017 dhcp-4.2.2/omapip/Makefile.am
---- dhcp-4.2.2/omapip/Makefile.am.rh637017 2010-02-12 01:13:54.000000000 +0100
-+++ dhcp-4.2.2/omapip/Makefile.am 2011-08-11 17:28:58.939897149 +0200
+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_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.2/relay/Makefile.am.rh637017 dhcp-4.2.2/relay/Makefile.am
---- dhcp-4.2.2/relay/Makefile.am.rh637017 2009-10-28 05:12:30.000000000 +0100
-+++ dhcp-4.2.2/relay/Makefile.am 2011-08-11 17:28:58.940897123 +0200
+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
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.2/server/Makefile.am.rh637017 dhcp-4.2.2/server/Makefile.am
---- dhcp-4.2.2/server/Makefile.am.rh637017 2010-03-24 22:49:47.000000000 +0100
-+++ dhcp-4.2.2/server/Makefile.am 2011-08-11 17:28:58.944897021 +0200
-@@ -8,8 +8,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
+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 \
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 =
-diff -up dhcp-4.2.4b1/client/clparse.c.rfc3442 dhcp-4.2.4b1/client/clparse.c
---- dhcp-4.2.4b1/client/clparse.c.rfc3442 2012-04-16 17:34:27.546079944 +0200
-+++ dhcp-4.2.4b1/client/clparse.c 2012-04-16 17:34:27.605079118 +0200
+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
@@ -37,7 +37,7 @@
struct client_config top_level_config;
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.4b1/common/dhcp-options.5.rfc3442 dhcp-4.2.4b1/common/dhcp-options.5
---- dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 2012-04-16 17:34:27.537080070 +0200
-+++ dhcp-4.2.4b1/common/dhcp-options.5 2012-04-16 17:34:27.606079104 +0200
-@@ -115,6 +115,26 @@ hexadecimal, separated by colons. 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
+@@ -116,6 +116,26 @@ hexadecimal, separated by colons. For e
or
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
.fi
+.fi
.SH SETTING OPTION VALUES USING EXPRESSIONS
Sometimes it's helpful to be able to set the value of a DHCP option
- based on some value that the client has sent. To do this, you can
-@@ -931,6 +951,29 @@ dhclient-script will create routes:
+ based on some value that the client has sent. To do this, you can
+@@ -932,6 +952,29 @@ dhclient-script will create routes:
.RE
.PP
.nf
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
[\fB,\fR \fIip-address\fR...]\fB;\fR
.fi
-diff -up dhcp-4.2.4b1/common/inet.c.rfc3442 dhcp-4.2.4b1/common/inet.c
---- dhcp-4.2.4b1/common/inet.c.rfc3442 2011-05-11 02:47:22.000000000 +0200
-+++ dhcp-4.2.4b1/common/inet.c 2012-04-16 17:34:27.607079090 +0200
+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
return ISC_R_SUCCESS;
}
/* 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.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
---- dhcp-4.2.4b1/common/options.c.rfc3442 2012-03-20 01:31:53.000000000 +0100
-+++ dhcp-4.2.4b1/common/options.c 2012-04-16 17:34:27.608079076 +0200
-@@ -706,7 +706,11 @@ cons_options(struct packet *inpacket, st
+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
+@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
* packet.
*/
priority_list[priority_len++] = DHO_SUBNET_MASK;
priority_list[priority_len++] = DHO_DOMAIN_NAME_SERVERS;
priority_list[priority_len++] = DHO_HOST_NAME;
priority_list[priority_len++] = DHO_FQDN;
-@@ -1683,6 +1687,7 @@ const char *pretty_print_option (option,
- const unsigned char *dp = data;
- char comma;
+@@ -1694,6 +1698,7 @@ const char *pretty_print_option (option,
unsigned long tval;
-+ unsigned int octets = 0;
+ isc_boolean_t a_array = ISC_FALSE;
+ int len_used;
++ unsigned int octets = 0;
if (emit_commas)
comma = ',';
-@@ -1691,6 +1696,7 @@ const char *pretty_print_option (option,
+@@ -1702,6 +1707,7 @@ const char *pretty_print_option (option,
memset (enumbuf, 0, sizeof enumbuf);
/* Figure out the size of the data. */
for (l = i = 0; option -> format [i]; i++, l++) {
if (l >= sizeof(fmtbuf) - 1)
-@@ -1840,6 +1846,33 @@ const char *pretty_print_option (option,
+@@ -1876,6 +1882,33 @@ const char *pretty_print_option (option,
if (numhunk < 0)
numhunk = 1;
+
/* Cycle through the array (or hunk) printing the data. */
for (i = 0; i < numhunk; i++) {
- for (j = 0; j < numelem; j++) {
-@@ -1978,6 +2011,20 @@ const char *pretty_print_option (option,
+ if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
+@@ -2031,6 +2064,20 @@ const char *pretty_print_option (option,
strcpy(op, piaddr(iaddr));
dp += 4;
break;
case '6':
iaddr.len = 16;
memcpy(iaddr.iabuf, dp, 16);
-diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
---- dhcp-4.2.4b1/common/parse.c.rfc3442 2012-04-16 17:34:27.577079510 +0200
-+++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:34:27.610079048 +0200
+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
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
}
* Return true if every character in the string is hexadecimal.
*/
static int
-@@ -704,8 +737,10 @@ unsigned char *parse_numeric_aggregate (
+@@ -719,8 +752,10 @@ unsigned char *parse_numeric_aggregate (
if (count) {
token = peek_token (&val, (unsigned *)0, cfile);
if (token != separator) {
if (token != RBRACE && token != LBRACE)
token = next_token (&val,
(unsigned *)0,
-@@ -1628,6 +1663,9 @@ int parse_option_code_definition (cfile,
+@@ -1660,6 +1695,9 @@ int parse_option_code_definition (cfile,
case IP_ADDRESS:
type = 'I';
break;
case IP6_ADDRESS:
type = '6';
break;
-@@ -5375,6 +5413,15 @@ int parse_option_token (rv, cfile, fmt,
+@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
}
break;
case '6': /* IPv6 address. */
if (!parse_ip6_addr(cfile, &addr)) {
return 0;
-@@ -5635,6 +5682,13 @@ int parse_option_decl (oc, cfile)
+@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
goto exit;
len = ip_addr.len;
dp = ip_addr.iabuf;
alloc:
if (hunkix + len > sizeof hunkbuf) {
-diff -up dhcp-4.2.4b1/common/tables.c.rfc3442 dhcp-4.2.4b1/common/tables.c
---- dhcp-4.2.4b1/common/tables.c.rfc3442 2012-04-16 17:34:27.566079664 +0200
-+++ dhcp-4.2.4b1/common/tables.c 2012-04-16 17:34:27.611079034 +0200
+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
@@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig
Format codes:
6 - IPv6 address
l - 32-bit signed integer
L - 32-bit unsigned integer
-@@ -209,6 +210,7 @@ static struct option dhcp_options[] = {
+@@ -210,6 +211,7 @@ static struct option dhcp_options[] = {
{ "default-url", "t", &dhcp_universe, 114, 1 },
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
{ "domain-search", "D", &dhcp_universe, 119, 1 },
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
#if 0
-diff -up dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 dhcp-4.2.4b1/includes/dhcpd.h
---- dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 2012-04-16 17:34:27.543079986 +0200
-+++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:34:27.613079006 +0200
-@@ -2666,6 +2666,7 @@ isc_result_t range2cidr(struct iaddrcidr
+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);
char *piaddrmask(struct iaddr *, struct iaddr *);
char *piaddrcidr(const struct iaddr *, unsigned int);
u_int16_t validate_port(char *);
-@@ -2873,6 +2874,7 @@ void parse_client_lease_declaration (str
+@@ -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_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
void parse_reject_statement (struct parse *, struct client_config *);
-diff -up dhcp-4.2.4b1/includes/dhcp.h.rfc3442 dhcp-4.2.4b1/includes/dhcp.h
---- dhcp-4.2.4b1/includes/dhcp.h.rfc3442 2012-02-16 22:09:14.000000000 +0100
-+++ dhcp-4.2.4b1/includes/dhcp.h 2012-04-16 17:34:27.613079006 +0200
+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
@@ -163,6 +163,7 @@ struct dhcp_packet {
#define DHO_ASSOCIATED_IP 92
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
#define DHO_VIVCO_SUBOPTIONS 124
#define DHO_VIVSO_SUBOPTIONS 125
-diff -up dhcp-4.2.4b1/includes/dhctoken.h.rfc3442 dhcp-4.2.4b1/includes/dhctoken.h
---- dhcp-4.2.4b1/includes/dhctoken.h.rfc3442 2012-04-16 17:34:27.000000000 +0200
-+++ dhcp-4.2.4b1/includes/dhctoken.h 2012-04-16 17:35:15.028414805 +0200
+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,
-diff -up dhcp-4.2.3-P2/common/dhcp-options.5.rfc5970 dhcp-4.2.3-P2/common/dhcp-options.5
---- dhcp-4.2.3-P2/common/dhcp-options.5.rfc5970 2012-03-21 19:39:47.572002389 +0100
-+++ dhcp-4.2.3-P2/common/dhcp-options.5 2012-03-21 19:39:47.670001164 +0100
-@@ -1770,7 +1770,48 @@ The \fBlq-relay-data\fR option is used i
+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
The \fBlq-client-link\fR option is used internally by for lease query.
.RE
.PP
+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
+the requesting client. These values corespond to the values available to the
+dhcpv4 option architecture-type, as defined in RFC4578, section 2.1.
+This option is defined in RFC5970
- .RE
++ .RE
+.PP
+
+.B option
+.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.3-P2/common/tables.c.rfc5970 dhcp-4.2.3-P2/common/tables.c
---- dhcp-4.2.3-P2/common/tables.c.rfc5970 2012-03-21 19:39:47.577002328 +0100
-+++ dhcp-4.2.3-P2/common/tables.c 2012-03-21 19:39:47.670001164 +0100
-@@ -461,6 +461,18 @@ static struct option dhcpv6_options[] =
+ 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
+@@ -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 },
{ NULL, NULL, NULL, 0, 0 }
};
-diff -up dhcp-4.2.3-P2/includes/dhcp6.h.rfc5970 dhcp-4.2.3-P2/includes/dhcp6.h
---- dhcp-4.2.3-P2/includes/dhcp6.h.rfc5970 2010-02-17 21:33:55.000000000 +0100
-+++ dhcp-4.2.3-P2/includes/dhcp6.h 2012-03-21 19:39:47.671001151 +0100
+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 @@
#define D6O_CLT_TIME 46 /* RFC5007 */
#define D6O_LQ_RELAY_DATA 47 /* RFC5007 */
-diff -up dhcp-4.2.1-P1/client/dhc6.c.sendDecline dhcp-4.2.1-P1/client/dhc6.c
---- dhcp-4.2.1-P1/client/dhc6.c.sendDecline 2010-09-10 22:27:11.000000000 +0200
-+++ dhcp-4.2.1-P1/client/dhc6.c 2011-06-17 14:19:48.992099868 +0200
-@@ -95,6 +95,8 @@ void do_select6(void *input);
+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
+@@ -96,6 +96,8 @@ void do_select6(void *input);
void do_refresh6(void *input);
static void do_release6(void *input);
static void start_bound(struct client_state *client);
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);
-@@ -2075,6 +2077,7 @@ start_release6(struct client_state *clie
+@@ -2080,6 +2082,7 @@ start_release6(struct client_state *clie
cancel_timeout(do_select6, client);
cancel_timeout(do_refresh6, client);
cancel_timeout(do_release6, client);
client->state = S_STOPPED;
/*
-@@ -2708,6 +2711,7 @@ dhc6_check_reply(struct client_state *cl
+@@ -2713,6 +2716,7 @@ dhc6_check_reply(struct client_state *cl
break;
case S_STOPPED:
action = dhc6_stop_action;
break;
-@@ -2809,6 +2813,7 @@ dhc6_check_reply(struct client_state *cl
+@@ -2814,6 +2818,7 @@ dhc6_check_reply(struct client_state *cl
break;
case S_STOPPED:
/* Nothing critical to do at this stage. */
break;
-@@ -3799,17 +3804,23 @@ reply_handler(struct packet *packet, str
+@@ -3804,17 +3809,23 @@ reply_handler(struct packet *packet, str
cancel_timeout(do_select6, client);
cancel_timeout(do_refresh6, client);
cancel_timeout(do_release6, client);
return;
}
-@@ -4336,7 +4347,11 @@ start_bound(struct client_state *client)
- oldia, oldaddr);
+@@ -4342,7 +4353,11 @@ start_bound(struct client_state *client)
dhc6_marshall_values("new_", client, lease, ia, addr);
+ script_write_requested6(client);
- script_go(client);
+ // when script returns 3, DAD failed
}
/* XXX: maybe we should loop on the old values instead? */
-@@ -4382,6 +4397,149 @@ start_bound(struct client_state *client)
+@@ -4390,6 +4405,149 @@ start_bound(struct client_state *client)
dhc6_check_times(client);
}
--- /dev/null
+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 =
-diff -up dhcp-4.2.4b1/configure.ac.systemtap dhcp-4.2.4b1/configure.ac
---- dhcp-4.2.4b1/configure.ac.systemtap 2012-04-16 17:46:10.913227143 +0200
-+++ dhcp-4.2.4b1/configure.ac 2012-04-16 17:46:10.947226667 +0200
-@@ -504,6 +504,35 @@ else
+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
AC_MSG_RESULT(no)
fi
# Solaris needs some libraries for functions
AC_SEARCH_LIBS(socket, [socket])
AC_SEARCH_LIBS(inet_ntoa, [nsl])
-@@ -650,6 +679,7 @@ AC_OUTPUT([
- relay/Makefile
- server/Makefile
+@@ -701,6 +730,7 @@ AC_OUTPUT([
tests/Makefile
+ server/tests/Makefile
+ doc/devel/doxyfile
+ tapset/Makefile
])
sh util/bindvar.sh
-diff -up dhcp-4.2.4b1/Makefile.am.systemtap dhcp-4.2.4b1/Makefile.am
---- dhcp-4.2.4b1/Makefile.am.systemtap 2012-04-16 17:46:10.791228851 +0200
-+++ dhcp-4.2.4b1/Makefile.am 2012-04-16 17:46:10.947226667 +0200
-@@ -29,5 +29,8 @@ endif
+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
SUBDIRS += includes tests common omapip client dhcpctl relay server
+
nobase_include_HEADERS = dhcpctl/dhcpctl.h
-diff -up dhcp-4.2.4b1/server/dhcp.c.systemtap dhcp-4.2.4b1/server/dhcp.c
---- dhcp-4.2.4b1/server/dhcp.c.systemtap 2012-04-16 17:46:10.816228501 +0200
-+++ dhcp-4.2.4b1/server/dhcp.c 2012-04-16 17:48:11.528537555 +0200
+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
@@ -36,7 +36,7 @@
#include <errno.h>
#include <limits.h>
oc = lookup_option (&dhcp_universe, packet -> options,
DHO_DHCP_REQUESTED_ADDRESS);
memset (&data, 0, sizeof data);
-@@ -677,6 +683,9 @@ void dhcprequest (packet, ms_nulltp, ip_
+@@ -700,6 +706,9 @@ void dhcprequest (packet, ms_nulltp, ip_
log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
out:
if (subnet)
subnet_dereference (&subnet, MDL);
if (lease)
-@@ -695,6 +704,7 @@ void dhcprelease (packet, ms_nulltp)
+@@ -718,6 +727,7 @@ void dhcprelease (packet, ms_nulltp)
const char *s;
char msgbuf [1024], cstr[16]; /* XXX */
/* DHCPRELEASE must not specify address in requested-address
option, but old protocol specs weren't explicit about this,
-@@ -819,6 +829,8 @@ void dhcprelease (packet, ms_nulltp)
+@@ -842,6 +852,8 @@ void dhcprelease (packet, ms_nulltp)
#endif
if (lease)
lease_dereference (&lease, MDL);
}
void dhcpdecline (packet, ms_nulltp)
-@@ -836,6 +848,8 @@ void dhcpdecline (packet, ms_nulltp)
+@@ -859,6 +871,8 @@ void dhcpdecline (packet, ms_nulltp)
struct option_cache *oc;
struct data_string data;
/* DHCPDECLINE must specify address. */
if (!(oc = lookup_option (&dhcp_universe, packet -> options,
DHO_DHCP_REQUESTED_ADDRESS)))
-@@ -947,6 +961,8 @@ void dhcpdecline (packet, ms_nulltp)
+@@ -970,6 +984,8 @@ void dhcpdecline (packet, ms_nulltp)
option_state_dereference (&options, MDL);
if (lease)
lease_dereference (&lease, MDL);
}
void dhcpinform (packet, ms_nulltp)
-@@ -970,6 +986,8 @@ void dhcpinform (packet, ms_nulltp)
+@@ -993,6 +1009,8 @@ void dhcpinform (packet, ms_nulltp)
struct interface_info *interface;
int result;
/* 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. */
-@@ -1327,6 +1345,8 @@ void dhcpinform (packet, ms_nulltp)
+@@ -1350,6 +1368,8 @@ void dhcpinform (packet, ms_nulltp)
if (subnet)
subnet_dereference (&subnet, MDL);
}
void nak_lease (packet, cip)
-@@ -1343,6 +1363,8 @@ void nak_lease (packet, cip)
+@@ -1366,6 +1386,8 @@ void nak_lease (packet, cip)
struct option_state *options = (struct option_state *)0;
struct option_cache *oc = (struct option_cache *)0;
option_state_allocate (&options, MDL);
memset (&outgoing, 0, sizeof outgoing);
memset (&raw, 0, sizeof raw);
-@@ -1494,6 +1516,7 @@ void nak_lease (packet, cip)
+@@ -1532,6 +1554,7 @@ void nak_lease (packet, cip)
packet->interface->name);
}
}
void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
-@@ -1535,6 +1558,8 @@ void ack_lease (packet, lease, offer, wh
+@@ -1573,6 +1596,8 @@ void ack_lease (packet, lease, offer, wh
if (lease -> state)
return;
/* Save original cltt for comparison later. */
lease_cltt = lease->cltt;
-@@ -2897,6 +2922,8 @@ void ack_lease (packet, lease, offer, wh
+@@ -2936,6 +2961,8 @@ void ack_lease (packet, lease, offer, wh
#endif
dhcp_reply(lease);
}
}
/*
-@@ -3049,6 +3076,8 @@ void dhcp_reply (lease)
+@@ -3088,6 +3115,8 @@ void dhcp_reply (lease)
if (!state)
log_fatal ("dhcp_reply was supplied lease with no state!");
/* Compose a response for the client... */
memset (&raw, 0, sizeof raw);
memset (&d1, 0, sizeof d1);
-@@ -3270,6 +3299,8 @@ void dhcp_reply (lease)
+@@ -3309,6 +3338,8 @@ void dhcp_reply (lease)
free_lease_state (state, MDL);
lease -> state = (struct lease_state *)0;
}
int find_lease (struct lease **lp,
-@@ -3292,6 +3323,8 @@ int find_lease (struct lease **lp,
+@@ -3331,6 +3362,8 @@ int find_lease (struct lease **lp,
struct data_string client_identifier;
struct hardware h;
#if defined(FAILOVER_PROTOCOL)
/* Quick check to see if the peer has leases. */
if (peer_has_leases) {
-@@ -4019,6 +4052,9 @@ int find_lease (struct lease **lp,
+@@ -4058,6 +4091,9 @@ int find_lease (struct lease **lp,
#if defined (DEBUG_FIND_LEASE)
log_info ("Not returning a lease.");
#endif
return 0;
}
-diff -up dhcp-4.2.4b1/server/dhcpd.c.systemtap dhcp-4.2.4b1/server/dhcpd.c
---- dhcp-4.2.4b1/server/dhcpd.c.systemtap 2012-04-16 17:46:10.928226933 +0200
-+++ dhcp-4.2.4b1/server/dhcpd.c 2012-04-16 17:46:10.951226611 +0200
+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
@@ -58,6 +58,8 @@ static const char url [] =
# undef group
#endif /* PARANOIA */
+#include "trace.h"
+
+ #ifndef UNIT_TEST
static void usage(void);
-
- struct iaddr server_identifier;
-@@ -859,6 +861,7 @@ main(int argc, char **argv) {
+ #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);
/* Receive packets and dispatch them... */
dispatch ();
-diff -up dhcp-4.2.4b1/server/dhcpv6.c.systemtap dhcp-4.2.4b1/server/dhcpv6.c
---- dhcp-4.2.4b1/server/dhcpv6.c.systemtap 2012-04-16 17:46:10.925226975 +0200
-+++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 17:46:10.953226583 +0200
+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 @@
*/
#ifdef DHCPv6
-@@ -4198,6 +4199,8 @@ static void
+@@ -4212,6 +4213,8 @@ static void
dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) {
struct data_string client_id;
/*
* Validate our input.
*/
-@@ -4211,6 +4214,8 @@ dhcpv6_solicit(struct data_string *reply
+@@ -4225,6 +4228,8 @@ dhcpv6_solicit(struct data_string *reply
* Clean up.
*/
data_string_forget(&client_id, MDL);
}
/*
-@@ -4224,6 +4229,8 @@ dhcpv6_request(struct data_string *reply
+@@ -4238,6 +4243,8 @@ dhcpv6_request(struct data_string *reply
struct data_string client_id;
struct data_string server_id;
/*
* Validate our input.
*/
-@@ -4241,6 +4248,8 @@ dhcpv6_request(struct data_string *reply
+@@ -4255,6 +4262,8 @@ dhcpv6_request(struct data_string *reply
*/
data_string_forget(&client_id, MDL);
data_string_forget(&server_id, MDL);
}
/* Find a DHCPv6 packet's shared network from hints in the packet.
-@@ -4353,6 +4362,8 @@ dhcpv6_confirm(struct data_string *reply
+@@ -4367,6 +4376,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));
/*
* Basic client message validation.
*/
-@@ -4539,6 +4550,8 @@ exit:
+@@ -4553,6 +4564,8 @@ exit:
option_state_dereference(&cli_enc_opt_state, MDL);
if (opt_state != NULL)
option_state_dereference(&opt_state, MDL);
}
/*
-@@ -4553,6 +4566,8 @@ dhcpv6_renew(struct data_string *reply,
+@@ -4567,6 +4580,8 @@ dhcpv6_renew(struct data_string *reply,
struct data_string client_id;
struct data_string server_id;
/*
* Validate the request.
*/
-@@ -4570,6 +4585,8 @@ dhcpv6_renew(struct data_string *reply,
+@@ -4584,6 +4599,8 @@ dhcpv6_renew(struct data_string *reply,
*/
data_string_forget(&server_id, MDL);
data_string_forget(&client_id, MDL);
}
/*
-@@ -4583,6 +4600,8 @@ static void
+@@ -4597,6 +4614,8 @@ static void
dhcpv6_rebind(struct data_string *reply, struct packet *packet) {
struct data_string client_id;
if (!valid_client_msg(packet, &client_id)) {
return;
}
-@@ -4590,6 +4609,8 @@ dhcpv6_rebind(struct data_string *reply,
+@@ -4604,6 +4623,8 @@ dhcpv6_rebind(struct data_string *reply,
lease_to_client(reply, packet, &client_id, NULL);
data_string_forget(&client_id, MDL);
}
static void
-@@ -5034,6 +5055,8 @@ dhcpv6_decline(struct data_string *reply
+@@ -5048,6 +5069,8 @@ dhcpv6_decline(struct data_string *reply
struct data_string client_id;
struct data_string server_id;
/*
* Validate our input.
*/
-@@ -5054,6 +5077,8 @@ dhcpv6_decline(struct data_string *reply
+@@ -5068,6 +5091,8 @@ dhcpv6_decline(struct data_string *reply
data_string_forget(&server_id, MDL);
data_string_forget(&client_id, MDL);
}
static void
-@@ -5502,6 +5527,8 @@ dhcpv6_release(struct data_string *reply
+@@ -5516,6 +5541,8 @@ dhcpv6_release(struct data_string *reply
struct data_string client_id;
struct data_string server_id;
/*
* Validate our input.
*/
-@@ -5523,6 +5550,8 @@ dhcpv6_release(struct data_string *reply
+@@ -5537,6 +5564,8 @@ dhcpv6_release(struct data_string *reply
data_string_forget(&server_id, MDL);
data_string_forget(&client_id, MDL);
}
/*
-@@ -5535,6 +5564,8 @@ dhcpv6_information_request(struct data_s
+@@ -5549,6 +5578,8 @@ dhcpv6_information_request(struct data_s
struct data_string client_id;
struct data_string server_id;
/*
* Validate our input.
*/
-@@ -5566,6 +5597,8 @@ dhcpv6_information_request(struct data_s
+@@ -5580,6 +5611,8 @@ dhcpv6_information_request(struct data_s
data_string_forget(&client_id, MDL);
}
data_string_forget(&server_id, MDL);
}
/*
-@@ -5594,6 +5627,8 @@ dhcpv6_relay_forw(struct data_string *re
+@@ -5608,6 +5641,8 @@ dhcpv6_relay_forw(struct data_string *re
struct dhcpv6_relay_packet *reply;
int reply_ofs;
/*
* Initialize variables for early exit.
*/
-@@ -5853,6 +5888,8 @@ exit:
+@@ -5867,6 +5902,8 @@ exit:
if (enc_packet != NULL) {
packet_dereference(&enc_packet, MDL);
}
}
static void
-diff -up dhcp-4.2.4b1/server/failover.c.systemtap dhcp-4.2.4b1/server/failover.c
---- dhcp-4.2.4b1/server/failover.c.systemtap 2012-03-19 23:29:49.000000000 +0100
-+++ dhcp-4.2.4b1/server/failover.c 2012-04-16 17:46:10.955226555 +0200
+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
@@ -36,6 +36,8 @@
#include "dhcpd.h"
#include <omapip/omapip_p.h>
return leases_queued;
}
-diff -up dhcp-4.2.4b1/server/Makefile.am.systemtap dhcp-4.2.4b1/server/Makefile.am
---- dhcp-4.2.4b1/server/Makefile.am.systemtap 2012-04-16 17:46:10.914227129 +0200
-+++ dhcp-4.2.4b1/server/Makefile.am 2012-04-16 17:46:10.956226541 +0200
-@@ -4,7 +4,7 @@ dist_sysconf_DATA = dhcpd.conf
+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 \
dhcpd_CFLAGS = $(LDAP_CFLAGS)
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
-@@ -13,3 +13,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
+@@ -19,3 +19,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
EXTRA_DIST = $(man_MANS)
+
+dhcpd_LDADD += probes.o
+endif
-diff -up dhcp-4.2.4b1/server/probes.d.systemtap dhcp-4.2.4b1/server/probes.d
---- dhcp-4.2.4b1/server/probes.d.systemtap 2012-04-16 17:46:10.956226541 +0200
-+++ dhcp-4.2.4b1/server/probes.d 2012-04-16 17:46:10.956226541 +0200
+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
@@ -0,0 +1,43 @@
+provider dhcpd {
+ probe main();
+ probe failover_set_state_start(int, int) /* state, new_state */
+ probe failover_set_state_done()
+};
-diff -up dhcp-4.2.4b1/server/trace.h.systemtap dhcp-4.2.4b1/server/trace.h
---- dhcp-4.2.4b1/server/trace.h.systemtap 2012-04-16 17:46:10.956226541 +0200
-+++ dhcp-4.2.4b1/server/trace.h 2012-04-16 17:46:10.956226541 +0200
+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
+
++if ENABLE_SYSTEMTAP
++DHCPLIBS += ../probes.o
++endif
++
+ 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
@@ -0,0 +1,11 @@
+// trace.h
+
+// Wrap the probe to allow it to be removed when no systemtap available
+#define TRACE(probe)
+#endif
-diff -up dhcp-4.2.4b1/tapset/dhcpd.stp.systemtap dhcp-4.2.4b1/tapset/dhcpd.stp
---- dhcp-4.2.4b1/tapset/dhcpd.stp.systemtap 2012-04-16 17:46:10.957226527 +0200
-+++ dhcp-4.2.4b1/tapset/dhcpd.stp 2012-04-16 17:46:10.957226527 +0200
+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
@@ -0,0 +1,212 @@
+/* dhcpd tapset
+ Copyright (C) 2011, Red Hat Inc.
+{
+ probestr = sprintf("%s", $$name);
+}
-diff -up dhcp-4.2.4b1/tapset/Makefile.am.systemtap dhcp-4.2.4b1/tapset/Makefile.am
---- dhcp-4.2.4b1/tapset/Makefile.am.systemtap 2012-04-16 17:46:10.957226527 +0200
-+++ dhcp-4.2.4b1/tapset/Makefile.am 2012-04-16 17:46:10.957226527 +0200
+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
--- /dev/null
+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