- 4.2.0: includes ldap-for-dhcp

This commit is contained in:
Jiří Popelka 2010-07-21 16:56:35 +00:00
parent 94f2da27ed
commit 5a3797ea32
34 changed files with 435 additions and 589 deletions

View File

@ -1,2 +1,3 @@
ldap-for-dhcp-4.1.1-2.tar.gz
dhcp-4.1.1-P1.tar.gz
dhcp-4.2.0.tar.gz

View File

@ -1,14 +0,0 @@
diff -up dhcp-4.1.1/common/dispatch.c.dracut dhcp-4.1.1/common/dispatch.c
--- dhcp-4.1.1/common/dispatch.c.dracut 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/dispatch.c 2010-01-20 17:37:18.000000000 +0100
@@ -104,6 +104,10 @@ void add_timeout (when, where, what, ref
{
struct timeout *t, *q;
+ if (when == NULL) {
+ return;
+ }
+
/* See if this timeout supersedes an existing timeout. */
t = (struct timeout *)0;
for (q = timeouts; q; q = q -> next) {

View File

@ -1,70 +0,0 @@
diff -up dhcp-4.1.1/client/clparse.c.anycast dhcp-4.1.1/client/clparse.c
--- dhcp-4.1.1/client/clparse.c.anycast 2010-01-20 17:19:37.000000000 +0100
+++ dhcp-4.1.1/client/clparse.c 2010-01-20 17:19:37.000000000 +0100
@@ -571,6 +571,17 @@ void parse_client_statement (cfile, ip,
}
return;
+ case ANYCAST_MAC:
+ token = next_token (&val, (unsigned *)0, cfile);
+ if (ip) {
+ parse_hardware_param (cfile, &ip -> anycast_mac_addr);
+ } else {
+ parse_warn (cfile, "anycast mac address parameter %s",
+ "not allowed here.");
+ skip_to_semi (cfile);
+ }
+ return;
+
case REQUEST:
token = next_token (&val, (unsigned *)0, cfile);
if (config -> requested_options == default_requested_options)
diff -up dhcp-4.1.1/common/conflex.c.anycast dhcp-4.1.1/common/conflex.c
--- dhcp-4.1.1/common/conflex.c.anycast 2010-01-20 17:19:37.000000000 +0100
+++ dhcp-4.1.1/common/conflex.c 2010-01-20 17:19:37.000000000 +0100
@@ -729,6 +729,8 @@ intern(char *atom, enum dhcp_token dfv)
}
if (!strcasecmp (atom + 1, "nd"))
return AND;
+ if (!strcasecmp (atom + 1, "nycast-mac"))
+ return ANYCAST_MAC;
if (!strcasecmp (atom + 1, "ppend"))
return APPEND;
if (!strcasecmp (atom + 1, "llow"))
diff -up dhcp-4.1.1/common/lpf.c.anycast dhcp-4.1.1/common/lpf.c
--- dhcp-4.1.1/common/lpf.c.anycast 2010-01-20 17:19:37.000000000 +0100
+++ dhcp-4.1.1/common/lpf.c 2010-01-20 17:19:37.000000000 +0100
@@ -334,6 +334,9 @@ ssize_t send_packet (interface, packet,
return send_fallback (interface, packet, raw,
len, from, to, hto);
+ if (hto == NULL && interface->anycast_mac_addr.hlen)
+ hto = &interface->anycast_mac_addr;
+
/* Assemble the headers... */
assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
fudge = hbufp % 4; /* IP header must be word-aligned. */
diff -up dhcp-4.1.1/includes/dhcpd.h.anycast dhcp-4.1.1/includes/dhcpd.h
--- dhcp-4.1.1/includes/dhcpd.h.anycast 2010-01-20 17:19:37.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-01-20 17:19:37.000000000 +0100
@@ -1217,6 +1217,7 @@ struct interface_info {
int dlpi_sap_length;
struct hardware dlpi_broadcast_addr;
# endif /* DLPI_SEND || DLPI_RECEIVE */
+ struct hardware anycast_mac_addr;
};
struct hardware_link {
diff -up dhcp-4.1.1/includes/dhctoken.h.anycast dhcp-4.1.1/includes/dhctoken.h
--- dhcp-4.1.1/includes/dhctoken.h.anycast 2010-01-20 17:19:37.000000000 +0100
+++ dhcp-4.1.1/includes/dhctoken.h 2010-01-20 17:19:37.000000000 +0100
@@ -354,7 +354,8 @@ enum dhcp_token {
PREFIX6 = 657,
FIXED_PREFIX6 = 658,
BOOTP_BROADCAST_ALWAYS = 659,
- CONFLICT_DONE = 660
+ CONFLICT_DONE = 660,
+ ANYCAST_MAC = 661
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \

View File

@ -1,23 +0,0 @@
diff -up dhcp-4.1.1/server/confpars.c.failover-ports dhcp-4.1.1/server/confpars.c
--- dhcp-4.1.1/server/confpars.c.failover-ports 2010-01-20 17:16:18.000000000 +0100
+++ dhcp-4.1.1/server/confpars.c 2010-01-20 17:16:18.000000000 +0100
@@ -1156,10 +1156,17 @@ void parse_failover_peer (cfile, group,
parse_warn (cfile, "peer address may not be omitted");
/* XXX - when/if we get a port number assigned, just set as default */
+ /* See Red Hat Bugzilla 167292:
+ * we do now: dhcp-failover 647/tcp
+ * dhcp-failover 647/udp
+ * dhcp-failover 847/tcp
+ * dhcp-failover 847/udp
+ * IANA registration by Bernard Volz <volz@cisco.com>
+ */
if (!peer -> me.port)
- parse_warn (cfile, "local port may not be omitted");
+ peer -> me.port = 647;
if (!peer -> partner.port)
- parse_warn (cfile, "peer port may not be omitted");
+ peer -> partner.port = 847;
if (peer -> i_am == primary) {
if (!peer -> hba) {

View File

@ -1,12 +0,0 @@
diff -up dhcp-4.1.1/client/dhclient.c.logpid dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.logpid 2010-01-20 17:39:50.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:39:50.000000000 +0100
@@ -150,7 +150,7 @@ main(int argc, char **argv) {
else if (fd != -1)
close(fd);
- openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
+ openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
#if !(defined(DEBUG) || defined(__CYGWIN32__))
setlogmask(LOG_UPTO(LOG_INFO));

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/common/parse.c.64-bit_lease_parse dhcp-4.1.1/common/parse.c
--- dhcp-4.1.1/common/parse.c.64-bit_lease_parse 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/common/parse.c 2010-01-20 17:38:10.000000000 +0100
diff -up dhcp-4.2.0/common/parse.c.64-bit_lease_parse dhcp-4.2.0/common/parse.c
--- dhcp-4.2.0/common/parse.c.64-bit_lease_parse 2009-10-28 05:12:29.000000000 +0100
+++ dhcp-4.2.0/common/parse.c 2010-07-21 16:11:36.000000000 +0200
@@ -905,8 +905,8 @@ TIME
parse_date_core(cfile)
struct parse *cfile;

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/clparse.c.cloexec dhcp-4.1.1/client/clparse.c
--- dhcp-4.1.1/client/clparse.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/client/clparse.c 2010-01-20 17:21:53.000000000 +0100
@@ -226,7 +226,7 @@ int read_client_conf_file (const char *n
diff -up dhcp-4.2.0/client/clparse.c.cloexec dhcp-4.2.0/client/clparse.c
--- dhcp-4.2.0/client/clparse.c.cloexec 2010-07-21 13:55:42.000000000 +0200
+++ dhcp-4.2.0/client/clparse.c 2010-07-21 14:31:13.000000000 +0200
@@ -211,7 +211,7 @@ int read_client_conf_file (const char *n
int token;
isc_result_t status;
@ -10,7 +10,7 @@ diff -up dhcp-4.1.1/client/clparse.c.cloexec dhcp-4.1.1/client/clparse.c
return uerr2isc (errno);
cfile = NULL;
@@ -263,7 +263,7 @@ void read_client_leases ()
@@ -248,7 +248,7 @@ void read_client_leases ()
/* Open the lease file. If we can't open it, just return -
we can safely trust the server to remember our state. */
@ -19,9 +19,9 @@ diff -up dhcp-4.1.1/client/clparse.c.cloexec dhcp-4.1.1/client/clparse.c
return;
cfile = NULL;
diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/client/dhclient.c.cloexec dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.cloexec 2010-07-21 13:55:42.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 14:33:44.000000000 +0200
@@ -137,11 +137,11 @@ main(int argc, char **argv) {
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
2 (stderr) are open. To do this, we assume that when we
@ -37,7 +37,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -467,7 +467,7 @@ main(int argc, char **argv) {
@@ -488,7 +488,7 @@ main(int argc, char **argv) {
int e;
oldpid = 0;
@ -46,7 +46,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
@@ -509,7 +509,7 @@ main(int argc, char **argv) {
@@ -530,7 +530,7 @@ main(int argc, char **argv) {
strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
@ -55,7 +55,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
@@ -534,7 +534,7 @@ main(int argc, char **argv) {
@@ -555,7 +555,7 @@ main(int argc, char **argv) {
int dhc_running = 0;
char procfn[256] = "";
@ -64,7 +64,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
snprintf(procfn,256,"/proc/%u",dhcpid);
dhc_running = (access(procfn, F_OK) == 0);
@@ -2910,7 +2910,7 @@ void rewrite_client_leases ()
@@ -2931,7 +2931,7 @@ void rewrite_client_leases ()
if (leaseFile != NULL)
fclose (leaseFile);
@ -73,8 +73,8 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return;
@@ -3014,7 +3014,7 @@ write_duid(struct data_string *duid)
return ISC_R_INVALIDARG;
@@ -3035,7 +3035,7 @@ write_duid(struct data_string *duid)
return DHCP_R_INVALIDARG;
if (leaseFile == NULL) { /* XXX? */
- leaseFile = fopen(path_dhclient_db, "w");
@ -82,7 +82,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if (leaseFile == NULL) {
log_error("can't create %s: %m", path_dhclient_db);
return ISC_R_IOERROR;
@@ -3194,7 +3194,7 @@ int write_client_lease (client, lease, r
@@ -3215,7 +3215,7 @@ int write_client_lease (client, lease, r
return 1;
if (leaseFile == NULL) { /* XXX */
@ -91,7 +91,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return 0;
@@ -3647,9 +3647,9 @@ void go_daemon ()
@@ -3668,9 +3668,9 @@ void go_daemon ()
close(2);
/* Reopen them on /dev/null. */
@ -104,7 +104,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
write_client_pid_file ();
@@ -3661,14 +3661,14 @@ void write_client_pid_file ()
@@ -3682,14 +3682,14 @@ void write_client_pid_file ()
FILE *pf;
int pfdesc;
@ -121,9 +121,9 @@ diff -up dhcp-4.1.1/client/dhclient.c.cloexec dhcp-4.1.1/client/dhclient.c
if (!pf)
log_error ("Can't fdopen %s: %m", path_dhclient_pid);
else {
diff -up dhcp-4.1.1/common/bpf.c.cloexec dhcp-4.1.1/common/bpf.c
--- dhcp-4.1.1/common/bpf.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/common/bpf.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/common/bpf.c.cloexec dhcp-4.2.0/common/bpf.c
--- dhcp-4.2.0/common/bpf.c.cloexec 2009-11-20 02:48:59.000000000 +0100
+++ dhcp-4.2.0/common/bpf.c 2010-07-21 14:31:13.000000000 +0200
@@ -94,7 +94,7 @@ int if_register_bpf (info)
for (b = 0; 1; b++) {
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
@ -133,9 +133,9 @@ diff -up dhcp-4.1.1/common/bpf.c.cloexec dhcp-4.1.1/common/bpf.c
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff -up dhcp-4.1.1/common/discover.c.cloexec dhcp-4.1.1/common/discover.c
--- dhcp-4.1.1/common/discover.c.cloexec 2009-09-29 21:44:49.000000000 +0200
+++ dhcp-4.1.1/common/discover.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/common/discover.c.cloexec dhcp-4.2.0/common/discover.c
--- dhcp-4.2.0/common/discover.c.cloexec 2009-10-28 05:12:29.000000000 +0100
+++ dhcp-4.2.0/common/discover.c 2010-07-21 14:31:13.000000000 +0200
@@ -409,7 +409,7 @@ begin_iface_scan(struct iface_conf_list
int len;
int i;
@ -154,10 +154,10 @@ diff -up dhcp-4.1.1/common/discover.c.cloexec dhcp-4.1.1/common/discover.c
if (ifaces->fp6 == NULL) {
log_error("Error opening '/proc/net/if_inet6' to "
"list IPv6 interfaces; %m");
diff -up dhcp-4.1.1/common/dlpi.c.cloexec dhcp-4.1.1/common/dlpi.c
--- dhcp-4.1.1/common/dlpi.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/common/dlpi.c 2010-01-20 17:21:53.000000000 +0100
@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
diff -up dhcp-4.2.0/common/dlpi.c.cloexec dhcp-4.2.0/common/dlpi.c
--- dhcp-4.2.0/common/dlpi.c.cloexec 2009-11-20 02:49:00.000000000 +0100
+++ dhcp-4.2.0/common/dlpi.c 2010-07-21 14:31:13.000000000 +0200
@@ -807,7 +807,7 @@ dlpiopen(const char *ifname) {
}
*dp = '\0';
@ -166,9 +166,9 @@ diff -up dhcp-4.1.1/common/dlpi.c.cloexec dhcp-4.1.1/common/dlpi.c
}
/*
diff -up dhcp-4.1.1/common/nit.c.cloexec dhcp-4.1.1/common/nit.c
--- dhcp-4.1.1/common/nit.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/common/nit.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/common/nit.c.cloexec dhcp-4.2.0/common/nit.c
--- dhcp-4.2.0/common/nit.c.cloexec 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/nit.c 2010-07-21 14:31:13.000000000 +0200
@@ -81,7 +81,7 @@ int if_register_nit (info)
struct strioctl sio;
@ -178,9 +178,9 @@ diff -up dhcp-4.1.1/common/nit.c.cloexec dhcp-4.1.1/common/nit.c
if (sock < 0)
log_fatal ("Can't open NIT device for %s: %m", info -> name);
diff -up dhcp-4.1.1/common/resolv.c.cloexec dhcp-4.1.1/common/resolv.c
--- dhcp-4.1.1/common/resolv.c.cloexec 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/resolv.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/common/resolv.c.cloexec dhcp-4.2.0/common/resolv.c
--- dhcp-4.2.0/common/resolv.c.cloexec 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/resolv.c 2010-07-21 14:31:13.000000000 +0200
@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
struct domain_search_list *dp, *dl, *nd;
isc_result_t status;
@ -190,9 +190,9 @@ diff -up dhcp-4.1.1/common/resolv.c.cloexec dhcp-4.1.1/common/resolv.c
log_error ("Can't open %s: %m", path_resolv_conf);
return;
}
diff -up dhcp-4.1.1/common/upf.c.cloexec dhcp-4.1.1/common/upf.c
--- dhcp-4.1.1/common/upf.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/common/upf.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/common/upf.c.cloexec dhcp-4.2.0/common/upf.c
--- dhcp-4.2.0/common/upf.c.cloexec 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/upf.c 2010-07-21 14:31:13.000000000 +0200
@@ -77,7 +77,7 @@ int if_register_upf (info)
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
sprintf(filename, "/dev/pf/pfilt%d", b);
@ -202,10 +202,10 @@ diff -up dhcp-4.1.1/common/upf.c.cloexec dhcp-4.1.1/common/upf.c
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff -up dhcp-4.1.1/dst/dst_api.c.cloexec dhcp-4.1.1/dst/dst_api.c
--- dhcp-4.1.1/dst/dst_api.c.cloexec 2009-01-22 03:07:42.000000000 +0100
+++ dhcp-4.1.1/dst/dst_api.c 2010-01-20 17:21:53.000000000 +0100
@@ -436,7 +436,7 @@ dst_s_write_private_key(const DST_KEY *k
diff -up dhcp-4.2.0/dst/dst_api.c.cloexec dhcp-4.2.0/dst/dst_api.c
--- dhcp-4.2.0/dst/dst_api.c.cloexec 2009-10-29 01:46:48.000000000 +0100
+++ dhcp-4.2.0/dst/dst_api.c 2010-07-21 14:31:13.000000000 +0200
@@ -437,7 +437,7 @@ dst_s_write_private_key(const DST_KEY *k
PRIVATE_KEY, PATH_MAX);
/* Do not overwrite an existing file */
@ -214,7 +214,7 @@ diff -up dhcp-4.1.1/dst/dst_api.c.cloexec dhcp-4.1.1/dst/dst_api.c
int nn;
if ((nn = fwrite(encoded_block, 1, len, fp)) != len) {
EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n",
@@ -493,7 +493,7 @@ dst_s_read_public_key(const char *in_nam
@@ -494,7 +494,7 @@ dst_s_read_public_key(const char *in_nam
* flags, proto, alg stored as decimal (or hex numbers FIXME).
* (FIXME: handle parentheses for line continuation.)
*/
@ -223,7 +223,7 @@ diff -up dhcp-4.1.1/dst/dst_api.c.cloexec dhcp-4.1.1/dst/dst_api.c
EREPORT(("dst_read_public_key(): Public Key not found %s\n",
name));
return (NULL);
@@ -619,7 +619,7 @@ dst_s_write_public_key(const DST_KEY *ke
@@ -620,7 +620,7 @@ dst_s_write_public_key(const DST_KEY *ke
return (0);
}
/* create public key file */
@ -232,7 +232,7 @@ diff -up dhcp-4.1.1/dst/dst_api.c.cloexec dhcp-4.1.1/dst/dst_api.c
EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
filename, errno));
return (0);
@@ -853,7 +853,7 @@ dst_s_read_private_key_file(char *name,
@@ -854,7 +854,7 @@ dst_s_read_private_key_file(char *name,
return (0);
}
/* first check if we can find the key file */
@ -241,10 +241,10 @@ diff -up dhcp-4.1.1/dst/dst_api.c.cloexec dhcp-4.1.1/dst/dst_api.c
EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n",
filename, dst_path[0] ? dst_path :
(char *) getcwd(NULL, PATH_MAX - 1)));
diff -up dhcp-4.1.1/dst/prandom.c.cloexec dhcp-4.1.1/dst/prandom.c
--- dhcp-4.1.1/dst/prandom.c.cloexec 2007-11-30 22:51:43.000000000 +0100
+++ dhcp-4.1.1/dst/prandom.c 2010-01-20 17:21:53.000000000 +0100
@@ -267,7 +267,7 @@ get_dev_random(u_char *output, unsigned
diff -up dhcp-4.2.0/dst/prandom.c.cloexec dhcp-4.2.0/dst/prandom.c
--- dhcp-4.2.0/dst/prandom.c.cloexec 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/dst/prandom.c 2010-07-21 14:31:13.000000000 +0200
@@ -269,7 +269,7 @@ get_dev_random(u_char *output, unsigned
s = stat("/dev/random", &st);
if (s == 0 && S_ISCHR(st.st_mode)) {
@ -253,7 +253,7 @@ diff -up dhcp-4.1.1/dst/prandom.c.cloexec dhcp-4.1.1/dst/prandom.c
if ((n = read(fd, output, size)) < 0)
n = 0;
close(fd);
@@ -478,7 +478,7 @@ digest_file(dst_work *work)
@@ -480,7 +480,7 @@ digest_file(dst_work *work)
work->file_digest = dst_free_key(work->file_digest);
return (0);
}
@ -262,58 +262,34 @@ diff -up dhcp-4.1.1/dst/prandom.c.cloexec dhcp-4.1.1/dst/prandom.c
return (0);
for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0;
no += i)
diff -up dhcp-4.1.1/minires/res_init.c.cloexec dhcp-4.1.1/minires/res_init.c
--- dhcp-4.1.1/minires/res_init.c.cloexec 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/minires/res_init.c 2010-01-20 17:21:53.000000000 +0100
@@ -233,7 +233,7 @@ minires_vinit(res_state statp, int prein
(line[sizeof(name) - 1] == ' ' || \
line[sizeof(name) - 1] == '\t'))
- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
+ if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) {
/* read the config file */
while (fgets(buf, sizeof(buf), fp) != NULL) {
/* skip comments */
diff -up dhcp-4.1.1/minires/res_query.c.cloexec dhcp-4.1.1/minires/res_query.c
--- dhcp-4.1.1/minires/res_query.c.cloexec 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/minires/res_query.c 2010-01-20 17:21:53.000000000 +0100
@@ -379,7 +379,7 @@ res_hostalias(const res_state statp, con
if (statp->options & RES_NOALIASES)
return (NULL);
file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
+ if (file == NULL || (fp = fopen(file, "re")) == NULL)
return (NULL);
setbuf(fp, NULL);
buf[sizeof(buf) - 1] = '\0';
diff -up dhcp-4.1.1/omapip/trace.c.cloexec dhcp-4.1.1/omapip/trace.c
--- dhcp-4.1.1/omapip/trace.c.cloexec 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/omapip/trace.c 2010-01-20 17:21:53.000000000 +0100
@@ -140,10 +140,10 @@ isc_result_t trace_begin (const char *fi
return ISC_R_INVALIDARG;
diff -up dhcp-4.2.0/omapip/trace.c.cloexec dhcp-4.2.0/omapip/trace.c
--- dhcp-4.2.0/omapip/trace.c.cloexec 2010-06-01 19:29:59.000000000 +0200
+++ dhcp-4.2.0/omapip/trace.c 2010-07-21 14:36:48.000000000 +0200
@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi
return DHCP_R_INVALIDARG;
}
- traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0600);
+ traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL | O_CLOEXEC, 0600);
if (traceoutfile < 0 && errno == EEXIST) {
log_error ("WARNING: Overwriting trace file \"%s\"", filename);
- traceoutfile = open (filename, O_WRONLY | O_EXCL, 0600);
+ traceoutfile = open (filename, O_WRONLY | O_EXCL | O_CLOEXEC, 0600);
- traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC,
+ traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC | O_CLOEXEC,
0600);
}
if (traceoutfile < 0) {
@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
@@ -431,7 +431,7 @@ void trace_file_replay (const char *file
isc_result_t result;
int len;
- traceinfile = fopen (filename, "r");
+ traceinfile = fopen (filename, "re");
if (!traceinfile) {
log_error ("Can't open tracefile %s: %m", filename);
log_error("Can't open tracefile %s: %m", filename);
return;
diff -up dhcp-4.1.1/relay/dhcrelay.c.cloexec dhcp-4.1.1/relay/dhcrelay.c
--- dhcp-4.1.1/relay/dhcrelay.c.cloexec 2010-01-07 22:48:02.000000000 +0100
+++ dhcp-4.1.1/relay/dhcrelay.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/relay/dhcrelay.c.cloexec dhcp-4.2.0/relay/dhcrelay.c
--- dhcp-4.2.0/relay/dhcrelay.c.cloexec 2010-02-17 21:33:55.000000000 +0100
+++ dhcp-4.2.0/relay/dhcrelay.c 2010-07-21 14:31:39.000000000 +0200
@@ -177,11 +177,11 @@ main(int argc, char **argv) {
/* Make sure that file descriptors 0(stdin), 1,(stdout), and
2(stderr) are open. To do this, we assume that when we
@ -329,7 +305,7 @@ diff -up dhcp-4.1.1/relay/dhcrelay.c.cloexec dhcp-4.1.1/relay/dhcrelay.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -514,12 +514,12 @@ main(int argc, char **argv) {
@@ -520,12 +520,12 @@ main(int argc, char **argv) {
exit(0);
pfdesc = open(path_dhcrelay_pid,
@ -344,9 +320,9 @@ diff -up dhcp-4.1.1/relay/dhcrelay.c.cloexec dhcp-4.1.1/relay/dhcrelay.c
if (!pf)
log_error("Can't fdopen %s: %m",
path_dhcrelay_pid);
diff -up dhcp-4.1.1/server/confpars.c.cloexec dhcp-4.1.1/server/confpars.c
--- dhcp-4.1.1/server/confpars.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/server/confpars.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/server/confpars.c.cloexec dhcp-4.2.0/server/confpars.c
--- dhcp-4.2.0/server/confpars.c.cloexec 2010-03-24 22:49:47.000000000 +0100
+++ dhcp-4.2.0/server/confpars.c 2010-07-21 14:31:39.000000000 +0200
@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char
}
#endif
@ -356,10 +332,10 @@ diff -up dhcp-4.1.1/server/confpars.c.cloexec dhcp-4.1.1/server/confpars.c
if (leasep) {
log_error ("Can't open lease database %s: %m --",
path_dhcpd_db);
diff -up dhcp-4.1.1/server/db.c.cloexec dhcp-4.1.1/server/db.c
--- dhcp-4.1.1/server/db.c.cloexec 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/server/db.c 2010-01-20 17:21:53.000000000 +0100
@@ -1021,7 +1021,7 @@ void db_startup (testp)
diff -up dhcp-4.2.0/server/db.c.cloexec dhcp-4.2.0/server/db.c
--- dhcp-4.2.0/server/db.c.cloexec 2010-02-17 21:33:55.000000000 +0100
+++ dhcp-4.2.0/server/db.c 2010-07-21 14:31:39.000000000 +0200
@@ -1035,7 +1035,7 @@ void db_startup (testp)
}
#endif
if (!testp) {
@ -368,7 +344,7 @@ diff -up dhcp-4.1.1/server/db.c.cloexec dhcp-4.1.1/server/db.c
if (!db_file)
log_fatal ("Can't open %s for append.", path_dhcpd_db);
expire_all_pools ();
@@ -1069,12 +1069,12 @@ int new_lease_file ()
@@ -1083,12 +1083,12 @@ int new_lease_file ()
path_dhcpd_db, (int)t) >= sizeof newfname)
log_fatal("new_lease_file: lease file path too long");
@ -383,10 +359,10 @@ diff -up dhcp-4.1.1/server/db.c.cloexec dhcp-4.1.1/server/db.c
log_error("Can't fdopen new lease file: %m");
close(db_fd);
goto fdfail;
diff -up dhcp-4.1.1/server/dhcpd.c.cloexec dhcp-4.1.1/server/dhcpd.c
--- dhcp-4.1.1/server/dhcpd.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/server/dhcpd.c 2010-01-20 17:21:53.000000000 +0100
@@ -267,11 +267,11 @@ main(int argc, char **argv) {
diff -up dhcp-4.2.0/server/dhcpd.c.cloexec dhcp-4.2.0/server/dhcpd.c
--- dhcp-4.2.0/server/dhcpd.c.cloexec 2010-06-01 19:29:59.000000000 +0200
+++ dhcp-4.2.0/server/dhcpd.c 2010-07-21 14:31:39.000000000 +0200
@@ -268,11 +268,11 @@ main(int argc, char **argv) {
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
2 (stderr) are open. To do this, we assume that when we
open a file the lowest available file descriptor is used. */
@ -401,7 +377,7 @@ diff -up dhcp-4.1.1/server/dhcpd.c.cloexec dhcp-4.1.1/server/dhcpd.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -772,7 +772,7 @@ main(int argc, char **argv) {
@@ -780,7 +780,7 @@ main(int argc, char **argv) {
#endif /* PARANOIA */
/* Read previous pid file. */
@ -410,7 +386,7 @@ diff -up dhcp-4.1.1/server/dhcpd.c.cloexec dhcp-4.1.1/server/dhcpd.c
status = read(i, pbuf, (sizeof pbuf) - 1);
close (i);
if (status > 0) {
@@ -790,7 +790,7 @@ main(int argc, char **argv) {
@@ -798,7 +798,7 @@ main(int argc, char **argv) {
}
/* Write new pid file. */
@ -419,7 +395,7 @@ diff -up dhcp-4.1.1/server/dhcpd.c.cloexec dhcp-4.1.1/server/dhcpd.c
sprintf(pbuf, "%d\n", (int) getpid());
IGNORE_RET (write(i, pbuf, strlen(pbuf)));
close(i);
@@ -816,9 +816,9 @@ main(int argc, char **argv) {
@@ -824,9 +824,9 @@ main(int argc, char **argv) {
close(2);
/* Reopen them on /dev/null. */
@ -432,9 +408,9 @@ diff -up dhcp-4.1.1/server/dhcpd.c.cloexec dhcp-4.1.1/server/dhcpd.c
log_perror = 0; /* No sense logging to /dev/null. */
IGNORE_RET (chdir("/"));
diff -up dhcp-4.1.1/server/ldap.c.cloexec dhcp-4.1.1/server/ldap.c
--- dhcp-4.1.1/server/ldap.c.cloexec 2010-01-20 17:21:53.000000000 +0100
+++ dhcp-4.1.1/server/ldap.c 2010-01-20 17:21:53.000000000 +0100
diff -up dhcp-4.2.0/server/ldap.c.cloexec dhcp-4.2.0/server/ldap.c
--- dhcp-4.2.0/server/ldap.c.cloexec 2010-03-25 16:26:58.000000000 +0100
+++ dhcp-4.2.0/server/ldap.c 2010-07-21 14:31:39.000000000 +0200
@@ -685,7 +685,7 @@ ldap_start (void)
if (ldap_debug_file != NULL && ldap_debug_fd == -1)

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/server/dhcpd.c.ifnamsiz dhcp-4.1.1/server/dhcpd.c
--- dhcp-4.1.1/server/dhcpd.c.ifnamsiz 2010-01-20 17:26:44.000000000 +0100
+++ dhcp-4.1.1/server/dhcpd.c 2010-01-20 17:26:44.000000000 +0100
@@ -402,7 +402,7 @@ main(int argc, char **argv) {
diff -up dhcp-4.2.0/server/dhcpd.c.ifnamsiz dhcp-4.2.0/server/dhcpd.c
--- dhcp-4.2.0/server/dhcpd.c.ifnamsiz 2010-07-21 14:31:39.000000000 +0200
+++ dhcp-4.2.0/server/dhcpd.c 2010-07-21 16:05:49.000000000 +0200
@@ -409,7 +409,7 @@ main(int argc, char **argv) {
log_fatal ("Insufficient memory to %s %s: %s",
"record interface", argv [i],
isc_result_totext (result));

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
--- dhcp-4.1.1/server/dhcpv6.c.UseMulticast 2009-09-30 23:01:20.000000000 +0200
+++ dhcp-4.1.1/server/dhcpv6.c 2010-03-15 12:29:32.000000000 +0100
@@ -345,6 +345,48 @@ generate_new_server_duid(void) {
diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c
--- dhcp-4.2.0/server/dhcpv6.c.UseMulticast 2010-06-01 19:30:00.000000000 +0200
+++ dhcp-4.2.0/server/dhcpv6.c 2010-07-21 16:17:30.000000000 +0200
@@ -346,6 +346,48 @@ generate_new_server_duid(void) {
}
/*
@ -50,7 +50,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
* Get the client identifier from the packet.
*/
isc_result_t
@@ -1398,6 +1440,56 @@ lease_to_client(struct data_string *repl
@@ -1405,6 +1447,56 @@ lease_to_client(struct data_string *repl
reply.shared->group);
}
@ -107,7 +107,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
/*
* RFC3315 section 17.2.2 (Solicit):
*
@@ -1422,8 +1514,6 @@ lease_to_client(struct data_string *repl
@@ -1429,8 +1521,6 @@ lease_to_client(struct data_string *repl
* the server.
* Sends a Renew/Rebind if the IA is not in the Reply message.
*/
@ -116,7 +116,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
{
/* Set the NoAddrsAvail status code. */
if (!set_status_code(STATUS_NoAddrsAvail,
@@ -4097,7 +4187,6 @@ dhcpv6_solicit(struct data_string *reply
@@ -4128,7 +4218,6 @@ dhcpv6_solicit(struct data_string *reply
* Very similar to Solicit handling, except the server DUID is required.
*/
@ -124,7 +124,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
static void
dhcpv6_request(struct data_string *reply_ret, struct packet *packet) {
struct data_string client_id;
@@ -4412,7 +4501,6 @@ exit:
@@ -4443,7 +4532,6 @@ exit:
* except for the error code of when addresses don't match.
*/
@ -132,7 +132,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
static void
dhcpv6_renew(struct data_string *reply, struct packet *packet) {
struct data_string client_id;
@@ -4653,18 +4741,60 @@ iterate_over_ia_na(struct data_string *r
@@ -4688,18 +4776,60 @@ iterate_over_ia_na(struct data_string *r
goto exit;
}
@ -203,7 +203,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
/*
* Loop through the IA_NA reported by the client, and deal with
@@ -4802,6 +4932,7 @@ iterate_over_ia_na(struct data_string *r
@@ -4838,6 +4968,7 @@ iterate_over_ia_na(struct data_string *r
/*
* Return our reply to the caller.
*/
@ -211,7 +211,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
reply_ret->len = reply_ofs;
reply_ret->buffer = NULL;
if (!buffer_allocate(&reply_ret->buffer, reply_ofs, MDL)) {
@@ -4847,7 +4978,6 @@ exit:
@@ -4883,7 +5014,6 @@ exit:
* we still need to be aware of this possibility.
*/
@ -219,7 +219,7 @@ diff -up dhcp-4.1.1/server/dhcpv6.c.UseMulticast dhcp-4.1.1/server/dhcpv6.c
/* TODO: IA_TA */
static void
dhcpv6_decline(struct data_string *reply, struct packet *packet) {
@@ -5314,7 +5444,6 @@ exit:
@@ -5355,7 +5485,6 @@ exit:
* Release means a client is done with the leases.
*/

View File

@ -0,0 +1,14 @@
diff -up dhcp-4.2.0/common/dispatch.c.dracut dhcp-4.2.0/common/dispatch.c
--- dhcp-4.2.0/common/dispatch.c.dracut 2010-06-01 19:29:59.000000000 +0200
+++ dhcp-4.2.0/common/dispatch.c 2010-07-21 16:10:09.000000000 +0200
@@ -189,6 +189,10 @@ void add_timeout (when, where, what, ref
isc_interval_t interval;
isc_time_t expires;
+ if (when == NULL) {
+ return;
+ }
+
/* See if this timeout supersedes an existing timeout. */
t = (struct timeout *)0;
for (q = timeouts; q; q = q->next) {

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.8.capability dhcp-4.1.1/client/dhclient.8
--- dhcp-4.1.1/client/dhclient.8.capability 2010-02-03 11:19:39.854958099 -0500
+++ dhcp-4.1.1/client/dhclient.8 2010-02-03 11:44:57.949895909 -0500
@@ -105,6 +105,9 @@ relay
diff -up dhcp-4.2.0/client/dhclient.8.capability dhcp-4.2.0/client/dhclient.8
--- dhcp-4.2.0/client/dhclient.8.capability 2010-07-21 14:27:13.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.8 2010-07-21 16:13:02.000000000 +0200
@@ -109,6 +109,9 @@ relay
.B -n
]
[
@ -11,7 +11,7 @@ diff -up dhcp-4.1.1/client/dhclient.8.capability dhcp-4.1.1/client/dhclient.8
.B -nw
]
[
@@ -381,6 +384,32 @@ Do not configure any interfaces. Most u
@@ -395,6 +398,32 @@ Do not configure any interfaces. Most u
option.
.TP
@ -44,20 +44,21 @@ diff -up dhcp-4.1.1/client/dhclient.8.capability dhcp-4.1.1/client/dhclient.8
.BI \-nw
Become a daemon process immediately (nowait) rather than waiting until an IP
address has been acquired.
diff -up dhcp-4.1.1/client/dhclient.c.capability dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.capability 2010-02-03 11:19:39.876957973 -0500
+++ dhcp-4.1.1/client/dhclient.c 2010-02-03 11:46:14.665957658 -0500
@@ -37,6 +37,9 @@
#include <sys/time.h>
#include <sys/wait.h>
diff -up dhcp-4.2.0/client/dhclient.c.capability dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.capability 2010-07-21 14:40:05.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 16:13:52.000000000 +0200
@@ -39,6 +39,10 @@
#include <limits.h>
#include <dns/result.h>
+#ifdef HAVE_LIBCAP_NG
+#include <cap-ng.h>
+#endif
+
/*
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
@@ -89,6 +92,9 @@ int wanted_ia_ta = 0;
* that when building ISC code.
@@ -89,6 +93,9 @@ int wanted_ia_ta = 0;
int wanted_ia_pd = 0;
char *mockup_relay = NULL;
int bootp_broadcast_always = 0;
@ -67,7 +68,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.capability dhcp-4.1.1/client/dhclient.c
extern u_int32_t default_requested_options[];
@@ -376,6 +382,10 @@ main(int argc, char **argv) {
@@ -397,6 +404,10 @@ main(int argc, char **argv) {
}
dhclient_request_options = argv[i];
@ -78,7 +79,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.capability dhcp-4.1.1/client/dhclient.c
} else if (argv[i][0] == '-') {
usage();
} else if (interfaces_requested < 0) {
@@ -424,6 +434,19 @@ main(int argc, char **argv) {
@@ -445,6 +456,19 @@ main(int argc, char **argv) {
path_dhclient_script = s;
}
@ -98,9 +99,9 @@ diff -up dhcp-4.1.1/client/dhclient.c.capability dhcp-4.1.1/client/dhclient.c
/* Set up the initial dhcp option universe. */
initialize_common_option_spaces();
diff -up dhcp-4.1.1/client/dhclient-script.8.capability dhcp-4.1.1/client/dhclient-script.8
--- dhcp-4.1.1/client/dhclient-script.8.capability 2010-05-28 15:47:36.000000000 +0200
+++ dhcp-4.1.1/client/dhclient-script.8 2010-05-28 15:53:21.000000000 +0200
diff -up dhcp-4.2.0/client/dhclient-script.8.capability dhcp-4.2.0/client/dhclient-script.8
--- dhcp-4.2.0/client/dhclient-script.8.capability 2010-07-21 14:00:16.000000000 +0200
+++ dhcp-4.2.0/client/dhclient-script.8 2010-07-21 16:13:02.000000000 +0200
@@ -239,6 +239,16 @@ repeatedly initialized to the values pro
the other. Assuming the information provided by both servers is
valid, this shouldn't cause any real problems, but it could be
@ -118,21 +119,21 @@ diff -up dhcp-4.1.1/client/dhclient-script.8.capability dhcp-4.1.1/client/dhclie
.SH SEE ALSO
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
dhclient.leases(5).
diff -up dhcp-4.1.1/client/Makefile.am.capability dhcp-4.1.1/client/Makefile.am
--- dhcp-4.1.1/client/Makefile.am.capability 2008-11-18 17:33:22.000000000 -0500
+++ dhcp-4.1.1/client/Makefile.am 2010-02-03 11:19:39.895958083 -0500
diff -up dhcp-4.2.0/client/Makefile.am.capability dhcp-4.2.0/client/Makefile.am
--- dhcp-4.2.0/client/Makefile.am.capability 2009-10-28 05:12:29.000000000 +0100
+++ dhcp-4.2.0/client/Makefile.am 2010-07-21 16:15:29.000000000 +0200
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
scripts/netbsd scripts/nextstep scripts/openbsd \
scripts/solaris scripts/openwrt
dhclient_LDADD = ../common/libdhcp.a ../minires/libres.a \
- ../omapip/libomapi.a ../dst/libdst.a
+ ../omapip/libomapi.a ../dst/libdst.a $(CAPNG_LDADD)
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libdns.a ../bind/lib/libisc.a
+ ../bind/lib/libdns.a ../bind/lib/libisc.a $(CAPNG_LDADD)
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
diff -up dhcp-4.1.1/configure.ac.capability dhcp-4.1.1/configure.ac
--- dhcp-4.1.1/configure.ac.capability 2010-02-03 11:19:39.806895971 -0500
+++ dhcp-4.1.1/configure.ac 2010-02-03 11:19:39.895958083 -0500
diff -up dhcp-4.2.0/configure.ac.capability dhcp-4.2.0/configure.ac
--- dhcp-4.2.0/configure.ac.capability 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/configure.ac 2010-07-21 16:13:02.000000000 +0200
@@ -419,6 +419,41 @@ AC_TRY_LINK(
# Look for optional headers.
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/client/clparse.c.requested dhcp-4.1.1/client/clparse.c
--- dhcp-4.1.1/client/clparse.c.requested 2010-04-28 15:20:43.000000000 +0200
+++ dhcp-4.1.1/client/clparse.c 2010-04-28 15:21:49.000000000 +0200
diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
--- dhcp-4.2.0/client/clparse.c.requested 2010-07-21 13:29:05.000000000 +0200
+++ dhcp-4.2.0/client/clparse.c 2010-07-21 13:50:29.000000000 +0200
@@ -37,7 +37,7 @@
struct client_config top_level_config;

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.c.backoff dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.backoff 2010-02-08 16:41:52.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-02-08 16:43:56.000000000 +0100
@@ -1187,6 +1187,8 @@ void state_init (cpp)
diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.backoff 2010-07-21 13:37:03.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:38:31.000000000 +0200
@@ -1208,6 +1208,8 @@ void state_init (cpp)
void *cpp;
{
struct client_state *client = cpp;
@ -10,7 +10,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.backoff dhcp-4.1.1/client/dhclient.c
ASSERT_STATE(state, S_INIT);
@@ -1199,9 +1201,18 @@ void state_init (cpp)
@@ -1220,9 +1222,18 @@ void state_init (cpp)
client -> first_sending = cur_time;
client -> interval = client -> config -> initial_interval;
@ -32,7 +32,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.backoff dhcp-4.1.1/client/dhclient.c
}
/*
@@ -1480,6 +1491,7 @@ void bind_lease (client)
@@ -1501,6 +1512,7 @@ void bind_lease (client)
send_decline (client);
destroy_client_lease (client -> new);
client -> new = (struct client_lease *)0;
@ -40,7 +40,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.backoff dhcp-4.1.1/client/dhclient.c
state_init (client);
return;
}
@@ -3689,6 +3701,7 @@ void client_location_changed ()
@@ -3711,6 +3723,7 @@ void client_location_changed ()
case S_INIT:
case S_REBINDING:
case S_STOPPED:
@ -48,10 +48,10 @@ diff -up dhcp-4.1.1/client/dhclient.c.backoff dhcp-4.1.1/client/dhclient.c
break;
}
client -> state = S_INIT;
diff -up dhcp-4.1.1/includes/dhcpd.h.backoff dhcp-4.1.1/includes/dhcpd.h
--- dhcp-4.1.1/includes/dhcpd.h.backoff 2010-02-08 16:41:52.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-02-08 16:41:52.000000000 +0100
@@ -1017,7 +1017,8 @@ enum dhcp_state {
diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-4.2.0/includes/dhcpd.h
--- dhcp-4.2.0/includes/dhcpd.h.backoff 2010-07-21 13:29:05.000000000 +0200
+++ dhcp-4.2.0/includes/dhcpd.h 2010-07-21 13:38:31.000000000 +0200
@@ -1056,7 +1056,8 @@ enum dhcp_state {
S_BOUND = 5,
S_RENEWING = 6,
S_REBINDING = 7,

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.c.usage dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.usage 2010-01-20 17:17:18.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:17:18.000000000 +0100
@@ -992,6 +992,10 @@ static void usage()
diff -up dhcp-4.2.0/client/dhclient.c.usage dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.usage 2010-07-21 13:38:31.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:49:01.000000000 +0200
@@ -1013,6 +1013,10 @@ static void usage()
"[-s server]");
log_error(" [-cf config-file] [-lf lease-file]%s",
"[-pf pid-file] [-e VAR=val]");

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/omapip/errwarn.c.errwarn dhcp-4.1.1/omapip/errwarn.c
--- dhcp-4.1.1/omapip/errwarn.c.errwarn 2009-07-23 21:02:10.000000000 +0200
+++ dhcp-4.1.1/omapip/errwarn.c 2010-01-20 17:08:13.000000000 +0100
diff -up dhcp-4.2.0/omapip/errwarn.c.errwarn dhcp-4.2.0/omapip/errwarn.c
--- dhcp-4.2.0/omapip/errwarn.c.errwarn 2009-07-23 20:52:21.000000000 +0200
+++ dhcp-4.2.0/omapip/errwarn.c 2010-07-21 13:23:47.000000000 +0200
@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
#if !defined (NOMINUM)

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/common/tables.c.garbage dhcp-4.1.1/common/tables.c
--- dhcp-4.1.1/common/tables.c.garbage 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/tables.c 2010-01-20 17:23:10.000000000 +0100
diff -up dhcp-4.2.0/common/tables.c.garbage dhcp-4.2.0/common/tables.c
--- dhcp-4.2.0/common/tables.c.garbage 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/tables.c 2010-07-21 14:40:56.000000000 +0200
@@ -207,7 +207,7 @@ static struct option dhcp_options[] = {
{ "netinfo-server-tag", "t", &dhcp_universe, 113, 1 },
{ "default-url", "t", &dhcp_universe, 114, 1 },

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.c.inherit dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.inherit 2010-01-20 17:22:34.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:22:34.000000000 +0100
@@ -2301,6 +2301,7 @@ void send_request (cpp)
diff -up dhcp-4.2.0/client/dhclient.c.inherit dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.inherit 2010-07-21 14:33:44.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 14:40:05.000000000 +0200
@@ -2322,6 +2322,7 @@ void send_request (cpp)
{
struct client_state *client = cpp;
@ -9,7 +9,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.inherit dhcp-4.1.1/client/dhclient.c
int result;
int interval;
struct sockaddr_in destination;
@@ -2360,6 +2361,22 @@ void send_request (cpp)
@@ -2381,6 +2382,22 @@ void send_request (cpp)
/* Now do a preinit on the interface so that we can
discover a new address. */
script_init (client, "PREINIT", (struct string_list *)0);

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.c.initialization-delay dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.initialization-delay 2010-05-03 15:16:43.000000000 +0200
+++ dhcp-4.1.1/client/dhclient.c 2010-05-03 15:23:05.000000000 +0200
@@ -927,11 +927,16 @@ main(int argc, char **argv) {
diff -up dhcp-4.2.0/client/dhclient.c.initialization-delay dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.initialization-delay 2010-07-21 16:16:51.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 16:22:18.000000000 +0200
@@ -949,11 +949,16 @@ main(int argc, char **argv) {
do_release(client);
else {
client->state = S_INIT;
@ -22,7 +22,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.initialization-delay dhcp-4.1.1/client/dhc
add_timeout(&tv, state_reboot,
client, 0, 0);
}
@@ -3911,10 +3916,16 @@ isc_result_t dhclient_interface_startup_
@@ -3930,10 +3935,16 @@ isc_result_t dhclient_interface_startup_
ip -> flags |= INTERFACE_RUNNING;
for (client = ip -> client; client; client = client -> next) {
client -> state = S_INIT;

View File

@ -1,8 +1,8 @@
diff -up dhcp-4.1.1/client/dhclient.conf.supersede dhcp-4.1.1/client/dhclient.conf
--- dhcp-4.1.1/client/dhclient.conf.supersede 1997-06-03 00:50:44.000000000 +0200
+++ dhcp-4.1.1/client/dhclient.conf 2010-01-20 17:24:00.000000000 +0100
diff -up dhcp-4.2.0/client/dhclient.conf.supersede dhcp-4.2.0/client/dhclient.conf
--- dhcp-4.2.0/client/dhclient.conf.supersede 2009-07-07 01:29:51.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.conf 2010-07-21 14:47:27.000000000 +0200
@@ -1,10 +1,10 @@
send host-name "andare.fugue.com";
send host-name = pick-first-value(gethostname(), "ISC-dhclient");
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 3600;
-supersede domain-name "fugue.com home.vix.com";

12
dhcp-4.2.0-ldap.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up dhcp-4.2.0/configure.ac.ldap dhcp-4.2.0/configure.ac
--- dhcp-4.2.0/configure.ac.ldap 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/configure.ac 2010-07-21 13:06:20.000000000 +0200
@@ -521,6 +521,8 @@ AC_ARG_WITH(ldapcrypto,
if test x$ldap = xyes || test x$ldapcrypto = xyes ; then
AC_SEARCH_LIBS(ldap_initialize, [ldap], ,
AC_MSG_FAILURE([*** Cannot find ldap_initialize with -lldap - do you need to install an OpenLDAP2 Devel package?]))
+ AC_SEARCH_LIBS(ber_pvt_opt_on, [lber], ,
+ AC_MSG_FAILURE([*** Cannot find ber_pvt_opt_on with -llber - do you need to install an OpenLDAP2 Devel package?]))
if test x$ldapcrypto = xyes ; then
AC_SUBST(LDAP_CFLAGS, ["-DLDAP_CONFIGURATION -DLDAP_USE_SSL"])

12
dhcp-4.2.0-logpid.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up dhcp-4.2.0/client/dhclient.c.logpid dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.logpid 2010-07-21 16:13:52.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 16:16:51.000000000 +0200
@@ -154,7 +154,7 @@ main(int argc, char **argv) {
else if (fd != -1)
close(fd);
- openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
+ openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
#if !(defined(DEBUG) || defined(__CYGWIN32__))
setlogmask(LOG_UPTO(LOG_INFO));

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.8.man dhcp-4.1.1/client/dhclient.8
--- dhcp-4.1.1/client/dhclient.8.man 2009-07-25 00:04:51.000000000 +0200
+++ dhcp-4.1.1/client/dhclient.8 2010-02-25 17:41:36.000000000 +0100
@@ -111,6 +111,33 @@ relay
diff -up dhcp-4.2.0/client/dhclient.8.man dhcp-4.2.0/client/dhclient.8
--- dhcp-4.2.0/client/dhclient.8.man 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.8 2010-07-21 14:27:13.000000000 +0200
@@ -115,6 +115,33 @@ relay
.B -w
]
[
@ -35,14 +35,18 @@ diff -up dhcp-4.1.1/client/dhclient.8.man dhcp-4.1.1/client/dhclient.8
.B -v
]
[
@@ -138,32 +165,6 @@ important details about the network to w
@@ -142,46 +169,6 @@ important details about the network to w
the location of a default router, the location of a name server, and
so on.
.PP
-If given the -4 command line argument (default), dhclient will use the
-If given the
-.B -4
-command line argument (default), dhclient will use the
-DHCPv4 protocol to obtain an IPv4 address and configuration parameters.
-.PP
-If given the -6 command line argument, dhclient will use the DHCPv6
-If given the
-.B -6
-command line argument, dhclient will use the DHCPv6
-protocol to obtain whatever IPv6 addresses are available along with
-configuration parameters. But with
-.B -S
@ -62,13 +66,23 @@ diff -up dhcp-4.1.1/client/dhclient.8.man dhcp-4.1.1/client/dhclient.8
-restores it. Note it is not recommended to mix queries of different types
-together, or even to share the lease file between them.
-.PP
-If given the --version command line argument, dhclient will print its
-By default, DHCPv6 dhclient creates an identifier based on the
-link-layer address (DUID-LL) if it is running in stateless mode (with
--S, not requesting an address), or it creates an identifier based on
-the link-layer address plus a timestamp (DUID-LLT) if it is running in
-stateful mode (without -S, requesting an address).
-.B -D
-overrides this default, with a value of either "LL" or "LLT".
-.PP
-If given the
-.B --version
-command line argument, dhclient will print its
-version number and exit.
-.PP
On startup, dhclient reads the
.IR dhclient.conf
for configuration instructions. It then gets a list of all the
@@ -217,141 +218,259 @@ file. If interfaces are specified in t
@@ -235,141 +222,269 @@ file. If interfaces are specified in t
only configure interfaces that are either specified in the
configuration file or on the command line, and will ignore all other
interfaces.
@ -211,6 +225,16 @@ diff -up dhcp-4.1.1/client/dhclient.8.man dhcp-4.1.1/client/dhclient.8
+option.
+
+.TP
+.BI \-D
+By default, DHCPv6 dhclient creates an identifier based on the
+link-layer address (DUID-LL) if it is running in stateless mode (with
+-S, not requesting an address), or it creates an identifier based on
+the link-layer address plus a timestamp (DUID-LLT) if it is running in
+stateful mode (without -S, requesting an address).
+.BI \-D
+overrides this default, with a value of either "LL" or "LLT".
+
+.TP
+.BI \-p\ <port\ number>
+The UDP port number the DHCP client should listen and transmit on. If
+unspecified,
@ -457,55 +481,23 @@ diff -up dhcp-4.1.1/client/dhclient.8.man dhcp-4.1.1/client/dhclient.8
.SH CONFIGURATION
The syntax of the dhclient.conf(5) file is discussed separately.
.SH OMAPI
diff -up dhcp-4.1.1/client/dhclient.conf.5.man dhcp-4.1.1/client/dhclient.conf.5
--- dhcp-4.1.1/client/dhclient.conf.5.man 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/client/dhclient.conf.5 2010-02-25 17:43:16.000000000 +0100
@@ -184,11 +184,12 @@ are called \fIDHCP Options\fR. DHCP Opt
The request statement causes the client to request that any server
responding to the client send the client its values for the specified
diff -up dhcp-4.2.0/client/dhclient.conf.5.man dhcp-4.2.0/client/dhclient.conf.5
--- dhcp-4.2.0/client/dhclient.conf.5.man 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.conf.5 2010-07-21 14:14:00.000000000 +0200
@@ -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 DHCP server
+statement - not option parameters. By default, the DHCPv4 client
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. Note that if
-you enter a 'request' statement, you over-ride this default and these
-options will not be requested.
+domain-search, domain-name, domain-name-servers, host-name, nis-domain, nis-servers,
+ntp-servers and interface-mtu options. The DHCPv6 client requests by default
+name-servers and domain-search. Note that if you enter a 'request' statement,
+you over-ride this default and these options will not be requested.
-domain-name, domain-name-servers and host-name options while the DHCPv6
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
+nis-servers, ntp-servers and interface-mtu options while the DHCPv6
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
client. The \fIlink-type\fR and \fImac-address\fR parameters are configured
in a similar manner to the \fBhardware\fR statement.
.PP
In some cases, it may be desirable to send no parameter request list
at all. To do this, simply write the request statement but specify
@@ -234,22 +235,11 @@ The send statement causes the client to
the server with the specified values. These are full option
declarations as described in \fBdhcp-options(5)\fR. Options that are
always sent in the DHCP protocol should not be specified here, except
-that the client can specify a \fBrequested-lease-time\fR option other
+that the client can specify a requested \fBdhcp-lease-time\fR option other
than the default requested lease time, which is two hours. The other
obvious use for this statement is to send information to the server
that will allow it to differentiate between this client and other
clients or kinds of clients.
-.SH DHCPV6 OPERATION
-The client does not yet have a default DHCPv6 Option Request Option (ORO),
-nor has it been integrated with the 'request' and 'require' syntax above.
-It is neccessary to configure an ORO then.
-.PP
-.nf
- send dhcp6.oro 1, 2, 7, 12, 13, 23, 24, 39;
-.fi
-.PP
-The above ORO will request both identifiers (server, client), the preference,
-unicast, nameservers, domain-search, and FQDN(v6) options.
.SH DYNAMIC DNS
The client now has some very limited support for doing DNS updates
when a lease is acquired. This is prototypical, and probably doesn't
@@ -659,6 +649,18 @@ database and will record the media type
Whenever the client tries to renew the lease, it will use that same
media type. The lease must expire before the client will go back to
cycling through media types.
+.PP
+ \fBbootp-broadcast-always;\fR
+.PP
+The
@ -520,8 +512,8 @@ diff -up dhcp-4.1.1/client/dhclient.conf.5.man dhcp-4.1.1/client/dhclient.conf.5
.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
@@ -680,10 +682,10 @@ interface "ep0" {
send host-name "andare.fugue.com";
@@ -694,10 +706,10 @@ interface "ep0" {
hardware ethernet 00:a0:24:ab:fb:9c;
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 3600;
- supersede domain-name "fugue.com rc.vix.com home.vix.com";
@ -533,9 +525,9 @@ diff -up dhcp-4.1.1/client/dhclient.conf.5.man dhcp-4.1.1/client/dhclient.conf.5
require subnet-mask, domain-name-servers;
script "CLIENTBINDIR/dhclient-script";
media "media 10baseT/UTP", "media 10base2/BNC";
diff -up dhcp-4.1.1/client/dhclient-script.8.man dhcp-4.1.1/client/dhclient-script.8
--- dhcp-4.1.1/client/dhclient-script.8.man 2009-07-25 00:04:51.000000000 +0200
+++ dhcp-4.1.1/client/dhclient-script.8 2010-02-25 17:45:46.000000000 +0100
diff -up dhcp-4.2.0/client/dhclient-script.8.man dhcp-4.2.0/client/dhclient-script.8
--- dhcp-4.2.0/client/dhclient-script.8.man 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/client/dhclient-script.8 2010-07-21 14:00:16.000000000 +0200
@@ -47,7 +47,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
@ -572,10 +564,10 @@ diff -up dhcp-4.1.1/client/dhclient-script.8.man dhcp-4.1.1/client/dhclient-scri
.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.1.1/common/dhcp-options.5.man dhcp-4.1.1/common/dhcp-options.5
--- dhcp-4.1.1/common/dhcp-options.5.man 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/dhcp-options.5 2010-02-25 17:40:19.000000000 +0100
@@ -905,6 +905,21 @@ classless IP routing - it does not inclu
diff -up dhcp-4.2.0/common/dhcp-options.5.man dhcp-4.2.0/common/dhcp-options.5
--- dhcp-4.2.0/common/dhcp-options.5.man 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/common/dhcp-options.5 2010-07-21 14:00:16.000000000 +0200
@@ -913,6 +913,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.
@ -597,9 +589,9 @@ diff -up dhcp-4.1.1/common/dhcp-options.5.man dhcp-4.1.1/common/dhcp-options.5
.RE
.PP
.nf
diff -up dhcp-4.1.1/server/dhcpd.conf.5.man dhcp-4.1.1/server/dhcpd.conf.5
--- dhcp-4.1.1/server/dhcpd.conf.5.man 2009-07-23 21:02:10.000000000 +0200
+++ dhcp-4.1.1/server/dhcpd.conf.5 2010-02-25 17:51:20.000000000 +0100
diff -up dhcp-4.2.0/server/dhcpd.conf.5.man dhcp-4.2.0/server/dhcpd.conf.5
--- dhcp-4.2.0/server/dhcpd.conf.5.man 2010-07-10 05:25:51.000000000 +0200
+++ dhcp-4.2.0/server/dhcpd.conf.5 2010-07-21 14:00:16.000000000 +0200
@@ -519,6 +519,9 @@ pool {
};
.fi
@ -622,31 +614,7 @@ diff -up dhcp-4.1.1/server/dhcpd.conf.5.man dhcp-4.1.1/server/dhcpd.conf.5
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
@@ -594,9 +597,7 @@ statement
.B port \fIport-number\fR\fB;\fR
.PP
The \fBport\fR statement declares the TCP port on which the server
-should listen for connections from its failover peer. This statement
-may not currently be omitted, because the failover protocol does not
-yet have a reserved TCP port number.
+should listen for connections from its failover peer.
.RE
.PP
The
@@ -608,10 +609,8 @@ statement
.PP
The \fBpeer port\fR statement declares the TCP port to which the
server should connect to reach its failover peer for failover
-messages. This statement may not be omitted because the failover
-protocol does not yet have a reserved TCP port number. The port
-number declared in the \fBpeer port\fR statement may be the same as
-the port number declared in the \fBport\fR statement.
+messages. The port number declared in the \fBpeer port\fR statement
+may be the same as the port number declared in the \fBport\fR statement.
.RE
.PP
The
@@ -1278,7 +1277,7 @@ the zone containing PTR records - for IS
@@ -1305,7 +1308,7 @@ the zone containing PTR records - for IS
.PP
.nf
key DHCP_UPDATER {
@ -655,7 +623,7 @@ diff -up dhcp-4.1.1/server/dhcpd.conf.5.man dhcp-4.1.1/server/dhcpd.conf.5
secret pRP5FapFoJ95JEL06sv4PQ==;
};
@@ -1301,7 +1300,7 @@ dhcpd.conf file:
@@ -1328,7 +1331,7 @@ dhcpd.conf file:
.PP
.nf
key DHCP_UPDATER {
@ -664,7 +632,7 @@ diff -up dhcp-4.1.1/server/dhcpd.conf.5.man dhcp-4.1.1/server/dhcpd.conf.5
secret pRP5FapFoJ95JEL06sv4PQ==;
};
@@ -2508,7 +2507,8 @@ statement
@@ -2540,7 +2543,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

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/common/discover.c.noipv6 dhcp-4.1.1/common/discover.c
--- dhcp-4.1.1/common/discover.c.noipv6 2010-01-20 17:24:40.000000000 +0100
+++ dhcp-4.1.1/common/discover.c 2010-01-20 17:24:40.000000000 +0100
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
}

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/client/clparse.c.options dhcp-4.1.1/client/clparse.c
--- dhcp-4.1.1/client/clparse.c.options 2009-07-25 00:04:51.000000000 +0200
+++ dhcp-4.1.1/client/clparse.c 2010-01-20 17:11:37.000000000 +0100
diff -up dhcp-4.2.0/client/clparse.c.options dhcp-4.2.0/client/clparse.c
--- dhcp-4.2.0/client/clparse.c.options 2009-11-20 02:48:58.000000000 +0100
+++ dhcp-4.2.0/client/clparse.c 2010-07-21 13:29:05.000000000 +0200
@@ -136,6 +136,7 @@ isc_result_t read_client_conf ()
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
*/
@ -19,7 +19,7 @@ diff -up dhcp-4.1.1/client/clparse.c.options dhcp-4.1.1/client/clparse.c
void parse_client_statement (cfile, ip, config)
struct parse *cfile;
@@ -706,6 +708,12 @@ void parse_client_statement (cfile, ip,
@@ -717,6 +719,12 @@ void parse_client_statement (cfile, ip,
parse_reject_statement (cfile, config);
return;
@ -32,12 +32,12 @@ diff -up dhcp-4.1.1/client/clparse.c.options dhcp-4.1.1/client/clparse.c
default:
lose = 0;
stmt = (struct executable_statement *)0;
diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.options 2010-01-07 22:47:40.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:11:37.000000000 +0100
@@ -38,6 +38,12 @@
#include <sys/wait.h>
diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.options 2010-02-17 21:33:55.000000000 +0100
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:30:10.000000000 +0200
@@ -39,6 +39,12 @@
#include <limits.h>
#include <dns/result.h>
+/*
+ * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
@ -74,7 +74,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
/* Initialize client globals. */
memset(&default_duid, 0, sizeof(default_duid));
@@ -276,6 +294,88 @@ main(int argc, char **argv) {
@@ -297,6 +315,88 @@ main(int argc, char **argv) {
} else if (!strcmp(argv[i], "--version")) {
log_info("isc-dhclient-%s", PACKAGE_VERSION);
exit(0);
@ -163,7 +163,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
} else if (argv[i][0] == '-') {
usage();
} else if (interfaces_requested < 0) {
@@ -445,6 +545,166 @@ main(int argc, char **argv) {
@@ -466,6 +566,166 @@ main(int argc, char **argv) {
/* Parse the dhclient.conf file. */
read_client_conf();
@ -330,7 +330,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
/* Parse the lease database. */
read_client_leases();
@@ -2315,7 +2575,8 @@ void make_discover (client, lease)
@@ -2337,7 +2597,8 @@ void make_discover (client, lease)
client -> packet.xid = random ();
client -> packet.secs = 0; /* filled in by send_discover. */
@ -340,7 +340,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -2399,7 +2660,9 @@ void make_request (client, lease)
@@ -2421,7 +2682,9 @@ void make_request (client, lease)
} else {
memset (&client -> packet.ciaddr, 0,
sizeof client -> packet.ciaddr);
@ -351,7 +351,7 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -2461,7 +2724,8 @@ void make_decline (client, lease)
@@ -2483,7 +2746,8 @@ void make_decline (client, lease)
client -> packet.hops = 0;
client -> packet.xid = client -> xid;
client -> packet.secs = 0; /* Filled in by send_request. */
@ -361,10 +361,10 @@ diff -up dhcp-4.1.1/client/dhclient.c.options dhcp-4.1.1/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
diff -up dhcp-4.1.1/common/conflex.c.options dhcp-4.1.1/common/conflex.c
--- dhcp-4.1.1/common/conflex.c.options 2010-01-20 17:11:37.000000000 +0100
+++ dhcp-4.1.1/common/conflex.c 2010-01-20 17:11:37.000000000 +0100
@@ -783,6 +783,8 @@ intern(char *atom, enum dhcp_token dfv)
diff -up dhcp-4.2.0/common/conflex.c.options dhcp-4.2.0/common/conflex.c
--- dhcp-4.2.0/common/conflex.c.options 2010-03-24 22:49:47.000000000 +0100
+++ dhcp-4.2.0/common/conflex.c 2010-07-21 13:29:05.000000000 +0200
@@ -803,6 +803,8 @@ intern(char *atom, enum dhcp_token dfv)
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
return BOUND;
@ -373,10 +373,10 @@ diff -up dhcp-4.1.1/common/conflex.c.options dhcp-4.1.1/common/conflex.c
break;
case 'c':
if (!strcasecmp(atom + 1, "ase"))
diff -up dhcp-4.1.1/includes/dhcpd.h.options dhcp-4.1.1/includes/dhcpd.h
--- dhcp-4.1.1/includes/dhcpd.h.options 2010-01-20 17:11:37.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-01-20 17:11:37.000000000 +0100
@@ -1080,6 +1080,9 @@ struct client_config {
diff -up dhcp-4.2.0/includes/dhcpd.h.options dhcp-4.2.0/includes/dhcpd.h
--- dhcp-4.2.0/includes/dhcpd.h.options 2010-06-01 19:29:59.000000000 +0200
+++ dhcp-4.2.0/includes/dhcpd.h 2010-07-21 13:29:05.000000000 +0200
@@ -1119,6 +1119,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. */
@ -386,14 +386,16 @@ diff -up dhcp-4.1.1/includes/dhcpd.h.options dhcp-4.1.1/includes/dhcpd.h
};
/* Per-interface state used in the dhcp client... */
diff -up dhcp-4.1.1/includes/dhctoken.h.options dhcp-4.1.1/includes/dhctoken.h
--- dhcp-4.1.1/includes/dhctoken.h.options 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/includes/dhctoken.h 2010-01-20 17:11:37.000000000 +0100
@@ -353,6 +353,7 @@ enum dhcp_token {
TEMPORARY = 656,
PREFIX6 = 657,
FIXED_PREFIX6 = 658,
+ BOOTP_BROADCAST_ALWAYS = 659,
CONFLICT_DONE = 660
diff -up dhcp-4.2.0/includes/dhctoken.h.options dhcp-4.2.0/includes/dhctoken.h
--- dhcp-4.2.0/includes/dhctoken.h.options 2010-02-17 21:33:55.000000000 +0100
+++ dhcp-4.2.0/includes/dhctoken.h 2010-07-21 13:33:08.000000000 +0200
@@ -357,7 +357,8 @@ enum dhcp_token {
CONFLICT_DONE = 660,
AUTO_PARTNER_DOWN = 661,
GETHOSTNAME = 662,
- REWIND = 663
+ REWIND = 663,
+ BOOTP_BROADCAST_ALWAYS = 664
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1-P1/common/parse.c.parse_date dhcp-4.1.1-P1/common/parse.c
--- dhcp-4.1.1-P1/common/parse.c.parse_date 2010-06-11 14:25:10.000000000 +0200
+++ dhcp-4.1.1-P1/common/parse.c 2010-06-11 15:00:08.000000000 +0200
diff -up dhcp-4.2.0/common/parse.c.parse_date dhcp-4.2.0/common/parse.c
--- dhcp-4.2.0/common/parse.c.parse_date 2010-07-21 16:11:36.000000000 +0200
+++ dhcp-4.2.0/common/parse.c 2010-07-21 16:23:10.000000000 +0200
@@ -913,48 +913,46 @@ parse_date_core(cfile)
212, 243, 273, 304, 334 };

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/includes/dhcpd.h.paths dhcp-4.1.1/includes/dhcpd.h
--- dhcp-4.1.1/includes/dhcpd.h.paths 2010-01-20 17:21:09.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-01-20 17:21:09.000000000 +0100
@@ -1342,15 +1342,15 @@ typedef unsigned char option_mask [16];
diff -up dhcp-4.2.0/includes/dhcpd.h.paths dhcp-4.2.0/includes/dhcpd.h
--- dhcp-4.2.0/includes/dhcpd.h.paths 2010-07-21 13:55:42.000000000 +0200
+++ dhcp-4.2.0/includes/dhcpd.h 2010-07-21 14:29:57.000000000 +0200
@@ -1390,15 +1390,15 @@ typedef unsigned char option_mask [16];
#else /* !DEBUG */
#ifndef _PATH_DHCPD_CONF
@ -20,7 +20,7 @@ diff -up dhcp-4.1.1/includes/dhcpd.h.paths dhcp-4.1.1/includes/dhcpd.h
#endif
#ifndef _PATH_DHCPD_PID
@@ -1364,7 +1364,7 @@ typedef unsigned char option_mask [16];
@@ -1412,7 +1412,7 @@ typedef unsigned char option_mask [16];
#endif /* DEBUG */
#ifndef _PATH_DHCLIENT_CONF
@ -29,7 +29,7 @@ diff -up dhcp-4.1.1/includes/dhcpd.h.paths dhcp-4.1.1/includes/dhcpd.h
#endif
#ifndef _PATH_DHCLIENT_SCRIPT
@@ -1380,11 +1380,11 @@ typedef unsigned char option_mask [16];
@@ -1428,11 +1428,11 @@ typedef unsigned char option_mask [16];
#endif
#ifndef _PATH_DHCLIENT_DB

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhclient.c.ifup dhcp-4.1.1/client/dhclient.c
--- dhcp-4.1.1/client/dhclient.c.ifup 2010-01-20 17:13:46.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:13:46.000000000 +0100
@@ -476,9 +476,81 @@ main(int argc, char **argv) {
diff -up dhcp-4.2.0/client/dhclient.c.ifup dhcp-4.2.0/client/dhclient.c
--- dhcp-4.2.0/client/dhclient.c.ifup 2010-07-21 13:30:10.000000000 +0200
+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 13:37:03.000000000 +0200
@@ -497,9 +497,81 @@ main(int argc, char **argv) {
kill(oldpid, SIGTERM);
}
fclose(pidfd);

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhc6.c.release6-elapsed dhcp-4.1.1/client/dhc6.c
--- dhcp-4.1.1/client/dhc6.c.release6-elapsed 2010-04-19 11:55:59.000000000 +0200
+++ dhcp-4.1.1/client/dhc6.c 2010-04-19 12:00:00.000000000 +0200
@@ -2174,7 +2174,7 @@ do_release6(void *input)
diff -up dhcp-4.2.0/client/dhc6.c.release6-elapsed dhcp-4.2.0/client/dhc6.c
--- dhcp-4.2.0/client/dhc6.c.release6-elapsed 2010-07-21 16:19:52.000000000 +0200
+++ dhcp-4.2.0/client/dhc6.c 2010-07-21 16:21:14.000000000 +0200
@@ -2177,7 +2177,7 @@ do_release6(void *input)
struct client_state *client;
struct data_string ds;
int send_ret;
@ -10,7 +10,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.release6-elapsed dhcp-4.1.1/client/dhc6.c
client = input;
@@ -2194,6 +2194,14 @@ do_release6(void *input)
@@ -2197,6 +2197,14 @@ do_release6(void *input)
client->start_time.tv_usec = cur_tv.tv_usec;
}
@ -25,7 +25,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.release6-elapsed dhcp-4.1.1/client/dhc6.c
/*
* Don't use unicast as we don't know if we still have an
* available address with enough scope.
@@ -2210,6 +2218,18 @@ do_release6(void *input)
@@ -2213,6 +2221,18 @@ do_release6(void *input)
ds.buffer->data[0] = DHCPV6_RELEASE;
memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
--- dhcp-4.1.1/client/dhc6.c.retransmission 2010-03-25 18:32:17.000000000 +0100
+++ dhcp-4.1.1/client/dhc6.c 2010-03-25 18:33:54.000000000 +0100
@@ -354,7 +354,7 @@ dhc6_retrans_init(struct client_state *c
diff -up dhcp-4.2.0/client/dhc6.c.retransmission dhcp-4.2.0/client/dhc6.c
--- dhcp-4.2.0/client/dhc6.c.retransmission 2010-07-21 16:18:51.000000000 +0200
+++ dhcp-4.2.0/client/dhc6.c 2010-07-21 16:19:52.000000000 +0200
@@ -357,7 +357,7 @@ dhc6_retrans_init(struct client_state *c
static void
dhc6_retrans_advance(struct client_state *client)
{
@ -10,7 +10,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
/* elapsed = cur - start */
elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
@@ -371,6 +371,8 @@ dhc6_retrans_advance(struct client_state
@@ -374,6 +374,8 @@ dhc6_retrans_advance(struct client_state
elapsed.tv_sec += 1;
elapsed.tv_usec -= 1000000;
}
@ -19,7 +19,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
/*
* RT for each subsequent message transmission is based on the previous
@@ -408,13 +410,10 @@ dhc6_retrans_advance(struct client_state
@@ -411,13 +413,10 @@ dhc6_retrans_advance(struct client_state
elapsed.tv_usec -= 1000000;
}
if (elapsed.tv_sec >= client->MRD) {
@ -37,7 +37,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
}
client->txcount++;
}
@@ -1502,7 +1501,7 @@ do_init6(void *input)
@@ -1505,7 +1504,7 @@ do_init6(void *input)
elapsed.tv_usec += 1000000;
}
/* Check if finished (-1 argument). */
@ -46,7 +46,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
log_info("Max retransmission duration exceeded.");
client->state = S_STOPPED;
if (client->active_lease != NULL) {
@@ -1922,7 +1921,7 @@ do_info_request6(void *input)
@@ -1925,7 +1924,7 @@ do_info_request6(void *input)
elapsed.tv_usec += 1000000;
}
/* Check if finished (-1 argument). */
@ -55,7 +55,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
log_info("Max retransmission duration exceeded.");
exit(2);
}
@@ -2043,7 +2042,7 @@ do_confirm6(void *input)
@@ -2046,7 +2045,7 @@ do_confirm6(void *input)
elapsed.tv_sec -= 1;
elapsed.tv_usec += 1000000;
}
@ -64,7 +64,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.retransmission dhcp-4.1.1/client/dhc6.c
log_info("Max retransmission duration exceeded.");
start_bound(client);
return;
@@ -3290,7 +3289,7 @@ do_select6(void *input)
@@ -3293,7 +3292,7 @@ do_select6(void *input)
elapsed.tv_sec -= 1;
elapsed.tv_usec += 1000000;
}

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
--- dhcp-4.1.1/client/dhc6.c.sendDecline 2009-07-25 00:04:51.000000000 +0200
+++ dhcp-4.1.1/client/dhc6.c 2010-04-19 11:42:42.000000000 +0200
diff -up dhcp-4.2.0/client/dhc6.c.sendDecline dhcp-4.2.0/client/dhc6.c
--- dhcp-4.2.0/client/dhc6.c.sendDecline 2009-11-20 02:48:58.000000000 +0100
+++ dhcp-4.2.0/client/dhc6.c 2010-07-21 16:18:51.000000000 +0200
@@ -95,6 +95,8 @@ void do_select6(void *input);
void do_refresh6(void *input);
static void do_release6(void *input);
@ -10,7 +10,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
static void start_informed(struct client_state *client);
void informed_handler(struct packet *packet, struct client_state *client);
void bound_handler(struct packet *packet, struct client_state *client);
@@ -2137,6 +2139,7 @@ start_release6(struct client_state *clie
@@ -2140,6 +2142,7 @@ start_release6(struct client_state *clie
cancel_timeout(do_select6, client);
cancel_timeout(do_refresh6, client);
cancel_timeout(do_release6, client);
@ -18,7 +18,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
client->state = S_STOPPED;
/*
@@ -2787,6 +2790,7 @@ dhc6_check_reply(struct client_state *cl
@@ -2790,6 +2793,7 @@ dhc6_check_reply(struct client_state *cl
break;
case S_STOPPED:
@ -26,7 +26,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
action = dhc6_stop_action;
break;
@@ -2888,6 +2892,7 @@ dhc6_check_reply(struct client_state *cl
@@ -2891,6 +2895,7 @@ dhc6_check_reply(struct client_state *cl
break;
case S_STOPPED:
@ -34,7 +34,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
/* Nothing critical to do at this stage. */
break;
@@ -3930,17 +3935,23 @@ reply_handler(struct packet *packet, str
@@ -3933,17 +3938,23 @@ reply_handler(struct packet *packet, str
cancel_timeout(do_select6, client);
cancel_timeout(do_refresh6, client);
cancel_timeout(do_release6, client);
@ -66,7 +66,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
return;
}
@@ -4463,7 +4474,11 @@ start_bound(struct client_state *client)
@@ -4470,7 +4481,11 @@ start_bound(struct client_state *client)
oldia, oldaddr);
dhc6_marshall_values("new_", client, lease, ia, addr);
@ -79,7 +79,7 @@ diff -up dhcp-4.1.1/client/dhc6.c.sendDecline dhcp-4.1.1/client/dhc6.c
}
/* XXX: maybe we should loop on the old values instead? */
@@ -4509,6 +4524,151 @@ start_bound(struct client_state *client)
@@ -4516,6 +4531,151 @@ start_bound(struct client_state *client)
dhc6_check_times(client);
}

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.1/server/bootp.c.unicast dhcp-4.1.1/server/bootp.c
--- dhcp-4.1.1/server/bootp.c.unicast 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/server/bootp.c 2010-01-20 17:15:22.000000000 +0100
diff -up dhcp-4.2.0/server/bootp.c.unicast dhcp-4.2.0/server/bootp.c
--- dhcp-4.2.0/server/bootp.c.unicast 2009-11-20 02:49:03.000000000 +0100
+++ dhcp-4.2.0/server/bootp.c 2010-07-21 13:40:25.000000000 +0200
@@ -58,6 +58,7 @@ void bootp (packet)
char msgbuf [1024];
int ignorep;
@ -32,10 +32,10 @@ diff -up dhcp-4.1.1/server/bootp.c.unicast dhcp-4.1.1/server/bootp.c
/* If it comes from a client that already knows its address
and is not requesting a broadcast response, and we can
diff -up dhcp-4.1.1/server/dhcp.c.unicast dhcp-4.1.1/server/dhcp.c
--- dhcp-4.1.1/server/dhcp.c.unicast 2009-07-24 19:22:27.000000000 +0200
+++ dhcp-4.1.1/server/dhcp.c 2010-01-20 17:15:22.000000000 +0100
@@ -4113,6 +4113,7 @@ int locate_network (packet)
diff -up dhcp-4.2.0/server/dhcp.c.unicast dhcp-4.2.0/server/dhcp.c
--- dhcp-4.2.0/server/dhcp.c.unicast 2010-06-01 19:29:59.000000000 +0200
+++ dhcp-4.2.0/server/dhcp.c 2010-07-21 13:40:25.000000000 +0200
@@ -4185,6 +4185,7 @@ int locate_network (packet)
struct data_string data;
struct subnet *subnet = (struct subnet *)0;
struct option_cache *oc;
@ -43,7 +43,7 @@ diff -up dhcp-4.1.1/server/dhcp.c.unicast dhcp-4.1.1/server/dhcp.c
/* See if there's a Relay Agent Link Selection Option, or a
* Subnet Selection Option. The Link-Select and Subnet-Select
@@ -4128,12 +4129,24 @@ int locate_network (packet)
@@ -4200,12 +4201,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) {
@ -73,7 +73,7 @@ diff -up dhcp-4.1.1/server/dhcp.c.unicast dhcp-4.1.1/server/dhcp.c
}
/* If there's an option indicating link connection, and it's valid,
@@ -4156,7 +4169,10 @@ int locate_network (packet)
@@ -4228,7 +4241,10 @@ int locate_network (packet)
data_string_forget (&data, MDL);
} else {
ia.len = 4;
@ -85,7 +85,7 @@ diff -up dhcp-4.1.1/server/dhcp.c.unicast dhcp-4.1.1/server/dhcp.c
}
/* If we know the subnet on which the IP address lives, use it. */
@@ -4164,7 +4180,10 @@ int locate_network (packet)
@@ -4236,7 +4252,10 @@ int locate_network (packet)
shared_network_reference (&packet -> shared_network,
subnet -> shared_network, MDL);
subnet_dereference (&subnet, MDL);

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.1/common/bpf.c.xen dhcp-4.1.1/common/bpf.c
--- dhcp-4.1.1/common/bpf.c.xen 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/bpf.c 2010-01-20 17:18:56.000000000 +0100
@@ -482,7 +482,7 @@ ssize_t receive_packet (interface, buf,
diff -up dhcp-4.2.0/common/bpf.c.xen dhcp-4.2.0/common/bpf.c
--- dhcp-4.2.0/common/bpf.c.xen 2009-11-20 02:48:59.000000000 +0100
+++ dhcp-4.2.0/common/bpf.c 2010-07-21 13:51:24.000000000 +0200
@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf,
offset = decode_udp_ip_header (interface,
interface -> rbuf,
interface -> rbuf_offset,
@ -10,10 +10,10 @@ diff -up dhcp-4.1.1/common/bpf.c.xen dhcp-4.1.1/common/bpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff -up dhcp-4.1.1/common/dlpi.c.xen dhcp-4.1.1/common/dlpi.c
--- dhcp-4.1.1/common/dlpi.c.xen 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/common/dlpi.c 2010-01-20 17:18:56.000000000 +0100
@@ -691,7 +691,7 @@ ssize_t receive_packet (interface, buf,
diff -up dhcp-4.2.0/common/dlpi.c.xen dhcp-4.2.0/common/dlpi.c
--- dhcp-4.2.0/common/dlpi.c.xen 2009-11-20 02:49:00.000000000 +0100
+++ dhcp-4.2.0/common/dlpi.c 2010-07-21 13:51:24.000000000 +0200
@@ -694,7 +694,7 @@ ssize_t receive_packet (interface, buf,
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
@ -22,9 +22,9 @@ diff -up dhcp-4.1.1/common/dlpi.c.xen dhcp-4.1.1/common/dlpi.c
/*
* If the IP or UDP checksum was bad, skip the packet...
diff -up dhcp-4.1.1/common/lpf.c.xen dhcp-4.1.1/common/lpf.c
--- dhcp-4.1.1/common/lpf.c.xen 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/common/lpf.c 2010-01-20 17:18:56.000000000 +0100
diff -up dhcp-4.2.0/common/lpf.c.xen dhcp-4.2.0/common/lpf.c
--- dhcp-4.2.0/common/lpf.c.xen 2009-07-23 20:52:19.000000000 +0200
+++ dhcp-4.2.0/common/lpf.c 2010-07-21 13:51:24.000000000 +0200
@@ -29,18 +29,33 @@
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
@ -123,7 +123,7 @@ diff -up dhcp-4.1.1/common/lpf.c.xen dhcp-4.1.1/common/lpf.c
int result;
int fudge;
@@ -312,15 +344,7 @@ ssize_t send_packet (interface, packet,
@@ -315,15 +347,7 @@ ssize_t send_packet (interface, packet,
(unsigned char *)raw, len);
memcpy (buf + ibufp, raw, len);
@ -140,7 +140,7 @@ diff -up dhcp-4.1.1/common/lpf.c.xen dhcp-4.1.1/common/lpf.c
if (result < 0)
log_error ("send_packet: %m");
return result;
@@ -337,14 +361,35 @@ ssize_t receive_packet (interface, buf,
@@ -340,14 +364,35 @@ ssize_t receive_packet (interface, buf,
{
int length = 0;
int offset = 0;
@ -177,7 +177,7 @@ diff -up dhcp-4.1.1/common/lpf.c.xen dhcp-4.1.1/common/lpf.c
bufix = 0;
/* Decode the physical header... */
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
@@ -361,7 +406,7 @@ ssize_t receive_packet (interface, buf,
@@ -364,7 +409,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
@ -186,10 +186,10 @@ diff -up dhcp-4.1.1/common/lpf.c.xen dhcp-4.1.1/common/lpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.1/common/nit.c.xen dhcp-4.1.1/common/nit.c
--- dhcp-4.1.1/common/nit.c.xen 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/nit.c 2010-01-20 17:18:56.000000000 +0100
@@ -366,7 +366,7 @@ ssize_t receive_packet (interface, buf,
diff -up dhcp-4.2.0/common/nit.c.xen dhcp-4.2.0/common/nit.c
--- dhcp-4.2.0/common/nit.c.xen 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/nit.c 2010-07-21 13:51:24.000000000 +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,
@ -198,9 +198,9 @@ diff -up dhcp-4.1.1/common/nit.c.xen dhcp-4.1.1/common/nit.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.1/common/packet.c.xen dhcp-4.1.1/common/packet.c
--- dhcp-4.1.1/common/packet.c.xen 2009-07-23 21:02:09.000000000 +0200
+++ dhcp-4.1.1/common/packet.c 2010-01-20 17:18:56.000000000 +0100
diff -up dhcp-4.2.0/common/packet.c.xen dhcp-4.2.0/common/packet.c
--- dhcp-4.2.0/common/packet.c.xen 2009-07-23 20:52:20.000000000 +0200
+++ dhcp-4.2.0/common/packet.c 2010-07-21 13:51:24.000000000 +0200
@@ -211,7 +211,7 @@ ssize_t
decode_udp_ip_header(struct interface_info *interface,
unsigned char *buf, unsigned bufix,
@ -219,10 +219,10 @@ diff -up dhcp-4.1.1/common/packet.c.xen dhcp-4.1.1/common/packet.c
udp_packets_bad_checksum++;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
diff -up dhcp-4.1.1/common/upf.c.xen dhcp-4.1.1/common/upf.c
--- dhcp-4.1.1/common/upf.c.xen 2009-07-25 00:04:52.000000000 +0200
+++ dhcp-4.1.1/common/upf.c 2010-01-20 17:18:56.000000000 +0100
@@ -317,7 +317,7 @@ ssize_t receive_packet (interface, buf,
diff -up dhcp-4.2.0/common/upf.c.xen dhcp-4.2.0/common/upf.c
--- dhcp-4.2.0/common/upf.c.xen 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.0/common/upf.c 2010-07-21 13:51:24.000000000 +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,
@ -231,10 +231,10 @@ diff -up dhcp-4.1.1/common/upf.c.xen dhcp-4.1.1/common/upf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.1/includes/dhcpd.h.xen dhcp-4.1.1/includes/dhcpd.h
--- dhcp-4.1.1/includes/dhcpd.h.xen 2010-01-20 17:18:56.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-01-20 17:18:56.000000000 +0100
@@ -2646,7 +2646,7 @@ ssize_t decode_hw_header PROTO ((struct
diff -up dhcp-4.2.0/includes/dhcpd.h.xen dhcp-4.2.0/includes/dhcpd.h
--- dhcp-4.2.0/includes/dhcpd.h.xen 2010-07-21 13:38:31.000000000 +0200
+++ dhcp-4.2.0/includes/dhcpd.h 2010-07-21 13:51:24.000000000 +0200
@@ -2773,7 +2773,7 @@ ssize_t decode_hw_header PROTO ((struct
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,

132
dhcp.spec
View File

@ -4,18 +4,10 @@
# Where dhcp configuration files are stored
%global dhcpconfdir %{_sysconfdir}/dhcp
# Patch version
%global patchver P1
%global VERSION %{version}-%{patchver}
# LDAP patch version
%global ldappatchver %{version}-2
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.1.1
Release: 26.%{patchver}%{?dist}
Version: 4.2.0
Release: 1%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was.
@ -24,44 +16,43 @@ Epoch: 12
License: ISC
Group: System Environment/Daemons
URL: http://isc.org/products/DHCP/
Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{VERSION}.tar.gz
Source1: http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-%{ldappatchver}.tar.gz
Source2: dhcpd.init
Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
Source1: dhcpd.init
Source2: dhcpd6.init
Source3: dhcrelay.init
Source4: dhclient-script
Source5: README.dhclient.d
Source6: 10-dhclient
Source7: 56dhclient
Source8: dhcpd6.init
Patch0: %{name}-4.1.1-errwarn-message.patch
Patch1: %{name}-4.1.1-options.patch
Patch2: %{name}-4.1.1-release-by-ifup.patch
Patch3: %{name}-4.1.1-dhclient-decline-backoff.patch
Patch4: %{name}-4.1.1-unicast-bootp.patch
Patch5: %{name}-4.1.1-failover-ports.patch
Patch6: %{name}-4.1.1-dhclient-usage.patch
Patch7: %{name}-4.1.1-default-requested-options.patch
Patch8: %{name}-4.1.1-xen-checksum.patch
Patch9: %{name}-4.1.1-dhclient-anycast.patch
Patch10: %{name}-4.1.1-manpages.patch
Patch11: %{name}-4.1.1-paths.patch
Patch12: %{name}-4.1.1-CLOEXEC.patch
Patch13: %{name}-4.1.1-inherit-leases.patch
Patch14: %{name}-4.1.1-garbage-chars.patch
Patch15: %{name}-4.1.1-invalid-dhclient-conf.patch
Patch16: %{name}-4.1.1-missing-ipv6-not-fatal.patch
Patch17: %{name}-4.1.1-IFNAMSIZ.patch
Patch18: %{name}-4.1.1-add_timeout_when_NULL.patch
Patch19: %{name}-4.1.1-64_bit_lease_parse.patch
Patch20: %{name}-4.1.1-capability.patch
Patch21: %{name}-4.1.1-logpid.patch
Patch22: %{name}-4.1.1-UseMulticast.patch
Patch23: %{name}-4.1.1-sendDecline.patch
Patch24: %{name}-4.1.1-retransmission.patch
Patch25: %{name}-4.1.1-release6-elapsed.patch
Patch26: %{name}-4.1.1-initialization-delay.patch
Patch27: %{name}-4.1.1-P1-parse_date.patch
Patch0: dhcp-4.2.0-errwarn-message.patch
Patch1: dhcp-4.2.0-options.patch
Patch2: dhcp-4.2.0-release-by-ifup.patch
Patch3: dhcp-4.2.0-dhclient-decline-backoff.patch
Patch4: dhcp-4.2.0-unicast-bootp.patch
Patch5: dhcp-4.2.0-ldap.patch
Patch6: dhcp-4.2.0-dhclient-usage.patch
Patch7: dhcp-4.2.0-default-requested-options.patch
Patch8: dhcp-4.2.0-xen-checksum.patch
Patch10: dhcp-4.2.0-manpages.patch
Patch11: dhcp-4.2.0-paths.patch
Patch12: dhcp-4.2.0-CLOEXEC.patch
Patch13: dhcp-4.2.0-inherit-leases.patch
Patch14: dhcp-4.2.0-garbage-chars.patch
Patch15: dhcp-4.2.0-invalid-dhclient-conf.patch
Patch16: dhcp-4.2.0-missing-ipv6-not-fatal.patch
Patch17: dhcp-4.2.0-IFNAMSIZ.patch
Patch18: dhcp-4.2.0-add_timeout_when_NULL.patch
Patch19: dhcp-4.2.0-64_bit_lease_parse.patch
Patch20: dhcp-4.2.0-capability.patch
Patch21: dhcp-4.2.0-logpid.patch
Patch22: dhcp-4.2.0-UseMulticast.patch
Patch23: dhcp-4.2.0-sendDecline.patch
Patch24: dhcp-4.2.0-retransmission.patch
Patch25: dhcp-4.2.0-release6-elapsed.patch
Patch26: dhcp-4.2.0-initialization-delay.patch
Patch27: dhcp-4.2.0-parse_date.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
@ -126,11 +117,7 @@ Header files and API documentation for using the ISC DHCP libraries. The
libdhcpctl and libomapi static libraries are also included in this package.
%prep
%setup -q -n dhcp-%{VERSION}
%setup -T -D -a 1 -n dhcp-%{VERSION}
# Add in LDAP support
%{__patch} -p1 < ldap-for-dhcp-%{ldappatchver}/dhcp-%{version}-ldap.patch
%setup -q
# Replace the standard ISC warning message about requesting help with an
# explanation that this is a patched build of ISC DHCP and bugs should be
@ -152,12 +139,8 @@ libdhcpctl and libomapi static libraries are also included in this package.
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19146])
%patch4 -p1 -b .unicast
# Use the following IANA-registered failover ports:
# dhcp-failover 647/tcp
# dhcp-failover 647/udp
# dhcp-failover 847/tcp
# dhcp-failover 847/udp
%patch5 -p1 -b .failover-ports
# Search for liblber in configure.ac (#564810)
%patch5 -p1 -b .ldap
# Update the usage screen for dhclient(8) indicating new options
# Use printf() rather than log_info() to display the information
@ -171,9 +154,6 @@ libdhcpctl and libomapi static libraries are also included in this package.
# Handle Xen partial UDP checksums
%patch8 -p1 -b .xen
# Add anycast support to dhclient (for OLPC)
%patch9 -p1 -b .anycast
# Patch man page contents
%patch10 -p1 -b .man
@ -199,6 +179,7 @@ libdhcpctl and libomapi static libraries are also included in this package.
%patch16 -p1 -b .noipv6
# Read only up to IFNAMSIZ characters for the interface name in dhcpd (#441524)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19617])
%patch17 -p1 -b .ifnamsiz
# Handle cases in add_timeout() where the function is called with a NULL
@ -244,9 +225,6 @@ libdhcpctl and libomapi static libraries are also included in this package.
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21501])
%patch27 -p1 -b .parse_date
# Copy in documentation and example scripts for LDAP patch to dhcpd
%{__install} -p -m 0755 ldap-for-dhcp-%{ldappatchver}/dhcpd-conf-to-ldap contrib/
# Copy in the Fedora/RHEL dhclient script
%{__install} -p -m 0755 %{SOURCE4} client/scripts/linux
%{__install} -p -m 0644 %{SOURCE5} .
@ -256,7 +234,7 @@ libdhcpctl and libomapi static libraries are also included in this package.
# package).
%{__cp} -pR contrib __fedora_contrib
pushd __fedora_contrib
%{__chmod} -x 3.0b1-lease-convert dhclient-tz-exithook.sh dhcpd-conf-to-ldap
%{__chmod} -x 3.0b1-lease-convert dhclient-tz-exithook.sh ldap/dhcpd-conf-to-ldap
%{__chmod} -x sethostname.sh solaris.init
%{__mv} ms2isc/Registry.pm ms2isc/Registry.perlmodule
%{__rm} -f dhcp.spec
@ -268,12 +246,12 @@ pushd __fedora_contrib
popd
# Filter false positive perl requires (all of them)
%{__cat} << EOF > %{name}-req
%{__cat} << EOF > dhcp-req
#!/bin/sh
%{__perl_requires} \
| %{__grep} -v 'perl('
EOF
%global __perl_requires %{_builddir}/%{name}-%{VERSION}/%{name}-req
%global __perl_requires %{_builddir}/dhcp-%{version}/dhcp-req
%{__chmod} +x %{__perl_requires}
# Replace @PRODUCTNAME@
@ -301,7 +279,6 @@ autoreconf --verbose --force --install
CFLAGS="%{optflags} -fno-strict-aliasing -fPIC -D_GNU_SOURCE" \
%configure \
--enable-dhcpv6 \
--with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \
--with-srv6-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd6.leases \
--with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \
@ -329,10 +306,10 @@ CFLAGS="%{optflags} -fno-strict-aliasing -fPIC -D_GNU_SOURCE" \
%{__install} -p -m 0755 client/scripts/linux %{buildroot}/sbin/dhclient-script
# Install init scripts
%{__mkdir} -p %{buildroot}%{_initrddir}
%{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/dhcpd
%{__install} -p -m 0755 %{SOURCE8} %{buildroot}%{_initrddir}/dhcpd6
%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/dhcrelay
%{__mkdir} -p %{buildroot}%{_initddir}
%{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_initddir}/dhcpd
%{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_initddir}/dhcpd6
%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_initddir}/dhcrelay
# Start empty lease databases
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhcpd/
@ -387,7 +364,7 @@ EOF
# Install dhcp.schema for LDAP configuration
%{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap/schema
%{__install} -p -m 0644 -D ldap-for-dhcp-%{ldappatchver}/dhcp.schema \
%{__install} -p -m 0644 -D contrib/ldap/dhcp.schema \
%{buildroot}%{_sysconfdir}/openldap/schema
# Install empty directory for dhclient.d scripts
@ -464,9 +441,9 @@ fi
%files
%defattr(-,root,root,-)
%doc LICENSE README ldap-for-dhcp-%{ldappatchver}/README.ldap
%doc RELNOTES dhcpd.conf.sample dhcpd6.conf.sample doc/IANA-arp-parameters doc/api+protocol
%doc doc/*.txt __fedora_contrib/* ldap-for-dhcp-%{ldappatchver}/*.txt
%doc LICENSE README RELNOTES dhcpd.conf.sample dhcpd6.conf.sample
%doc doc/IANA-arp-parameters doc/api+protocol doc/References.txt
%doc __fedora_contrib/*
%dir %{_localstatedir}/lib/dhcpd
%attr(0750,root,root) %dir %{dhcpconfdir}
%verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/dhcpd/dhcpd.leases
@ -477,9 +454,9 @@ fi
%config(noreplace) %{dhcpconfdir}/dhcpd.conf
%config(noreplace) %{dhcpconfdir}/dhcpd6.conf
%config(noreplace) %{_sysconfdir}/openldap/schema/dhcp.schema
%{_initrddir}/dhcpd
%{_initrddir}/dhcpd6
%{_initrddir}/dhcrelay
%{_initddir}/dhcpd
%{_initddir}/dhcpd6
%{_initddir}/dhcrelay
%{_bindir}/omshell
%{_sbindir}/dhcpd
%{_sbindir}/dhcrelay
@ -522,6 +499,9 @@ fi
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
%changelog
* Wed Jul 21 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.0-1
- 4.2.0: includes ldap-for-dhcp
* Mon Jul 12 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-26.P1
- Add LICENSE file to dhclient subpackage.
@ -532,10 +512,8 @@ fi
- Fix parsing of date (#514828)
* Wed Jun 03 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-23.P1
- 4.1.1-P1 (pair of bug fixes including one for a security related bug).
- Fix for CVE-2010-2156 (#601405)
- 4.1.1-P1: pair of bug fixes including one for CVE-2010-2156 (#601405).
- Compile with -fno-strict-aliasing
- N-V-R (copied from bind.spec): Name-Version-Release.Patch.dist
* Mon May 03 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-22
- Fix the initialization-delay.patch (#587070)

View File

@ -1,2 +1,3 @@
9fa2f64826c969a55fd28263e4b6cad6 ldap-for-dhcp-4.1.1-2.tar.gz
ee390a35687dd75dbfc32c856c0938d1 dhcp-4.1.1-P1.tar.gz
83abd7c4f9c24d8dd024ca5a71380c0a dhcp-4.2.0.tar.gz