Blame SOURCES/dhcp-4.2.4-dhclient-options.patch

45d60a
diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
45d60a
--- dhcp-4.2.1b1/client/dhclient.8.man	2010-07-14 22:09:34.000000000 +0200
45d60a
+++ dhcp-4.2.1b1/client/dhclient.8	2011-01-27 18:19:07.000000000 +0100
45d60a
@@ -115,6 +115,33 @@ dhclient - Dynamic Host Configuration Pr
45d60a
 .B -w
45d60a
 ]
45d60a
 [
45d60a
+.B -B
45d60a
+]
45d60a
+[
45d60a
+.B -I
45d60a
+.I dhcp-client-identifier
45d60a
+]
45d60a
+[
45d60a
+.B -H
45d60a
+.I host-name
45d60a
+]
45d60a
+[
45d60a
+.B -F
45d60a
+.I fqdn.fqdn
45d60a
+]
45d60a
+[
45d60a
+.B -V
45d60a
+.I vendor-class-identifier
45d60a
+]
45d60a
+[
45d60a
+.B -R
45d60a
+.I request-option-list
45d60a
+]
45d60a
+[
45d60a
+.B -timeout
45d60a
+.I timeout
45d60a
+]
45d60a
+[
45d60a
 .B -v
45d60a
 ]
