[packages/dhcp] - up to 4.3.5

arekm arekm at pld-linux.org
Tue Jun 20 10:32:24 CEST 2017


commit 19507c9d5cbc62f79fda8a747377622a0579e58a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jun 20 10:32:16 2017 +0200

    - up to 4.3.5

 dhcp-NetworkManager-crash.patch      |  12 --
 dhcp-default-requested-options.patch |  26 ++--
 dhcp-dhclient-decline-backoff.patch  |  43 +++---
 dhcp-errwarn-message.patch           |  79 ++++++++---
 dhcp-ignore-client-uids.patch        | 161 ----------------------
 dhcp-manpages.patch                  |  63 ++++-----
 dhcp-options.patch                   | 254 ++++++++++++++++++-----------------
 dhcp-unicast-bootp.patch             |  36 ++---
 dhcp-xen-checksum.patch              | 249 ----------------------------------
 dhcp.spec                            |  20 +--
 10 files changed, 282 insertions(+), 661 deletions(-)
---
diff --git a/dhcp.spec b/dhcp.spec
index b10edb0..b9bdb6a 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -3,8 +3,8 @@
 %bcond_without	ldap	# without support for ldap storage
 %bcond_without	static_libs	# don't build static library
 
-%define         ver     4.2.5
-%if 1
+%define         ver     4.3.5
+%if 0
 %define         pverdot .P1
 %define         pverdir -P1
 %else
@@ -20,12 +20,12 @@ Summary(pl.UTF-8):	Serwer DHCP
 Summary(pt_BR.UTF-8):	Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:		dhcp
 Version:	%{ver}%{pverdot}
-Release:	3
+Release:	1
 Epoch:		4
 License:	MIT
 Group:		Networking/Daemons
 Source0:	ftp://ftp.isc.org/isc/dhcp/%{ver}%{pverdir}/%{name}-%{ver}%{pverdir}.tar.gz
-# Source0-md5:	f68e3c1f00a9af5742bc5e71d567cf93
+# Source0-md5:	2b5e5b2fa31c2e27e487039d86f83d3f
 Source1:	%{name}.init
 Source2:	%{name}6.init
 Source3:	%{name}-relay.init
@@ -46,11 +46,8 @@ Patch10:	%{name}-memory.patch
 Patch11:	%{name}-dhclient-decline-backoff.patch
 Patch12:	%{name}-unicast-bootp.patch
 Patch16:	%{name}-default-requested-options.patch
-Patch17:	%{name}-xen-checksum.patch
+
 Patch19:	%{name}-manpages.patch
-Patch20:	%{name}-NetworkManager-crash.patch
-# http://www.csupomona.edu/~bldewolf/dhcp-uid/
-Patch21:	%{name}-ignore-client-uids.patch
 URL:		http://www.isc.org/sw/dhcp/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -212,10 +209,8 @@ komunikacji z działającym serwerem ISC DHCP i jego kontroli.
 %patch11 -p1
 %patch12 -p1
 %patch16 -p1
-%patch17 -p1
+
 %patch19 -p1
-%patch20 -p1
-%patch21 -p1
 
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 cp -a %{SOURCE11} README.ldap
@@ -257,7 +252,7 @@ CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE=1"
 	--with-cli-pid-file=/var/run/dhclient.pid \
 	--with-relay-pid-file=/var/run/dhcrelay.pid \
 	--with%{!?with_ldap:out}-ldap
-%{__make}
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -414,7 +409,6 @@ fi
 %files devel
 %defattr(644,root,root,755)
 %{_libdir}/libdhcpctl.a
-%{_libdir}/libdst.a
 %{_libdir}/libomapi.a
 %{_includedir}/dhcpctl
 %{_includedir}/isc-dhcp