45d60a
 [
45d60a
@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc
45d60a
 program can then be used to notify the client when a network interface
45d60a
 has been added or removed, so that the client can attempt to configure an IP
45d60a
 address on that interface.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-B
45d60a
+Set the BOOTP broadcast flag in request packets so servers will always
45d60a
+broadcast replies.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-I\ <dhcp-client-identifier>
45d60a
+Specify the dhcp-client-identifier option to send to the DHCP server.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-H\ <host-name>
45d60a
+Specify the host-name option to send to the DHCP server.  The host-name
45d60a
+string only contains the client's hostname prefix, to which the server will
45d60a
+append the ddns-domainname or domain-name options, if any, to derive the
45d60a
+fully qualified domain name of the client.  The
45d60a
+.B -H
45d60a
+option cannot be used with the
45d60a
+.B -F
45d60a
+option.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-F\ <fqdn.fqdn>
45d60a
+Specify the fqdn.fqdn option to send to the DHCP server.  This option cannot
45d60a
+be used with the
45d60a
+.B -H
45d60a
+option.  The fqdn.fqdn option must specify the complete domain name of the
45d60a
+client host, which the server may use for dynamic DNS updates.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-V\ <vendor-class-identifier>
45d60a
+Specify the vendor-class-identifier option to send to the DHCP server.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-R\ <option>[,<option>...]
45d60a
+Specify the list of options the client is to request from the server.  The
45d60a
+option list must be a single string consisting of option names separated
45d60a
+by at least one command and optional space characters.  The default option
45d60a
+list is:
45d60a
+
45d60a
+.BR
45d60a
+    subnet-mask, broadcast-address, time-offset, routers,
45d60a
+.BR
45d60a
+    domain-search, domain-name, domain-name-servers, host-name, 
45d60a
+.BR
45d60a
+    nis-domain, nis-servers, ntp-servers, interface-mtu
45d60a
+
45d60a
+.TP
45d60a
+.B -R
45d60a
+option does not append options to the default request, it overrides the
45d60a
+default request list.  Keep this in mind if you want to request an
45d60a
+additional option besides the default request list.  You will have to
45d60a
+specify all option names for the
45d60a
+.B -R
45d60a
+parameter.
45d60a
+
45d60a
+.TP
45d60a
+.BI \-timeout\ <timeout>
45d60a
+Specify the time after which
45d60a
+.B dhclient
45d60a
+will decide that no DHCP servers can be contacted when no responses have been
45d60a
+received.
45d60a
+
45d60a
 .TP
45d60a
 .BI \-n
45d60a
 Do not configure any interfaces.  This is most likely to be useful in
45d60a
diff -up dhcp-4.2.4-P2/client/clparse.c.options dhcp-4.2.4-P2/client/clparse.c
45d60a
--- dhcp-4.2.4-P2/client/clparse.c.options	2012-08-24 21:11:21.000000000 +0200
45d60a
+++ dhcp-4.2.4-P2/client/clparse.c	2012-09-26 10:34:27.140049896 +0200
45d60a
@@ -154,6 +154,7 @@ isc_result_t read_client_conf ()
45d60a
 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
45d60a
 	 */
45d60a
 	top_level_config.requested_lease = 7200;
45d60a
+	top_level_config.bootp_broadcast_always = 0;
45d60a
 
45d60a
 	group_allocate (&top_level_config.on_receipt, MDL);
45d60a
 	if (!top_level_config.on_receipt)
45d60a
@@ -320,7 +321,8 @@ void read_client_leases ()
45d60a
 	interface-declaration |
45d60a
 	LEASE client-lease-statement |
45d60a
 	ALIAS client-lease-statement |
45d60a
-	KEY key-definition */
45d60a
+	KEY key-definition |
45d60a
+	BOOTP_BROADCAST_ALWAYS */
45d60a
 
45d60a
 void parse_client_statement (cfile, ip, config)
45d60a
 	struct parse *cfile;
45d60a
@@ -739,6 +741,12 @@ void parse_client_statement (cfile, ip,
45d60a
 		parse_reject_statement (cfile, config);
45d60a
 		return;
45d60a
 
45d60a
+	      case BOOTP_BROADCAST_ALWAYS:
45d60a
+		token = next_token(&val, (unsigned*)0, cfile);
45d60a
+		config -> bootp_broadcast_always = 1;
45d60a
+		parse_semi (cfile);
45d60a
+		return;
45d60a
+
45d60a
 	      default:
45d60a
 		lose = 0;
45d60a
 		stmt = (struct executable_statement *)0;
45d60a
diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
45d60a
--- dhcp-4.2.4-P2/client/dhclient.c.options	2012-08-28 04:13:03.000000000 +0200
45d60a
+++ dhcp-4.2.4-P2/client/dhclient.c	2012-09-26 10:36:10.396967531 +0200
45d60a
@@ -39,6 +39,12 @@
45d60a
 #include <limits.h>
45d60a
 #include <dns/result.h>
45d60a
 
45d60a
+/*
45d60a
+ * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
45d60a
+ * that when building ISC code.
45d60a
+ */
45d60a
+extern int asprintf(char **strp, const char *fmt, ...);
45d60a
+
45d60a
 TIME default_lease_time = 43200; /* 12 hours... */
45d60a
 TIME max_lease_time = 86400; /* 24 hours... */
45d60a
 
45d60a
@@ -87,6 +93,9 @@ int wanted_ia_na = -1;		/* the absolute
45d60a
 int wanted_ia_ta = 0;
45d60a
 int wanted_ia_pd = 0;
45d60a
 char *mockup_relay = NULL;
45d60a
+int bootp_broadcast_always = 0;
45d60a
+
45d60a
+extern struct option *default_requested_options[];
45d60a
 
45d60a
 void run_stateless(int exit_mode);
45d60a
 
45d60a
@@ -123,6 +132,15 @@ main(int argc, char **argv) {
45d60a
 	int local_family_set = 0;
45d60a
 #endif /* DHCPv6 */
45d60a
 	char *s;
45d60a
+	char *dhcp_client_identifier_arg = NULL;
45d60a
+	char *dhcp_host_name_arg = NULL;
45d60a
+	char *dhcp_fqdn_arg = NULL;
45d60a
+	char *dhcp_vendor_class_identifier_arg = NULL;
45d60a
+	char *dhclient_request_options = NULL;
45d60a
+
45d60a
+	int timeout_arg = 0;
45d60a
+	char *arg_conf = NULL;
45d60a
+	int arg_conf_len = 0;
45d60a
 
45d60a
 	/* Initialize client globals. */
45d60a
 	memset(&default_duid, 0, sizeof(default_duid));
45d60a
@@ -310,6 +328,88 @@ main(int argc, char **argv) {
45d60a
 		} else if (!strcmp(argv[i], "--version")) {
45d60a
 			log_info("isc-dhclient-%s", PACKAGE_VERSION);
45d60a
 			exit(0);
45d60a
+		} else if (!strcmp(argv[i], "-I")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
45d60a
+				log_error("-I option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			dhcp_client_identifier_arg = argv[i];
45d60a
+		} else if (!strcmp(argv[i], "-B")) {
45d60a
+			bootp_broadcast_always = 1;
45d60a
+		} else if (!strcmp(argv[i], "-H")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
45d60a
+				log_error("-H option host-name string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (dhcp_host_name_arg != NULL) {
45d60a
+				log_error("The -H <host-name> and -F <fqdn> arguments are mutually exclusive");
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			dhcp_host_name_arg = argv[i];
45d60a
+		} else if (!strcmp(argv[i], "-F")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
45d60a
+				log_error("-F option fqdn.fqdn string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (dhcp_fqdn_arg != NULL) {
45d60a
+				log_error("Only one -F <fqdn> argument can be specified");
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (dhcp_host_name_arg != NULL) {
45d60a
+				log_error("The -F <fqdn> and -H <host-name> arguments are mutually exclusive");
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			dhcp_fqdn_arg = argv[i];
45d60a
+		} else if (!strcmp(argv[i], "-timeout")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if ((timeout_arg = atoi(argv[i])) <= 0) {
45d60a
+				log_error("timeout option must be > 0 - bad value: %s",argv[i]);
45d60a
+				exit(1);
45d60a
+			}
45d60a
+		} else if (!strcmp(argv[i], "-V")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
45d60a
+				log_error("-V option vendor-class-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			dhcp_vendor_class_identifier_arg = argv[i];
45d60a
+		} else if (!strcmp(argv[i], "-R")) {
45d60a
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
45d60a
+				usage();
45d60a
+				exit(1);
45d60a
+			}
45d60a
+
45d60a
+			dhclient_request_options = argv[i];
45d60a
 		} else if (argv[i][0] == '-') {
45d60a
 		    usage();
45d60a
 		} else if (interfaces_requested < 0) {
45d60a
@@ -484,6 +584,156 @@ main(int argc, char **argv) {
45d60a
 	/* Parse the dhclient.conf file. */
45d60a
 	read_client_conf();
45d60a
 
45d60a
+	/* Parse any extra command line configuration arguments: */
45d60a
+	if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
45d60a
+		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
45d60a
+
45d60a
+		if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+			log_fatal("Unable to send -I option dhcp-client-identifier");
45d60a
+	}
45d60a
+
45d60a
+	if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
45d60a
+		if (arg_conf == 0) {
45d60a
+			arg_conf_len = asprintf(&arg_conf, "send host-name \"%s\";", dhcp_host_name_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -H option host-name");
45d60a
+		} else {
45d60a
+			char *last_arg_conf = arg_conf;
45d60a
+			arg_conf = NULL;
45d60a
+			arg_conf_len = asprintf(&arg_conf, "%s\nsend host-name \"%s\";", last_arg_conf, dhcp_host_name_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -H option host-name");
45d60a
+
45d60a
+			free(last_arg_conf);
45d60a
+		}
45d60a
+	}
45d60a
+
45d60a
+	if ((dhcp_fqdn_arg != NULL) && (*dhcp_fqdn_arg != '\0')) {
45d60a
+		if (arg_conf == 0) {
45d60a
+			arg_conf_len = asprintf(&arg_conf,  "send fqdn.fqdn \"%s\";", dhcp_fqdn_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -F option fqdn.fqdn");
45d60a
+		} else {
45d60a
+			char *last_arg_conf = arg_conf;
45d60a
+			arg_conf = NULL;
45d60a
+			arg_conf_len = asprintf(&arg_conf, "%s\nsend fqdn.fqdn \"%s\";", last_arg_conf, dhcp_fqdn_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0)  || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -F option fqdn.fqdn");
45d60a
+
45d60a
+			free(last_arg_conf);
45d60a
+		}
45d60a
+	}
45d60a
+
45d60a
+	if (timeout_arg) {
45d60a
+		if (arg_conf == 0) {
45d60a
+			arg_conf_len = asprintf(&arg_conf,  "timeout %d;", timeout_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to process -timeout timeout argument");
45d60a
+		} else {
45d60a
+			char *last_arg_conf = arg_conf;
45d60a
+			arg_conf = NULL;
45d60a
+			arg_conf_len = asprintf(&arg_conf, "%s\ntimeout %d;", last_arg_conf, timeout_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len == 0))
45d60a
+				log_fatal("Unable to process -timeout timeout argument");
45d60a
+
45d60a
+			free(last_arg_conf);
45d60a
+		}
45d60a
+	}
45d60a
+
45d60a
+	if ((dhcp_vendor_class_identifier_arg != NULL) && (*dhcp_vendor_class_identifier_arg != '\0')) {
45d60a
+		if (arg_conf == 0) {
45d60a
+			arg_conf_len = asprintf(&arg_conf,  "send vendor-class-identifier \"%s\";", dhcp_vendor_class_identifier_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -V option vendor-class-identifier");
45d60a
+		} else {
45d60a
+			char *last_arg_conf = arg_conf;
45d60a
+			arg_conf = NULL;
45d60a
+			arg_conf_len = asprintf(&arg_conf, "%s\nsend vendor-class-identifier \"%s\";", last_arg_conf, dhcp_vendor_class_identifier_arg);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to send -V option vendor-class-identifier");
45d60a
+
45d60a
+			free(last_arg_conf);
45d60a
+		}
45d60a
+	}
45d60a
+
45d60a
+	if (dhclient_request_options != NULL) {
45d60a
+		if (arg_conf == 0) {
45d60a
+			arg_conf_len = asprintf(&arg_conf,  "request %s;", dhclient_request_options);
45d60a
+
45d60a
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to parse -R <request options list> argument");
45d60a
+		} else {
45d60a
+			char *last_arg_conf = arg_conf;
45d60a
+			arg_conf = NULL;
45d60a
+			arg_conf_len = asprintf(&arg_conf, "%s\nrequest %s;", last_arg_conf, dhclient_request_options);
45d60a
+
45d60a
+			if ((arg_conf == 0)  || (arg_conf_len <= 0))
45d60a
+				log_fatal("Unable to parse -R <request options list> argument");
45d60a
+
45d60a
+			free(last_arg_conf);
45d60a
+		}
45d60a
+	}
45d60a
+
45d60a
+	if (arg_conf) {
45d60a
+		if (arg_conf_len == 0)
45d60a
+			if ((arg_conf_len = strlen(arg_conf)) == 0)
45d60a
+				/* huh ? cannot happen ! */
45d60a
+				log_fatal("Unable to process -I/-H/-F/-timeout/-V/-R configuration arguments");
45d60a
+
45d60a
+		/* parse the extra dhclient.conf configuration arguments
45d60a
+		 * into top level config: */
45d60a
+		struct parse *cfile = (struct parse *)0;
45d60a
+		const char *val = NULL;
45d60a
+		int token;
45d60a
+
45d60a
+		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
45d60a
+
45d60a
+		if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
45d60a
+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
45d60a
+		/* more detailed parse failures will be logged */
45d60a
+
45d60a
+		do {
45d60a
+			token = peek_token(&val, (unsigned *)0, cfile);
45d60a
+			if (token == END_OF_FILE)
45d60a
+				break;
45d60a
+
45d60a
+			parse_client_statement(cfile, (struct interface_info *)0, &top_level_config);
45d60a
+		} while (1);
45d60a
+
45d60a
+		if (cfile -> warnings_occurred)
45d60a
+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
45d60a
+		end_parse(&cfile);
45d60a
+
45d60a
+		if (timeout_arg) {
45d60a
+			/* we just set the toplevel timeout, but per-client
45d60a
+			 * timeouts may still be at defaults.
45d60a
+			 */
45d60a
+			for (ip=interfaces; ip; ip = ip->next) {
45d60a
+				if (ip->client->config->timeout == 60)
45d60a
+					ip->client->config->timeout = timeout_arg;
45d60a
+			}
45d60a
+		}
45d60a
+
45d60a
+		if ((dhclient_request_options != 0) && (top_level_config.requested_options != default_requested_options)) {
45d60a
+			for (ip=interfaces; ip; ip = ip->next) {
45d60a
+				if (ip->client->config->requested_options == default_requested_options)
45d60a
+					ip->client->config->requested_options = top_level_config.requested_options;
45d60a
+			}
45d60a
+		}
45d60a
+
45d60a
+		free(arg_conf);
45d60a
+		arg_conf = NULL;
45d60a
+		arg_conf_len = 0;
45d60a
+	}
45d60a
+
45d60a
 	/* Parse the lease database. */
45d60a
 	read_client_leases();
45d60a
 
45d60a
@@ -715,6 +965,10 @@ static void usage()
45d60a
 		  "                [-s server-addr] [-cf config-file] "
45d60a
 		  "[-lf lease-file]\n"
45d60a
 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
45d60a
+		  "                [-I <dhcp-client-identifier>] [-B]\n"
45d60a
+		  "                [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
45d60a
+		  "                [-V <vendor-class-identifier>]\n"
45d60a
+		  "                [-R <request option list>]\n"
45d60a
 		  "                [-sf script-file] [interface]");
45d60a
 }
45d60a
 
45d60a
@@ -2421,7 +2675,8 @@ void make_discover (client, lease)
45d60a
 	client -> packet.xid = random ();
45d60a
 	client -> packet.secs = 0; /* filled in by send_discover. */
45d60a
 
45d60a
-	if (can_receive_unicast_unconfigured (client -> interface))
45d60a
+	if ((!(bootp_broadcast_always || client->config->bootp_broadcast_always))
45d60a
+	    && can_receive_unicast_unconfigured(client->interface))
45d60a
 		client -> packet.flags = 0;
45d60a
 	else
45d60a
 		client -> packet.flags = htons (BOOTP_BROADCAST);
45d60a
@@ -2505,7 +2760,9 @@ void make_request (client, lease)
45d60a
 	} else {
45d60a
 		memset (&client -> packet.ciaddr, 0,
45d60a
 			sizeof client -> packet.ciaddr);
45d60a
-		if (can_receive_unicast_unconfigured (client -> interface))
45d60a
+		if ((!(bootp_broadcast_always ||
45d60a
+		    client ->config->bootp_broadcast_always)) &&
45d60a
+		    can_receive_unicast_unconfigured (client -> interface))
45d60a
 			client -> packet.flags = 0;
45d60a
 		else
45d60a
 			client -> packet.flags = htons (BOOTP_BROADCAST);
45d60a
@@ -2567,7 +2824,8 @@ void make_decline (client, lease)
45d60a
 	client -> packet.hops = 0;
45d60a
 	client -> packet.xid = client -> xid;
45d60a
 	client -> packet.secs = 0; /* Filled in by send_request. */
45d60a
-	if (can_receive_unicast_unconfigured (client -> interface))
45d60a
+	if ((!(bootp_broadcast_always || client->config-> bootp_broadcast_always))
45d60a
+	    && can_receive_unicast_unconfigured (client->interface))
45d60a
 		client -> packet.flags = 0;
45d60a
 	else
45d60a
 		client -> packet.flags = htons (BOOTP_BROADCAST);
45d60a
diff -up dhcp-4.2.4-P2/common/conflex.c.options dhcp-4.2.4-P2/common/conflex.c
45d60a
--- dhcp-4.2.4-P2/common/conflex.c.options	2012-08-28 04:13:03.000000000 +0200
45d60a
+++ dhcp-4.2.4-P2/common/conflex.c	2012-09-26 10:34:27.142049876 +0200
45d60a
@@ -808,6 +808,8 @@ intern(char *atom, enum dhcp_token dfv)
45d60a
 			return BALANCE;
45d60a
 		if (!strcasecmp (atom + 1, "ound"))
45d60a
 			return BOUND;
45d60a
+		if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
45d60a
+			return BOOTP_BROADCAST_ALWAYS;
45d60a
 		break;
45d60a
 	      case 'c':
45d60a
 		if (!strcasecmp(atom + 1, "ase"))
45d60a
diff -up dhcp-4.2.4-P2/includes/dhcpd.h.options dhcp-4.2.4-P2/includes/dhcpd.h
45d60a
--- dhcp-4.2.4-P2/includes/dhcpd.h.options	2012-08-28 04:13:22.000000000 +0200
45d60a
+++ dhcp-4.2.4-P2/includes/dhcpd.h	2012-09-26 10:34:27.143049865 +0200
45d60a
@@ -1153,6 +1153,9 @@ struct client_config {
45d60a
 	int do_forward_update;		/* If nonzero, and if we have the
45d60a
 					   information we need, update the
45d60a
 					   A record for the address we get. */
45d60a
+
45d60a
+	int bootp_broadcast_always;	/* If nonzero, always set the BOOTP_BROADCAST
45d60a
+					   flag in requests */
45d60a
 };
45d60a
 
45d60a
 /* Per-interface state used in the dhcp client... */
45d60a
diff -up dhcp-4.2.4-P2/includes/dhctoken.h.options dhcp-4.2.4-P2/includes/dhctoken.h
45d60a
--- dhcp-4.2.4-P2/includes/dhctoken.h.options	2012-08-28 04:13:03.000000000 +0200
45d60a
+++ dhcp-4.2.4-P2/includes/dhctoken.h	2012-09-26 10:34:27.144049854 +0200
45d60a
@@ -364,7 +364,8 @@ enum dhcp_token {
45d60a
 	GETHOSTBYNAME = 665,
45d60a
 	PRIMARY6 = 666,
45d60a
 	SECONDARY6 = 667,
45d60a
-	TOKEN_INFINIBAND = 668
45d60a
+	TOKEN_INFINIBAND = 668,
45d60a
+	BOOTP_BROADCAST_ALWAYS = 669
45d60a
 };
45d60a
 
45d60a
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\