diff --git a/dhcp-NetworkManager-crash.patch b/dhcp-NetworkManager-crash.patch
deleted file mode 100644
index aecb844..0000000
--- a/dhcp-NetworkManager-crash.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- dhcp-4.0.0//client/clparse.c.nmcrash	2008-04-01 10:25:39.000000000 -1000
-+++ dhcp-4.0.0//client/clparse.c	2008-04-01 10:26:20.000000000 -1000
-@@ -227,6 +227,9 @@ int read_client_conf_file (const char *n
- 	cfile = (struct parse *)0;
- 	new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
- 
-+	if (!cfile)
-+		return ISC_R_BADPARSE;
-+
- 	do {
- 		token = peek_token (&val, (unsigned *)0, cfile);
- 		if (token == END_OF_FILE)
diff --git a/dhcp-default-requested-options.patch b/dhcp-default-requested-options.patch
index 444258f..f57fa1f 100644
--- a/dhcp-default-requested-options.patch
+++ b/dhcp-default-requested-options.patch
@@ -1,16 +1,16 @@
-diff -up dhcp-4.0.0/client/clparse.c.dho dhcp-4.0.0/client/clparse.c
---- dhcp-4.0.0/client/clparse.c.dho	2007-12-29 06:32:16.000000000 -1000
-+++ dhcp-4.0.0/client/clparse.c	2007-12-29 06:35:41.000000000 -1000
-@@ -37,7 +37,7 @@
+diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.requested	2016-04-29 12:18:50.157151352 +0200
++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:19:22.235137243 +0200
+@@ -31,7 +31,7 @@
  
  struct client_config top_level_config;
  
 -#define NUM_DEFAULT_REQUESTED_OPTS	9
-+#define NUM_DEFAULT_REQUESTED_OPTS	12
- struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
++#define NUM_DEFAULT_REQUESTED_OPTS	14
+ /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
+ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
  
- static void parse_client_default_duid(struct parse *cfile);
-@@ -107,6 +107,21 @@ isc_result_t read_client_conf ()
+@@ -116,6 +116,31 @@ isc_result_t read_client_conf ()
  	option_code_hash_lookup(&default_requested_options[8],
  				dhcpv6_universe.code_hash, &code, 0, MDL);
  
@@ -29,6 +29,16 @@ diff -up dhcp-4.0.0/client/clparse.c.dho dhcp-4.0.0/client/clparse.c
 +	option_code_hash_lookup(&default_requested_options[11],
 +				dhcp_universe.code_hash, &code, 0, MDL);
 +
++	/* 13 */
++	code = DHO_INTERFACE_MTU;
++	option_code_hash_lookup(&default_requested_options[12],
++				dhcp_universe.code_hash, &code, 0, MDL);
++
++	/* 14 */
++	code = DHO_DOMAIN_SEARCH;
++	option_code_hash_lookup(&default_requested_options[13],
++				dhcp_universe.code_hash, &code, 0, MDL);
++
  	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
  		if (default_requested_options[code] == NULL)
  			log_fatal("Unable to find option definition for "
diff --git a/dhcp-dhclient-decline-backoff.patch b/dhcp-dhclient-decline-backoff.patch
index 67729f5..645f931 100644
--- a/dhcp-dhclient-decline-backoff.patch
+++ b/dhcp-dhclient-decline-backoff.patch
@@ -1,14 +1,16 @@
---- dhcp-3.0.5/client/dhclient.c.decline	2007-03-30 15:29:58.000000000 -0400
-+++ dhcp-3.0.5/client/dhclient.c	2007-03-30 15:50:25.000000000 -0400
-@@ -934,6 +934,7 @@
+diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.backoff	2016-04-29 12:16:26.976245611 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:16:26.979245609 +0200
+@@ -1423,6 +1423,8 @@ void state_init (cpp)
  	void *cpp;
  {
  	struct client_state *client = cpp;
 +	enum dhcp_state init_state = client->state;
++	struct timeval tv;
  
  	ASSERT_STATE(state, S_INIT);
  
-@@ -946,9 +947,16 @@
+@@ -1435,9 +1437,18 @@ void state_init (cpp)
  	client -> first_sending = cur_time;
  	client -> interval = client -> config -> initial_interval;
  
@@ -23,20 +25,22 @@
 +		/* We've received an OFFER and it has been DECLINEd by dhclient-script.
 +		 * wait for a random time between 1 and backoff_cutoff seconds before
 +		 * trying again. */
-+		add_timeout(cur_time + ((1 + (random() >> 2)) %  client->config->backoff_cutoff), send_discover, client, 0, 0);
++		tv . tv_sec = cur_time + ((1 + (random() >> 2)) %  client->config->backoff_cutoff);
++		tv . tv_usec = 0;
++		add_timeout(&tv, send_discover, client, 0, 0);
 +	}
  }
  
- /* state_selecting is called when one or more DHCPOFFER packets have been
-@@ -1215,6 +1223,7 @@
- 		send_decline (client);
- 		destroy_client_lease (client -> new);
- 		client -> new = (struct client_lease *)0;
-+		client -> state = S_DECLINED;
- 		state_init (client);
- 		return;
- 	}
-@@ -3183,6 +3192,7 @@
+ /*
+@@ -1734,6 +1745,7 @@ void bind_lease (client)
+ 					 "try (declined).  Exiting.");
+ 			exit(2);
+ 		} else {
++			client -> state = S_DECLINED;
+ 			state_init(client);
+ 			return;
+ 		}
+@@ -4626,6 +4638,7 @@ void client_location_changed ()
  			      case S_INIT:
  			      case S_REBINDING:
  			      case S_STOPPED:
@@ -44,9 +48,10 @@
  				break;
  			}
  			client -> state = S_INIT;
---- dhcp-3.0.5/includes/dhcpd.h.decline	2007-03-30 15:30:14.000000000 -0400
-+++ dhcp-3.0.5/includes/dhcpd.h	2007-03-30 15:50:53.000000000 -0400
-@@ -704,7 +704,8 @@
+diff -up dhcp-4.3.4/includes/dhcpd.h.backoff dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.backoff	2016-04-29 12:16:26.980245609 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:17:30.893203533 +0200
+@@ -1171,7 +1171,8 @@ enum dhcp_state {
  	S_BOUND = 5,
  	S_RENEWING = 6,
  	S_REBINDING = 7,
@@ -55,4 +60,4 @@
 +	S_DECLINED = 9
  };
  
- /* Authentication and BOOTP policy possibilities (not all values work
+ /* Possible pending client operations. */
diff --git a/dhcp-errwarn-message.patch b/dhcp-errwarn-message.patch
index 6e076d6..f42d1e9 100644
--- a/dhcp-errwarn-message.patch
+++ b/dhcp-errwarn-message.patch
@@ -1,29 +1,64 @@
---- dhcp-3.0.5/omapip/errwarn.c.message	2007-03-29 15:03:12.000000000 -0400
-+++ dhcp-3.0.5/omapip/errwarn.c	2007-03-29 15:08:50.000000000 -0400
-@@ -80,20 +80,13 @@
+diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
+--- dhcp-4.3.5/omapip/errwarn.c.errwarn	2016-09-27 21:16:50.000000000 +0200
++++ dhcp-4.3.5/omapip/errwarn.c	2016-11-29 19:44:03.515031147 +0100
+@@ -49,6 +49,41 @@ void (*log_cleanup) (void);
+ static char mbuf [CVT_BUF_MAX + 1];
+ static char fbuf [CVT_BUF_MAX + 1];
+ 
++// get BUG_REPORT_URL from /etc/os-release
++char * bug_report_url(void) {
++    FILE * file = fopen("/etc/os-release", "r");
++    size_t len;
++    char * line = NULL;
++    char * url = NULL;
++    size_t url_len = 256;
++
++    url = (char *) malloc(url_len * sizeof(char));
++    strcpy(url, "https://bugzilla.redhat.com/");
++
++    if (!file)
++        return url;
++
++    while ((getline(&line, &len, file)) != -1) {
++        if (strstr(line, "BUG_REPORT_URL") != NULL) {
++            char * start = strchr(line, '=');
++            char * rquotes = strrchr(line, '"');
++
++            if (rquotes != NULL) {
++                *rquotes = '\0';
++                strncpy(url, start+2, url_len);
++            } else {
++                strncpy(url, start+1, url_len);
++            }
++            url[url_len-1] = '\0';
++            fclose(file);
++            return url;
++        }
++    }
++    fclose(file);
++    return url;
++}
++
++
+ /* Log an error message, then exit... */
+ 
+ void log_fatal (const char * fmt, ... )
+@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... )
+   }
  
- #if !defined (NOMINUM)
    log_error ("%s", "");
--  log_error ("If you did not get this software from ftp.isc.org, please");
--  log_error ("get the latest from ftp.isc.org and install that before");
--  log_error ("requesting help.");
+-  log_error ("If you think you have received this message due to a bug rather");
+-  log_error ("than a configuration issue please read the section on submitting");
+-  log_error ("bugs on either our web page at www.isc.org or in the README file");
+-  log_error ("before submitting a bug.  These pages explain the proper");
+-  log_error ("process and the information we find helpful for debugging..");
 +  log_error ("This version of ISC DHCP is based on the release available");
-+  log_error ("on ftp.isc.org.  Features have been added and other changes");
++  log_error ("on ftp.isc.org. Features have been added and other changes");
 +  log_error ("have been made to the base software release in order to make");
 +  log_error ("it work better with this distribution.");
-   log_error ("%s", "");
--  log_error ("If you did get this software from ftp.isc.org and have not");
--  log_error ("yet read the README, please read it before requesting help.");
--  log_error ("If you intend to request help from the dhcp-server at isc.org");
--  log_error ("mailing list, please read the section on the README about");
--  log_error ("submitting bug reports and requests for help.");
--  log_error ("%s", "");
--  log_error ("Please do not under any circumstances send requests for");
--  log_error ("help directly to the authors of this software - please");
--  log_error ("send them to the appropriate mailing list as described in");
--  log_error ("the README file.");
-+  log_error ("Please report for this software via the PLD/Linux Bugs site:");
-+  log_error ("    http://bugs.pld-linux.org/");
++  log_error ("%s", "");
++  log_error ("Please report issues with this software via: ");
++  log_error ("%s", bug_report_url());
    log_error ("%s", "");
    log_error ("exiting.");
- #endif
+ 
diff --git a/dhcp-ignore-client-uids.patch b/dhcp-ignore-client-uids.patch
deleted file mode 100644
index 77ee1d9..0000000
--- a/dhcp-ignore-client-uids.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/common/conflex.c dhcp-4.2.5-P1/common/conflex.c
---- dhcp-4.2.5-P1.orig/common/conflex.c	2014-01-03 20:59:11.105475789 +0100
-+++ dhcp-4.2.5-P1/common/conflex.c	2014-01-03 20:59:51.775476160 +0100
-@@ -1067,6 +1067,8 @@
- 			return IF;
- 		if (!strcasecmp (atom + 1, "s"))
- 			return IS;
-+		if (!strcasecmp (atom + 1, "gnore-client-uids"))
-+			return IGNORE_CLIENT_UIDS;
- 		if (!strcasecmp (atom + 1, "gnore"))
- 			return IGNORE;
- 		break;
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/includes/dhcpd.h dhcp-4.2.5-P1/includes/dhcpd.h
---- dhcp-4.2.5-P1.orig/includes/dhcpd.h	2014-01-03 20:59:11.115475790 +0100
-+++ dhcp-4.2.5-P1/includes/dhcpd.h	2014-01-03 20:59:51.775476160 +0100
-@@ -763,6 +763,8 @@
- #endif
- #endif
- 
-+#define SV_IGNORE_CLIENT_UIDS		78
-+
- #if !defined (DEFAULT_DEFAULT_LEASE_TIME)
- # define DEFAULT_DEFAULT_LEASE_TIME 43200
- #endif
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/includes/dhctoken.h dhcp-4.2.5-P1/includes/dhctoken.h
---- dhcp-4.2.5-P1.orig/includes/dhctoken.h	2014-01-03 20:59:11.105475789 +0100
-+++ dhcp-4.2.5-P1/includes/dhctoken.h	2014-01-03 21:00:27.588809818 +0100
-@@ -365,7 +365,8 @@
- 	PRIMARY6 = 666,
- 	SECONDARY6 = 667,
- 	TOKEN_INFINIBAND = 668,
--	BOOTP_BROADCAST_ALWAYS = 669
-+	BOOTP_BROADCAST_ALWAYS = 669,
-+	IGNORE_CLIENT_UIDS = 670
- };
- 
- #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/server/confpars.c dhcp-4.2.5-P1/server/confpars.c
---- dhcp-4.2.5-P1.orig/server/confpars.c	2013-03-04 19:35:09.000000000 +0100
-+++ dhcp-4.2.5-P1/server/confpars.c	2014-01-03 20:59:51.775476160 +0100
-@@ -328,6 +328,7 @@
- 	       | ONE_LEASE_PER_CLIENT boolean
- 	       | GET_LEASE_HOSTNAMES boolean
- 	       | USE_HOST_DECL_NAME boolean
-+	       | IGNORE_CLIENT_UIDS boolean
- 	       | NEXT_SERVER ip-addr-or-hostname SEMI
- 	       | option_parameter
- 	       | SERVER-IDENTIFIER ip-addr-or-hostname SEMI
-@@ -4104,6 +4105,10 @@
- 		code = SV_LEASEQUERY;
- 		break;
- 
-+	      case IGNORE_CLIENT_UIDS:
-+		code = SV_IGNORE_CLIENT_UIDS;
-+		break;
-+
- 	      default:
- 		parse_warn (cfile, "expecting allow/deny key");
- 		skip_to_semi (cfile);
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/server/dhcp.c dhcp-4.2.5-P1/server/dhcp.c
---- dhcp-4.2.5-P1.orig/server/dhcp.c	2014-01-03 20:59:11.112142457 +0100
-+++ dhcp-4.2.5-P1/server/dhcp.c	2014-01-03 20:59:51.778809492 +0100
-@@ -2337,31 +2337,42 @@
- 	/* Update Client Last Transaction Time. */
- 	lt->cltt = cur_time;
- 
--	/* Record the uid, if given... */
--	oc = lookup_option (&dhcp_universe, packet -> options,
--			    DHO_DHCP_CLIENT_IDENTIFIER);
--	if (oc &&
--	    evaluate_option_cache (&d1, packet, lease,
-+	/* Only record the uid if we're not ignoring them */
-+	oc = lookup_option (&server_universe, state -> options,
-+			    SV_IGNORE_CLIENT_UIDS);
-+	if (!oc ||
-+	    !evaluate_boolean_option_cache (&ignorep, packet, lease,
- 				   (struct client_state *)0,
- 				   packet -> options, state -> options,
- 				   &lease -> scope, oc, MDL)) {
--		if (d1.len <= sizeof lt -> uid_buf) {
--			memcpy (lt -> uid_buf, d1.data, d1.len);
--			lt -> uid = lt -> uid_buf;
--			lt -> uid_max = sizeof lt -> uid_buf;
--			lt -> uid_len = d1.len;
--		} else {
--			unsigned char *tuid;
--			lt -> uid_max = d1.len;
--			lt -> uid_len = d1.len;
--			tuid = (unsigned char *)dmalloc (lt -> uid_max, MDL);
--			/* XXX inelegant */
--			if (!tuid)
--				log_fatal ("no memory for large uid.");
--			memcpy (tuid, d1.data, lt -> uid_len);
--			lt -> uid = tuid;
-+		/* Record the uid, if given... */
-+		oc = lookup_option (&dhcp_universe, packet -> options,
-+				    DHO_DHCP_CLIENT_IDENTIFIER);
-+		if (oc &&
-+		    evaluate_option_cache (&d1, packet, lease,
-+					   (struct client_state *)0,
-+					   packet -> options,
-+					   state -> options,
-+					   &lease -> scope, oc, MDL)) {
-+			if (d1.len <= sizeof lt -> uid_buf) {
-+				memcpy (lt -> uid_buf, d1.data, d1.len);
-+				lt -> uid = lt -> uid_buf;
-+				lt -> uid_max = sizeof lt -> uid_buf;
-+				lt -> uid_len = d1.len;
-+			} else {
-+				unsigned char *tuid;
-+				lt -> uid_max = d1.len;
-+				lt -> uid_len = d1.len;
-+				tuid = (unsigned char *)
-+					dmalloc (lt -> uid_max, MDL);
-+				/* XXX inelegant */
-+				if (!tuid)
-+					log_fatal ("no memory for large uid.");
-+				memcpy (tuid, d1.data, lt -> uid_len);
-+				lt -> uid = tuid;
-+			}
-+			data_string_forget (&d1, MDL);
- 		}
--		data_string_forget (&d1, MDL);
- 	}
- 
- 	if (host) {
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/server/dhcpd.conf.5 dhcp-4.2.5-P1/server/dhcpd.conf.5
---- dhcp-4.2.5-P1.orig/server/dhcpd.conf.5	2014-01-03 20:59:11.118809123 +0100
-+++ dhcp-4.2.5-P1/server/dhcpd.conf.5	2014-01-03 20:59:51.778809492 +0100
-@@ -2338,6 +2338,20 @@
- must be a constant value.
- .RE
- .PP
-+The 
-+.I ignore-client-uids
-+statement
-+.RS 0.25i
-+.PP
-+.B ignore-client-uids \fIflag\fB;\fR
-+.PP
-+If the \fIignore-client-uids\fR statement is present and has a value of
-+\fItrue\fR or \fIon\fR, clients will be handled as though they provided no UID
-+and the actual provided UID will not be recorded.  If this statement is not
-+present or has a value of \fIfalse\fR or \fIoff\fR, then client UIDs will be
-+parsed and used as normal.
-+.RE
-+.PP
- The
- .I infinite-is-reserved
- statement
-diff -dur -x '*~' -x '*.orig' dhcp-4.2.5-P1.orig/server/stables.c dhcp-4.2.5-P1/server/stables.c
---- dhcp-4.2.5-P1.orig/server/stables.c	2013-03-05 19:26:51.000000000 +0100
-+++ dhcp-4.2.5-P1/server/stables.c	2014-01-03 20:59:51.778809492 +0100
-@@ -266,6 +266,7 @@
- 	{ "ldap-tls-randfile", "t",		&server_universe,  77, 1 },
- #endif /* LDAP_USE_SSL */
- #endif /* LDAP_CONFIGURATION */
-+	{ "ignore-client-uids", "f",		&server_universe,  78, 1 },
- 	{ NULL, NULL, NULL, 0, 0 }
- };
- 
diff --git a/dhcp-manpages.patch b/dhcp-manpages.patch
index eb0dc8d..24d6972 100644
--- a/dhcp-manpages.patch
+++ b/dhcp-manpages.patch
@@ -1,7 +1,7 @@
-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
+diff -up dhcp-4.3.5b1/client/dhclient.conf.5.man dhcp-4.3.5b1/client/dhclient.conf.5
+--- dhcp-4.3.5b1/client/dhclient.conf.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/client/dhclient.conf.5	2016-09-12 17:09:23.243313514 +0200
+@@ -228,7 +228,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,
@@ -11,7 +11,7 @@ diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.co
  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.
-@@ -688,6 +689,17 @@ know the DHCP service(s) anycast MAC add
+@@ -736,6 +737,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
@@ -27,21 +27,12 @@ diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.co
 +on IBM s390 Linux guests.
 +.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
-@@ -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,
--	    domain-name, domain-name-servers, host-name;
-+	    domain-search, domain-name, domain-name-servers, host-name;
-     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
+ The following configuration file was used on a laptop running NetBSD
+ 1.3, though the domains have been modified.
+diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-4.3.5b1/client/dhclient-script.8
+--- dhcp-4.3.5b1/client/dhclient-script.8.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/client/dhclient-script.8	2016-09-12 17:08:09.516254385 +0200
+@@ -45,7 +45,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
@@ -50,7 +41,7 @@ diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-
  .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
+@@ -89,6 +89,26 @@ present.   The
  .B ETCDIR/dhclient-exit-hooks
  script can modify the valid of exit_status to change the exit status
  of dhclient-script.
@@ -77,15 +68,15 @@ diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-
  .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
-@@ -914,6 +914,21 @@ classless IP routing - it does not inclu
+diff -up dhcp-4.3.5b1/common/dhcp-options.5.man dhcp-4.3.5b1/common/dhcp-options.5
+--- dhcp-4.3.5b1/common/dhcp-options.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/common/dhcp-options.5	2016-09-12 17:08:09.517254386 +0200
+@@ -1013,6 +1013,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.
 +.PP
-+NOTE to @PRODUCTNAME@ dhclient users:
++NOTE to Fedora dhclient users:
 +.br
 +dhclient-script interprets trailing 0 octets of the target as indicating
 +the subnet class of the route, so for the following static-routes value:
@@ -102,10 +93,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.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
+--- dhcp-4.3.5b1/server/dhcpd.conf.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/dhcpd.conf.5	2016-09-12 17:10:11.205351980 +0200
+@@ -528,6 +528,9 @@ pool {
  };
  .fi
  .PP
@@ -115,19 +106,19 @@ 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:
+@@ -542,9 +545,9 @@ primary server might look like this:
  failover peer "foo" {
    primary;
-   address anthrax.rc.vix.com;
+   address anthrax.rc.example.com;
 -  port 519;
 +  port 647;
-   peer address trantor.rc.vix.com;
+   peer address trantor.rc.example.com;
 -  peer port 520;
 +  peer port 847;
    max-response-delay 60;
    max-unacked-updates 10;
    mclt 3600;
-@@ -1318,7 +1321,7 @@ the zone containing PTR records - for IS
+@@ -1246,7 +1249,7 @@ the zone containing PTR records - for IS
  .PP
  .nf
  key DHCP_UPDATER {
@@ -136,7 +127,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:
+@@ -1269,7 +1272,7 @@ dhcpd.conf file:
  .PP
  .nf
  key DHCP_UPDATER {
@@ -145,7 +136,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
+@@ -2742,7 +2745,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
diff --git a/dhcp-options.patch b/dhcp-options.patch
index 40c3271..8f0dfe9 100644
--- a/dhcp-options.patch
+++ b/dhcp-options.patch
@@ -1,14 +1,48 @@
-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.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:06:13.485470579 +0200
+@@ -189,6 +189,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)
+@@ -394,7 +395,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;
+@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip,
+ 		parse_lease_id_format(cfile);
+ 		break;
+ 
++	      case BOOTP_BROADCAST_ALWAYS:
++		token = next_token(&val, (unsigned*)0, cfile);
++		config -> bootp_broadcast_always = 1;
++		parse_semi (cfile);
++		return;
++
+ 
+ 	      default:
+ 		lose = 0;
+diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
+--- dhcp-4.3.4/client/dhclient.8.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/dhclient.8	2016-04-29 11:59:50.446590077 +0200
+@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr
  .B -w
  ]
  [
 +.B -B
 +]
 +[
-+.B -I
++.B -C
 +.I dhcp-client-identifier
 +]
 +[
@@ -24,18 +58,18 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +.I vendor-class-identifier
 +]
 +[
-+.B -R
++.B --request-options
 +.I request-option-list
 +]
 +[
-+.B -timeout
++.B --timeout
 +.I timeout
 +]
 +[
  .B -v
  ]
  [
-@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc
+@@ -289,6 +316,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.
@@ -46,7 +80,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +broadcast replies.
 +
 +.TP
-+.BI \-I\ <dhcp-client-identifier>
++.BI \-C\ <dhcp-client-identifier>
 +Specify the dhcp-client-identifier option to send to the DHCP server.
 +
 +.TP
@@ -73,7 +107,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +Specify the vendor-class-identifier option to send to the DHCP server.
 +
 +.TP
-+.BI \-R\ <option>[,<option>...]
++.BI \--request-options\ <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
@@ -87,16 +121,16 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +    nis-domain, nis-servers, ntp-servers, interface-mtu
 +
 +.TP
-+.B -R
++.B --request-options
 +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
++.B --request-options
 +parameter.
 +
 +.TP
-+.BI \-timeout\ <timeout>
++.BI \--timeout\ <timeout>
 +Specify the time after which
 +.B dhclient
 +will decide that no DHCP servers can be contacted when no responses have been
@@ -105,45 +139,11 @@ 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
-@@ -39,6 +39,12 @@
- #include <limits.h>
+diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:12:14.182364093 +0200
+@@ -40,6 +40,12 @@
+ #include <isc/file.h>
  #include <dns/result.h>
  
 +/*
@@ -155,20 +155,34 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  TIME default_lease_time = 43200; /* 12 hours... */
  TIME max_lease_time = 86400; /* 24 hours... */
  
-@@ -87,6 +93,9 @@ int wanted_ia_na = -1;		/* the absolute
- int wanted_ia_ta = 0;
- int wanted_ia_pd = 0;
- char *mockup_relay = NULL;
+@@ -100,6 +106,10 @@ char *mockup_relay = NULL;
+ 
+ char *progname = NULL;
+ 
 +int bootp_broadcast_always = 0;
 +
-+extern u_int32_t default_requested_options[];
++extern struct option *default_requested_options[];
++
+ void run_stateless(int exit_mode, u_int16_t port);
+ 
+ static isc_result_t write_duid(struct data_string *duid);
+@@ -177,7 +187,11 @@ usage(const char *sfmt, const char *sarg
+ 		  "                [-s server-addr] [-cf config-file]\n"
+ 		  "                [-df duid-file] [-lf lease-file]\n"
+ 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
+-		  "                [-sf script-file] [interface]*",
++		  "                [-sf script-file] [interface]*\n"
++		  "                [-C <dhcp-client-identifier>] [-B]\n"
++		  "                [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n"
++		  "                [-V <vendor-class-identifier>]\n"
++		  "                [--request-options <request option list>]",
+ 		  isc_file_basename(progname));
+ }
  
- void run_stateless(int exit_mode);
+@@ -214,6 +228,16 @@ main(int argc, char **argv) {
+ 	progname = argv[0];
+ #endif
  
-@@ -123,6 +132,15 @@ main(int argc, char **argv) {
- 	int local_family_set = 0;
- #endif /* DHCPv6 */
- 	char *s;
 +	char *dhcp_client_identifier_arg = NULL;
 +	char *dhcp_host_name_arg = NULL;
 +	char *dhcp_fqdn_arg = NULL;
@@ -178,21 +192,22 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +	int timeout_arg = 0;
 +	char *arg_conf = NULL;
 +	int arg_conf_len = 0;
- 
++
  	/* Initialize client globals. */
  	memset(&default_duid, 0, sizeof(default_duid));
-@@ -310,6 +328,88 @@ main(int argc, char **argv) {
- 		} else if (!strcmp(argv[i], "--version")) {
- 			log_info("isc-dhclient-%s", PACKAGE_VERSION);
+ 
+@@ -431,6 +455,88 @@ main(int argc, char **argv) {
+ 					 strlen(PACKAGE_VERSION)));
+ 			IGNORE_RET(write(STDERR_FILENO, "\n", 1));
  			exit(0);
-+		} else if (!strcmp(argv[i], "-I")) {
++		} else if (!strcmp(argv[i], "-C")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
 +			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
-+				log_error("-I option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
++				log_error("-C option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
 +				exit(1);
 +			}
 +
@@ -201,7 +216,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			bootp_broadcast_always = 1;
 +		} else if (!strcmp(argv[i], "-H")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -218,7 +233,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			dhcp_host_name_arg = argv[i];
 +		} else if (!strcmp(argv[i], "-F")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -238,9 +253,9 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +
 +			dhcp_fqdn_arg = argv[i];
-+		} else if (!strcmp(argv[i], "-timeout")) {
++		} else if (!strcmp(argv[i], "--timeout")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -250,7 +265,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +		} else if (!strcmp(argv[i], "-V")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -260,17 +275,17 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +
 +			dhcp_vendor_class_identifier_arg = argv[i];
-+		} else if (!strcmp(argv[i], "-R")) {
++		} else if (!strcmp(argv[i], "--request-options")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
 +			dhclient_request_options = argv[i];
  		} else if (argv[i][0] == '-') {
- 		    usage();
+ 			usage("Unknown command: %s", argv[i]);
  		} else if (interfaces_requested < 0) {
-@@ -484,6 +584,156 @@ main(int argc, char **argv) {
+@@ -630,6 +736,156 @@ main(int argc, char **argv) {
  	/* Parse the dhclient.conf file. */
  	read_client_conf();
  
@@ -279,7 +294,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
 +
 +		if ((arg_conf == 0) || (arg_conf_len <= 0))
-+			log_fatal("Unable to send -I option dhcp-client-identifier");
++			log_fatal("Unable to send -C option dhcp-client-identifier");
 +	}
 +
 +	if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
@@ -323,14 +338,14 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			arg_conf_len = asprintf(&arg_conf,  "timeout %d;", timeout_arg);
 +
 +			if ((arg_conf == 0) || (arg_conf_len <= 0))
-+				log_fatal("Unable to process -timeout timeout argument");
++				log_fatal("Unable to process --timeout timeout argument");
 +		} else {
 +			char *last_arg_conf = arg_conf;
 +			arg_conf = NULL;
 +			arg_conf_len = asprintf(&arg_conf, "%s\ntimeout %d;", last_arg_conf, timeout_arg);
 +
 +			if ((arg_conf == 0) || (arg_conf_len == 0))
-+				log_fatal("Unable to process -timeout timeout argument");
++				log_fatal("Unable to process --timeout timeout argument");
 +
 +			free(last_arg_conf);
 +		}
@@ -359,14 +374,14 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			arg_conf_len = asprintf(&arg_conf,  "request %s;", dhclient_request_options);
 +
 +			if ((arg_conf == 0) || (arg_conf_len <= 0))
-+				log_fatal("Unable to parse -R <request options list> argument");
++				log_fatal("Unable to parse --request-options <request options list> argument");
 +		} else {
 +			char *last_arg_conf = arg_conf;
 +			arg_conf = NULL;
 +			arg_conf_len = asprintf(&arg_conf, "%s\nrequest %s;", last_arg_conf, dhclient_request_options);
 +
 +			if ((arg_conf == 0)  || (arg_conf_len <= 0))
-+				log_fatal("Unable to parse -R <request options list> argument");
++				log_fatal("Unable to parse --request-options <request options list> argument");
 +
 +			free(last_arg_conf);
 +		}
@@ -376,7 +391,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		if (arg_conf_len == 0)
 +			if ((arg_conf_len = strlen(arg_conf)) == 0)
 +				/* huh ? cannot happen ! */
-+				log_fatal("Unable to process -I/-H/-F/-timeout/-V/-R configuration arguments");
++				log_fatal("Unable to process -C/-H/-F/--timeout/-V/--request-options configuration arguments");
 +
 +		/* parse the extra dhclient.conf configuration arguments
 +		 * into top level config: */
@@ -384,10 +399,10 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		const char *val = NULL;
 +		int token;
 +
-+		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
++		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/--timeout/-V/--request-options configuration arguments", 0);
 +
 +		if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
-+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
 +		/* more detailed parse failures will be logged */
 +
 +		do {
@@ -399,7 +414,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		} while (1);
 +
 +		if (cfile -> warnings_occurred)
-+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
 +		end_parse(&cfile);
 +
 +		if (timeout_arg) {
@@ -427,18 +442,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()
- 		  "                [-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)
+@@ -3067,7 +3323,8 @@ void make_discover (client, lease)
  	client -> packet.xid = random ();
  	client -> packet.secs = 0; /* filled in by send_discover. */
  
@@ -448,7 +452,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)
+@@ -3152,7 +3409,9 @@ void make_request (client, lease)
  	} else {
  		memset (&client -> packet.ciaddr, 0,
  			sizeof client -> packet.ciaddr);
@@ -459,7 +463,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)
+@@ -3215,7 +3474,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,41 +473,41 @@ 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)
- 			return BALANCE;
- 		if (!strcasecmp (atom + 1, "ound"))
- 			return BOUND;
+diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
+--- dhcp-4.3.4/common/conflex.c.options	2016-04-29 11:59:50.448590077 +0200
++++ dhcp-4.3.4/common/conflex.c	2016-04-29 12:13:23.637342420 +0200
+@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
+ 		if (!strcasecmp(atom+1, "ig-endian")) {
+ 			return TOKEN_BIG_ENDIAN;
+ 		}
 +		if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
 +			return BOOTP_BROADCAST_ALWAYS;
  		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
-@@ -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. */
+diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.options	2016-04-29 11:59:50.448590077 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:14:05.361329401 +0200
+@@ -1246,6 +1246,9 @@ struct client_config {
+ 
+ 	int lease_id_format;		/* format for IDs in lease file,
+ 					   TOKEN_OCTAL or TOKEN_HEX */
 +
 +	int bootp_broadcast_always;	/* If nonzero, always set the BOOTP_BROADCAST
 +					   flag in requests */
  };
  
  /* 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.4/includes/dhctoken.h.options dhcp-4.3.4/includes/dhctoken.h
+--- dhcp-4.3.4/includes/dhctoken.h.options	2016-04-29 11:59:50.449590076 +0200
++++ dhcp-4.3.4/includes/dhctoken.h	2016-04-29 12:15:03.073300846 +0200
+@@ -373,7 +373,8 @@ enum dhcp_token {
+ 	TOKEN_BIG_ENDIAN = 675,
+ 	LEASE_ID_FORMAT = 676,
+ 	TOKEN_HEX = 677,
+-	TOKEN_OCTAL = 678
++	TOKEN_OCTAL = 678,
++	BOOTP_BROADCAST_ALWAYS = 679
  };
  
  #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
diff --git a/dhcp-unicast-bootp.patch b/dhcp-unicast-bootp.patch
index dada189..abf89f2 100644
--- a/dhcp-unicast-bootp.patch
+++ b/dhcp-unicast-bootp.patch
@@ -1,6 +1,7 @@
---- dhcp-3.0.5/server/bootp.c.unicast	2005-05-18 15:54:17.000000000 -0400
-+++ dhcp-3.0.5/server/bootp.c	2007-03-30 16:16:00.000000000 -0400
-@@ -62,6 +62,7 @@
+diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
+--- dhcp-4.3.4/server/bootp.c.unicast	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/server/bootp.c	2016-05-02 15:09:40.023243008 +0200
+@@ -52,6 +52,7 @@ void bootp (packet)
  	char msgbuf [1024];
  	int ignorep;
  	int peer_has_leases = 0;
@@ -8,7 +9,7 @@
  
  	if (packet -> raw -> op != BOOTREQUEST)
  		return;
-@@ -77,7 +78,7 @@
+@@ -67,7 +68,7 @@ void bootp (packet)
  		 ? inet_ntoa (packet -> raw -> giaddr)
  		 : packet -> interface -> name);
  
@@ -17,31 +18,34 @@
  		log_info ("%s: network unknown", msgbuf);
  		return;
  	}
-@@ -357,6 +358,13 @@
- 					      from, &to, &hto);
+@@ -428,6 +429,15 @@ void bootp (packet)
+ 
  			goto out;
  		}
 +	} else if (norelay == 2) {
 +		to.sin_addr = raw.ciaddr;
 +		to.sin_port = remote_port;
 +		if (fallback_interface) {
-+			result = send_packet (fallback_interface, (struct packet *)0, &raw, outgoing.packet_length, from, &to, &hto);
++			result = send_packet (fallback_interface, NULL, &raw,
++					      outgoing.packet_length, from,
++					      &to, &hto);
 +			goto out;
 +		}
  
  	/* If it comes from a client that already knows its address
  	   and is not requesting a broadcast response, and we can
---- dhcp-3.0.5/server/dhcp.c.unicast	2007-03-30 16:13:36.000000000 -0400
-+++ dhcp-3.0.5/server/dhcp.c	2007-03-30 16:19:35.000000000 -0400
-@@ -3817,6 +3817,7 @@
+diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
+--- dhcp-4.3.4/server/dhcp.c.unicast	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/server/dhcp.c	2016-05-02 15:10:13.255267511 +0200
+@@ -5132,6 +5132,7 @@ int locate_network (packet)
  	struct data_string data;
  	struct subnet *subnet = (struct subnet *)0;
  	struct option_cache *oc;
 +	int norelay = 0;
  
- 	/* See if there's a subnet selection option. */
- 	oc = lookup_option (&dhcp_universe, packet -> options,
-@@ -3826,12 +3827,24 @@
+ #if defined(DHCPv6) && defined(DHCP4o6)
+ 	if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
+@@ -5153,12 +5154,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) {
@@ -70,8 +74,8 @@
 -		return 0;
  	}
  
- 	/* If there's an SSO, and it's valid, use it to figure out the
-@@ -3853,7 +3866,10 @@
+ 	/* If there's an option indicating link connection, and it's valid,
+@@ -5185,7 +5198,10 @@ int locate_network (packet)
  		data_string_forget (&data, MDL);
  	} else {
  		ia.len = 4;
@@ -83,7 +87,7 @@
  	}
  
  	/* If we know the subnet on which the IP address lives, use it. */
-@@ -3861,7 +3877,10 @@
+@@ -5193,7 +5209,10 @@ int locate_network (packet)
  		shared_network_reference (&packet -> shared_network,
  					  subnet -> shared_network, MDL);
  		subnet_dereference (&subnet, MDL);
diff --git a/dhcp-xen-checksum.patch b/dhcp-xen-checksum.patch
deleted file mode 100644
index 038d346..0000000
--- a/dhcp-xen-checksum.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-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, 
- 		offset = decode_udp_ip_header (interface,
- 					       interface -> rbuf,
- 					       interface -> rbuf_offset,
--  					       from, hdr.bh_caplen, &paylen);
-+  					       from, hdr.bh_caplen, &paylen, 0);
- 
- 		/* 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, 
- 	length -= offset;
- #endif
- 	offset = decode_udp_ip_header (interface, dbuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/*
- 	 * 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 @@
- #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>
- 
- #include <asm/types.h>
- #include <linux/filter.h>
- #include <linux/if_ether.h>
-+#include <linux/if_packet.h>
- #include <netinet/in_systm.h>
--#include <net/if_packet.h>
- #include "includes/netinet/ip.h"
- #include "includes/netinet/udp.h"
- #include "includes/netinet/if_ether.h"
- #include <net/if.h>
- 
-+#ifndef PACKET_AUXDATA
-+#define PACKET_AUXDATA 8
-+
-+struct tpacket_auxdata
-+{
-+	__u32		tp_status;
-+	__u32		tp_len;
-+	__u32		tp_snaplen;
-+	__u16		tp_mac;
-+	__u16		tp_net;
-+};
-+#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)
- 	struct interface_info *info;
- {
- 	int sock;
--	struct sockaddr sa;
-+	union {
-+		struct sockaddr_ll ll;
-+		struct sockaddr common;
-+	} sa;
-+	struct ifreq ifr;
- 
- 	/* Make an LPF socket. */
--	if ((sock = socket(PF_PACKET, SOCK_PACKET,
-+	if ((sock = socket(PF_PACKET, SOCK_RAW,
- 			   htons((short)ETH_P_ALL))) < 0) {
- 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
- 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-@@ -85,11 +103,17 @@ int if_register_lpf (info)
- 		log_fatal ("Open a socket for LPF: %m");
- 	}
- 
-+	memset (&ifr, 0, sizeof ifr);
-+	strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof ifr.ifr_name);
-+	ifr.ifr_name[IFNAMSIZ-1] = '\0';
-+	if (ioctl (sock, SIOCGIFINDEX, &ifr))
-+		log_fatal ("Failed to get interface index: %m");
-+
- 	/* Bind to the interface name */
- 	memset (&sa, 0, sizeof sa);
--	sa.sa_family = AF_PACKET;
--	strncpy (sa.sa_data, (const char *)info -> ifp, sizeof sa.sa_data);
--	if (bind (sock, &sa, sizeof sa)) {
-+	sa.ll.sll_family = AF_PACKET;
-+	sa.ll.sll_ifindex = ifr.ifr_ifindex;
-+	if (bind (sock, &sa.common, sizeof sa)) {
- 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
- 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
- 		    errno == EAFNOSUPPORT || errno == EINVAL) {
-@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
- void if_register_receive (info)
- 	struct interface_info *info;
- {
-+	int val;
-+
- 	/* Open a LPF device and hang it on this interface... */
- 	info -> rfdesc = if_register_lpf (info);
- 
-+	val = 1;
-+	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
-+			sizeof val) < 0) {
-+		if (errno != ENOPROTOOPT)
-+			log_fatal ("Failed to set auxiliary packet data: %m");
-+	}
-+
- #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, 
- 	double hh [16];
- 	double ih [1536 / sizeof (double)];
- 	unsigned char *buf = (unsigned char *)ih;
--	struct sockaddr_pkt sa;
- 	int result;
- 	int fudge;
- 
-@@ -316,17 +348,7 @@ ssize_t send_packet (interface, packet, 
- 				(unsigned char *)raw, len);
- 	memcpy (buf + ibufp, raw, len);
- 
--	/* For some reason, SOCK_PACKET sockets can't be connected,
--	   so we have to do a sentdo every time. */
--	memset (&sa, 0, sizeof sa);
--	sa.spkt_family = AF_PACKET;
--	strncpy ((char *)sa.spkt_device,
--		 (const char *)interface -> ifp, sizeof sa.spkt_device);
--	sa.spkt_protocol = htons(ETH_P_IP);
--
--	result = sendto (interface -> wfdesc,
--			 buf + fudge, ibufp + len - fudge, 0, 
--			 (const struct sockaddr *)&sa, sizeof sa);
-+	result = write (interface -> wfdesc, buf + fudge, ibufp + len - fudge);
- 	if (result < 0)
- 		log_error ("send_packet: %m");
- 	return result;
-@@ -343,14 +365,35 @@ ssize_t receive_packet (interface, buf, 
- {
- 	int length = 0;
- 	int offset = 0;
-+	int nocsum = 0;
- 	unsigned char ibuf [1536];
- 	unsigned bufix = 0;
- 	unsigned paylen;
-+	unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
-+	struct iovec iov = {
-+		.iov_base = ibuf,
-+		.iov_len = sizeof ibuf,
-+	};
-+	struct msghdr msg = {
-+		.msg_iov = &iov,
-+		.msg_iovlen = 1,
-+		.msg_control = cmsgbuf,
-+		.msg_controllen = sizeof(cmsgbuf),
-+	};
-+	struct cmsghdr *cmsg;
- 
--	length = read (interface -> rfdesc, ibuf, sizeof ibuf);
-+	length = recvmsg (interface -> rfdesc, &msg, 0);
- 	if (length <= 0)
- 		return length;
- 
-+	for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-+		if (cmsg->cmsg_level == SOL_PACKET &&
-+		    cmsg->cmsg_type == PACKET_AUXDATA) {
-+			struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
-+			nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
-+		}
-+	}
-+
- 	bufix = 0;
- 	/* Decode the physical header... */
- 	offset = decode_hw_header (interface, ibuf, bufix, hfrom);
-@@ -367,7 +410,7 @@ ssize_t receive_packet (interface, buf, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix, from,
--				       (unsigned)length, &paylen);
-+				       (unsigned)length, &paylen, nocsum);
- 
- 	/* 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, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/* 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
- decode_udp_ip_header(struct interface_info *interface,
- 		     unsigned char *buf, unsigned bufix,
- 		     struct sockaddr_in *from, unsigned buflen,
--		     unsigned *rbuflen)
-+		     unsigned *rbuflen, int nocsum)
- {
-   unsigned char *data;
-   struct ip ip;
-@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_in
- 					   8, IPPROTO_UDP + ulen))));
- 
-   udp_packets_seen++;
--  if (usum && usum != sum) {
-+  if (!nocsum && usum && usum != sum) {
- 	  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, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/* 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
- 			  unsigned, struct hardware *);
- ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
- 			      unsigned, struct sockaddr_in *,
--			      unsigned, unsigned *);
-+			      unsigned, unsigned *, int);
- 
- /* ethernet.c */
- void assemble_ethernet_header (struct interface_info *, unsigned char *,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dhcp.git/commitdiff/19507c9d5cbc62f79fda8a747377622a0579e58a



More information about the pld-cvs-commit mailing list