- Upgraded to ISC dhcp-4.1.1

This commit is contained in:
Jiří Popelka 2010-01-20 17:07:47 +00:00
parent 3728cf43b7
commit 9538db2fbf
31 changed files with 375 additions and 565 deletions

View File

@ -1,2 +1,2 @@
dhcp-4.1.0p1.tar.gz
ldap-for-dhcp-4.1.0-5.tar.gz
dhcp-4.1.1.tar.gz
ldap-for-dhcp-4.1.1-1.tar.gz

View File

@ -1,12 +0,0 @@
diff -up dhcp-4.1.0/server/dhcp.c.CVE-2009-1892 dhcp-4.1.0/server/dhcp.c
--- dhcp-4.1.0/server/dhcp.c.CVE-2009-1892 2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/dhcp.c 2009-08-05 11:34:07.000000000 -1000
@@ -1755,6 +1755,8 @@ void ack_lease (packet, lease, offer, wh
host_reference (&host, h, MDL);
}
if (!host) {
+ if (hp)
+ host_dereference (&hp, MDL);
find_hosts_by_haddr (&hp,
packet -> raw -> htype,
packet -> raw -> chaddr,

View File

@ -1,37 +0,0 @@
diff -up dhcp-4.1.0/common/lpf.c.memory dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.memory 2008-03-18 08:28:14.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c 2009-01-06 07:57:54.000000000 -1000
@@ -247,6 +247,7 @@ static void lpf_tr_filter_setup (info)
struct interface_info *info;
{
struct sock_fprog p;
+ memset(&p,'\0', sizeof(struct sock_fprog));
/* Set up the bpf filter program structure. This is defined in
bpf.c */
diff -up dhcp-4.1.0/common/packet.c.memory dhcp-4.1.0/common/packet.c
--- dhcp-4.1.0/common/packet.c.memory 2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/common/packet.c 2009-01-06 07:57:54.000000000 -1000
@@ -135,6 +135,7 @@ void assemble_udp_ip_header (interface,
struct ip ip;
struct udphdr udp;
+ memset( &ip, '\0', sizeof ip);
/* Fill out the IP header */
IP_V_SET (&ip, 4);
IP_HL_SET (&ip, 20);
diff -up dhcp-4.1.0/minires/ns_name.c.memory dhcp-4.1.0/minires/ns_name.c
--- dhcp-4.1.0/minires/ns_name.c.memory 2005-03-17 10:15:17.000000000 -1000
+++ dhcp-4.1.0/minires/ns_name.c 2009-01-06 07:57:54.000000000 -1000
@@ -71,6 +71,11 @@ ns_name_ntop(const u_char *src, char *ds
dn = dst;
eom = dst + dstsiz;
+ if (dn >= eom) {
+ errno = EMSGSIZE;
+ return (-1);
+ }
+
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */

View File

@ -1,51 +0,0 @@
diff -up dhcp-4.1.0/common/discover.c.noipv6 dhcp-4.1.0/common/discover.c
--- dhcp-4.1.0/common/discover.c.noipv6 2009-02-18 10:44:20.000000000 -1000
+++ dhcp-4.1.0/common/discover.c 2009-02-18 10:48:27.000000000 -1000
@@ -443,15 +443,19 @@ begin_iface_scan(struct iface_conf_list
}
#ifdef DHCPv6
- ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
- close(ifaces->sock);
- ifaces->sock = -1;
- fclose(ifaces->fp);
- ifaces->fp = NULL;
- return 0;
+ if (!access("/proc/net/if_inet6", R_OK)) {
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
+ if (ifaces->fp6 == NULL) {
+ log_error("Error opening '/proc/net/if_inet6' to "
+ "list IPv6 interfaces; %m");
+ close(ifaces->sock);
+ ifaces->sock = -1;
+ fclose(ifaces->fp);
+ ifaces->fp = NULL;
+ return 0;
+ }
+ } else {
+ ifaces->fp6 = NULL;
}
#endif
@@ -719,7 +723,7 @@ next_iface(struct iface_info *info, int
return 1;
}
#ifdef DHCPv6
- if (!(*err)) {
+ if (!(*err) && ifaces->fp6) {
return next_iface6(info, err, ifaces);
}
#endif
@@ -736,7 +740,8 @@ end_iface_scan(struct iface_conf_list *i
close(ifaces->sock);
ifaces->sock = -1;
#ifdef DHCPv6
- fclose(ifaces->fp6);
+ if (ifaces->fp6)
+ fclose(ifaces->fp6);
ifaces->fp6 = NULL;
#endif
}

View File

@ -1,96 +0,0 @@
diff -up dhcp-4.1.0/client/dhclient.c.validate dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.validate 2009-01-06 12:11:44.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 12:25:06.000000000 -1000
@@ -190,7 +190,7 @@ main(int argc, char **argv) {
} else if (!strcmp(argv[i], "-p")) {
if (++i == argc)
usage();
- local_port = htons(atoi(argv[i]));
+ local_port = validate_port(argv[i]);
log_debug("binding to user-specified port %d",
ntohs(local_port));
} else if (!strcmp(argv[i], "-d")) {
diff -up dhcp-4.1.0/common/inet.c.validate dhcp-4.1.0/common/inet.c
--- dhcp-4.1.0/common/inet.c.validate 2007-07-12 20:43:41.000000000 -1000
+++ dhcp-4.1.0/common/inet.c 2009-01-06 12:11:44.000000000 -1000
@@ -604,3 +604,20 @@ piaddrcidr(const struct iaddr *addr, uns
return ret;
}
+/* Check the port number specified */
+u_int16_t
+validate_port(char *port) {
+ u_int16_t local_port = 0;
+ int lower = 1;
+ int upper = 65535;
+
+ errno = 0;
+ local_port = strtol(port, NULL, 10);
+ if ((errno == ERANGE) || (errno == EINVAL))
+ log_fatal ("Invalid port number specification: %s", port);
+
+ if (local_port < lower || local_port > upper)
+ log_fatal("Port number specified is out of range (%d-%d).", lower, upper);
+
+ return htons(local_port);
+}
diff -up dhcp-4.1.0/includes/dhcpd.h.validate dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.validate 2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 12:11:44.000000000 -1000
@@ -65,6 +65,7 @@
#endif
#include <setjmp.h>
+#include <errno.h>
#include "cdefs.h"
#include "osdep.h"
@@ -2511,6 +2512,7 @@ isc_result_t free_iaddrcidrnetlist(struc
const char *piaddr PROTO ((struct iaddr));
char *piaddrmask(struct iaddr *, struct iaddr *);
char *piaddrcidr(const struct iaddr *, unsigned int);
+u_int16_t validate_port(char *port);
/* dhclient.c */
extern int nowait;
diff -up dhcp-4.1.0/relay/dhcrelay.c.validate dhcp-4.1.0/relay/dhcrelay.c
--- dhcp-4.1.0/relay/dhcrelay.c.validate 2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/relay/dhcrelay.c 2009-01-06 12:23:29.000000000 -1000
@@ -222,7 +222,7 @@ main(int argc, char **argv) {
} else if (!strcmp(argv[i], "-p")) {
if (++i == argc)
usage();
- local_port = htons(atoi (argv[i]));
+ local_port = validate_port(argv[i]);
log_debug("binding to user-specified port %d",
ntohs(local_port));
} else if (!strcmp(argv[i], "-c")) {
diff -up dhcp-4.1.0/server/dhcpd.c.validate dhcp-4.1.0/server/dhcpd.c
--- dhcp-4.1.0/server/dhcpd.c.validate 2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.c 2009-01-06 12:11:44.000000000 -1000
@@ -298,15 +298,7 @@ main(int argc, char **argv) {
if (!strcmp (argv [i], "-p")) {
if (++i == argc)
usage ();
- for (s = argv [i]; *s; s++)
- if (!isdigit ((unsigned char)*s))
- log_fatal ("%s: not a valid UDP port",
- argv [i]);
- status = atoi (argv [i]);
- if (status < 1 || status > 65535)
- log_fatal ("%s: not a valid UDP port",
- argv [i]);
- local_port = htons (status);
+ local_port = validate_port(argv[i]);
log_debug ("binding to user-specified port %d",
ntohs (local_port));
} else if (!strcmp (argv [i], "-f")) {
@@ -531,7 +523,7 @@ main(int argc, char **argv) {
if (!local_port)
{
if ((s = getenv ("DHCPD_PORT"))) {
- local_port = htons (atoi (s));
+ local_port = validate_port(s);
log_debug ("binding to environment-specified port %d",
ntohs (local_port));
} else {

View File

@ -1,12 +0,0 @@
diff -up dhcp-4.1.0p1/client/dhclient.c.logpid dhcp-4.1.0p1/client/dhclient.c
--- dhcp-4.1.0p1/client/dhclient.c.logpid 2009-12-14 11:39:47.000000000 +0100
+++ dhcp-4.1.0p1/client/dhclient.c 2009-12-14 11:41:17.000000000 +0100
@@ -148,7 +148,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.0/common/parse.c.64-bit_lease_parse dhcp-4.1.0/common/parse.c
--- dhcp-4.1.0/common/parse.c.64-bit_lease_parse 2008-10-08 06:26:42.000000000 -1000
+++ dhcp-4.1.0/common/parse.c 2009-07-09 16:22:05.000000000 -1000
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
@@ -905,8 +905,8 @@ TIME
parse_date_core(cfile)
struct parse *cfile;

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/client/clparse.c.cloexec dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.cloexec 2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c 2009-01-06 12:04:48.000000000 -1000
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
int token;
isc_result_t status;
@ -19,10 +19,10 @@ diff -up dhcp-4.1.0/client/clparse.c.cloexec dhcp-4.1.0/client/clparse.c
return;
cfile = NULL;
diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.cloexec 2009-01-06 11:56:10.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 12:04:01.000000000 -1000
@@ -135,11 +135,11 @@ main(int argc, char **argv) {
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
@@ -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
open a file the lowest available file descriptor is used. */
@ -37,7 +37,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -465,7 +465,7 @@ main(int argc, char **argv) {
@@ -467,7 +467,7 @@ main(int argc, char **argv) {
int e;
oldpid = 0;
@ -46,7 +46,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
@@ -507,7 +507,7 @@ main(int argc, char **argv) {
@@ -509,7 +509,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.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
@@ -532,7 +532,7 @@ main(int argc, char **argv) {
@@ -534,7 +534,7 @@ main(int argc, char **argv) {
int dhc_running = 0;
char procfn[256] = "";
@ -64,7 +64,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/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);
@@ -2908,7 +2908,7 @@ void rewrite_client_leases ()
@@ -2910,7 +2910,7 @@ void rewrite_client_leases ()
if (leaseFile != NULL)
fclose (leaseFile);
@ -73,7 +73,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return;
@@ -3012,7 +3012,7 @@ write_duid(struct data_string *duid)
@@ -3014,7 +3014,7 @@ write_duid(struct data_string *duid)
return ISC_R_INVALIDARG;
if (leaseFile == NULL) { /* XXX? */
@ -82,7 +82,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
if (leaseFile == NULL) {
log_error("can't create %s: %m", path_dhclient_db);
return ISC_R_IOERROR;
@@ -3192,7 +3192,7 @@ int write_client_lease (client, lease, r
@@ -3194,7 +3194,7 @@ int write_client_lease (client, lease, r
return 1;
if (leaseFile == NULL) { /* XXX */
@ -91,7 +91,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return 0;
@@ -3638,9 +3638,9 @@ void go_daemon ()
@@ -3647,9 +3647,9 @@ void go_daemon ()
close(2);
/* Reopen them on /dev/null. */
@ -104,7 +104,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
write_client_pid_file ();
@@ -3652,14 +3652,14 @@ void write_client_pid_file ()
@@ -3661,14 +3661,14 @@ void write_client_pid_file ()
FILE *pf;
int pfdesc;
@ -121,9 +121,9 @@ diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
if (!pf)
log_error ("Can't fdopen %s: %m", path_dhclient_pid);
else {
diff -up dhcp-4.1.0/common/bpf.c.cloexec dhcp-4.1.0/common/bpf.c
--- dhcp-4.1.0/common/bpf.c.cloexec 2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/bpf.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -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.0/common/bpf.c.cloexec dhcp-4.1.0/common/bpf.c
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff -up dhcp-4.1.0/common/discover.c.cloexec dhcp-4.1.0/common/discover.c
--- dhcp-4.1.0/common/discover.c.cloexec 2008-08-29 07:48:57.000000000 -1000
+++ dhcp-4.1.0/common/discover.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -409,7 +409,7 @@ begin_iface_scan(struct iface_conf_list
int len;
int i;
@ -145,19 +145,19 @@ diff -up dhcp-4.1.0/common/discover.c.cloexec dhcp-4.1.0/common/discover.c
if (ifaces->fp == NULL) {
log_error("Error opening '/proc/net/dev' to list interfaces");
return 0;
@@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list
}
@@ -444,7 +444,7 @@ begin_iface_scan(struct iface_conf_list
#ifdef DHCPv6
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
if (ifaces->fp6 == NULL) {
log_error("Error opening '/proc/net/if_inet6' to "
"list IPv6 interfaces; %m");
diff -up dhcp-4.1.0/common/dlpi.c.cloexec dhcp-4.1.0/common/dlpi.c
--- dhcp-4.1.0/common/dlpi.c.cloexec 2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/dlpi.c 2009-01-06 11:56:11.000000000 -1000
@@ -795,7 +795,7 @@ dlpiopen(const char *ifname) {
if (local_family == AF_INET6) {
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
if (ifaces->fp6 == NULL) {
log_error("Error opening '/proc/net/if_inet6' to "
"list IPv6 interfaces; %m");
diff -up dhcp-4.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) {
}
*dp = '\0';
@ -166,9 +166,9 @@ diff -up dhcp-4.1.0/common/dlpi.c.cloexec dhcp-4.1.0/common/dlpi.c
}
/*
diff -up dhcp-4.1.0/common/nit.c.cloexec dhcp-4.1.0/common/nit.c
--- dhcp-4.1.0/common/nit.c.cloexec 2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/nit.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -81,7 +81,7 @@ int if_register_nit (info)
struct strioctl sio;
@ -178,9 +178,9 @@ diff -up dhcp-4.1.0/common/nit.c.cloexec dhcp-4.1.0/common/nit.c
if (sock < 0)
log_fatal ("Can't open NIT device for %s: %m", info -> name);
diff -up dhcp-4.1.0/common/resolv.c.cloexec dhcp-4.1.0/common/resolv.c
--- dhcp-4.1.0/common/resolv.c.cloexec 2008-03-07 10:12:44.000000000 -1000
+++ dhcp-4.1.0/common/resolv.c 2009-01-06 12:05:17.000000000 -1000
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
@@ -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.0/common/resolv.c.cloexec dhcp-4.1.0/common/resolv.c
log_error ("Can't open %s: %m", path_resolv_conf);
return;
}
diff -up dhcp-4.1.0/common/upf.c.cloexec dhcp-4.1.0/common/upf.c
--- dhcp-4.1.0/common/upf.c.cloexec 2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/upf.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -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,9 +202,9 @@ diff -up dhcp-4.1.0/common/upf.c.cloexec dhcp-4.1.0/common/upf.c
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff -up dhcp-4.1.0/dst/dst_api.c.cloexec dhcp-4.1.0/dst/dst_api.c
--- dhcp-4.1.0/dst/dst_api.c.cloexec 2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/dst/dst_api.c 2009-01-06 11:56:11.000000000 -1000
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
PRIVATE_KEY, PATH_MAX);
@ -223,7 +223,7 @@ diff -up dhcp-4.1.0/dst/dst_api.c.cloexec dhcp-4.1.0/dst/dst_api.c
EREPORT(("dst_read_public_key(): Public Key not found %s\n",
name));
return (NULL);
@@ -615,7 +615,7 @@ dst_s_write_public_key(const DST_KEY *ke
@@ -619,7 +619,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.0/dst/dst_api.c.cloexec dhcp-4.1.0/dst/dst_api.c
EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
filename, errno));
return (0);
@@ -849,7 +849,7 @@ dst_s_read_private_key_file(char *name,
@@ -853,7 +853,7 @@ dst_s_read_private_key_file(char *name,
return (0);
}
/* first check if we can find the key file */
@ -241,9 +241,9 @@ diff -up dhcp-4.1.0/dst/dst_api.c.cloexec dhcp-4.1.0/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.0/dst/prandom.c.cloexec dhcp-4.1.0/dst/prandom.c
--- dhcp-4.1.0/dst/prandom.c.cloexec 2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/dst/prandom.c 2009-01-06 11:56:11.000000000 -1000
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
s = stat("/dev/random", &st);
@ -262,9 +262,9 @@ diff -up dhcp-4.1.0/dst/prandom.c.cloexec dhcp-4.1.0/dst/prandom.c
return (0);
for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0;
no += i)
diff -up dhcp-4.1.0/minires/res_init.c.cloexec dhcp-4.1.0/minires/res_init.c
--- dhcp-4.1.0/minires/res_init.c.cloexec 2008-02-28 11:21:56.000000000 -1000
+++ dhcp-4.1.0/minires/res_init.c 2009-01-06 11:56:11.000000000 -1000
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'))
@ -274,9 +274,9 @@ diff -up dhcp-4.1.0/minires/res_init.c.cloexec dhcp-4.1.0/minires/res_init.c
/* read the config file */
while (fgets(buf, sizeof(buf), fp) != NULL) {
/* skip comments */
diff -up dhcp-4.1.0/minires/res_query.c.cloexec dhcp-4.1.0/minires/res_query.c
--- dhcp-4.1.0/minires/res_query.c.cloexec 2008-02-28 11:21:56.000000000 -1000
+++ dhcp-4.1.0/minires/res_query.c 2009-01-06 11:56:11.000000000 -1000
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);
@ -286,9 +286,9 @@ diff -up dhcp-4.1.0/minires/res_query.c.cloexec dhcp-4.1.0/minires/res_query.c
return (NULL);
setbuf(fp, NULL);
buf[sizeof(buf) - 1] = '\0';
diff -up dhcp-4.1.0/omapip/trace.c.cloexec dhcp-4.1.0/omapip/trace.c
--- dhcp-4.1.0/omapip/trace.c.cloexec 2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/omapip/trace.c 2009-01-06 11:56:11.000000000 -1000
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;
}
@ -311,10 +311,10 @@ diff -up dhcp-4.1.0/omapip/trace.c.cloexec dhcp-4.1.0/omapip/trace.c
if (!traceinfile) {
log_error ("Can't open tracefile %s: %m", filename);
return;
diff -up dhcp-4.1.0/relay/dhcrelay.c.cloexec dhcp-4.1.0/relay/dhcrelay.c
--- dhcp-4.1.0/relay/dhcrelay.c.cloexec 2008-11-12 13:22:14.000000000 -1000
+++ dhcp-4.1.0/relay/dhcrelay.c 2009-01-06 12:06:23.000000000 -1000
@@ -174,11 +174,11 @@ main(int argc, char **argv) {
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
@@ -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
open a file the lowest available file descriptor is used. */
@ -329,7 +329,7 @@ diff -up dhcp-4.1.0/relay/dhcrelay.c.cloexec dhcp-4.1.0/relay/dhcrelay.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -511,12 +511,12 @@ main(int argc, char **argv) {
@@ -514,12 +514,12 @@ main(int argc, char **argv) {
exit(0);
pfdesc = open(path_dhcrelay_pid,
@ -344,9 +344,9 @@ diff -up dhcp-4.1.0/relay/dhcrelay.c.cloexec dhcp-4.1.0/relay/dhcrelay.c
if (!pf)
log_error("Can't fdopen %s: %m",
path_dhcrelay_pid);
diff -up dhcp-4.1.0/server/confpars.c.cloexec dhcp-4.1.0/server/confpars.c
--- dhcp-4.1.0/server/confpars.c.cloexec 2009-01-06 11:56:10.000000000 -1000
+++ dhcp-4.1.0/server/confpars.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char
}
#endif
@ -356,9 +356,9 @@ diff -up dhcp-4.1.0/server/confpars.c.cloexec dhcp-4.1.0/server/confpars.c
if (leasep) {
log_error ("Can't open lease database %s: %m --",
path_dhcpd_db);
diff -up dhcp-4.1.0/server/db.c.cloexec dhcp-4.1.0/server/db.c
--- dhcp-4.1.0/server/db.c.cloexec 2008-03-31 03:49:45.000000000 -1000
+++ dhcp-4.1.0/server/db.c 2009-01-06 11:56:11.000000000 -1000
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)
}
#endif
@ -383,10 +383,10 @@ diff -up dhcp-4.1.0/server/db.c.cloexec dhcp-4.1.0/server/db.c
log_error("Can't fdopen new lease file: %m");
close(db_fd);
goto fdfail;
diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c
--- dhcp-4.1.0/server/dhcpd.c.cloexec 2009-01-06 11:56:09.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.c 2009-01-06 12:06:49.000000000 -1000
@@ -266,11 +266,11 @@ main(int argc, char **argv) {
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) {
/* 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 +401,7 @@ diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c
if (fd == 2)
log_perror = 0; /* No sense logging to /dev/null. */
else if (fd != -1)
@@ -779,7 +779,7 @@ main(int argc, char **argv) {
@@ -772,7 +772,7 @@ main(int argc, char **argv) {
#endif /* PARANOIA */
/* Read previous pid file. */
@ -410,16 +410,16 @@ diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c
status = read(i, pbuf, (sizeof pbuf) - 1);
close (i);
if (status > 0) {
@@ -797,7 +797,7 @@ main(int argc, char **argv) {
@@ -790,7 +790,7 @@ main(int argc, char **argv) {
}
/* Write new pid file. */
- if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0) {
+ if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644)) >= 0) {
sprintf(pbuf, "%d\n", (int) getpid());
write(i, pbuf, strlen(pbuf));
IGNORE_RET (write(i, pbuf, strlen(pbuf)));
close(i);
@@ -823,9 +823,9 @@ main(int argc, char **argv) {
@@ -816,9 +816,9 @@ main(int argc, char **argv) {
close(2);
/* Reopen them on /dev/null. */
@ -431,10 +431,10 @@ diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c
+ open("/dev/null", O_RDWR | O_CLOEXEC);
log_perror = 0; /* No sense logging to /dev/null. */
chdir("/");
diff -up dhcp-4.1.0/server/ldap.c.cloexec dhcp-4.1.0/server/ldap.c
--- dhcp-4.1.0/server/ldap.c.cloexec 2009-01-06 11:56:09.000000000 -1000
+++ dhcp-4.1.0/server/ldap.c 2009-01-06 11:56:11.000000000 -1000
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
@@ -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.0/server/dhcpd.c.ifnamsiz dhcp-4.1.0/server/dhcpd.c
--- dhcp-4.1.0/server/dhcpd.c.ifnamsiz 2009-04-20 16:35:30.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.c 2009-04-20 15:45:15.000000000 -1000
@@ -401,7 +401,7 @@ main(int argc, char **argv) {
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) {
log_fatal ("Insufficient memory to %s %s: %s",
"record interface", argv [i],
isc_result_totext (result));

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/common/dispatch.c.dracut dhcp-4.1.0/common/dispatch.c
--- dhcp-4.1.0/common/dispatch.c.dracut 2008-01-23 16:43:04.000000000 -1000
+++ dhcp-4.1.0/common/dispatch.c 2009-06-25 16:21:03.000000000 -1000
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;

View File

@ -1,6 +1,6 @@
diff -urp dhcp-4.1.0p1.orig/client/dhclient.c dhcp-4.1.0p1/client/dhclient.c
--- dhcp-4.1.0p1.orig/client/dhclient.c 2009-08-15 11:44:33.000000000 -0400
+++ dhcp-4.1.0p1/client/dhclient.c 2009-08-15 12:32:52.000000000 -0400
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-01-20 17:39:07.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:39:07.000000000 +0100
@@ -37,6 +37,9 @@
#include <sys/time.h>
#include <sys/wait.h>
@ -11,7 +11,7 @@ diff -urp dhcp-4.1.0p1.orig/client/dhclient.c dhcp-4.1.0p1/client/dhclient.c
/*
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
@@ -422,6 +425,15 @@ main(int argc, char **argv) {
@@ -424,6 +427,15 @@ main(int argc, char **argv) {
path_dhclient_script = s;
}
@ -27,9 +27,9 @@ diff -urp dhcp-4.1.0p1.orig/client/dhclient.c dhcp-4.1.0p1/client/dhclient.c
/* Set up the initial dhcp option universe. */
initialize_common_option_spaces();
diff -urp dhcp-4.1.0p1.orig/client/Makefile.am dhcp-4.1.0p1/client/Makefile.am
--- dhcp-4.1.0p1.orig/client/Makefile.am 2009-08-15 11:44:33.000000000 -0400
+++ dhcp-4.1.0p1/client/Makefile.am 2009-08-15 12:32:34.000000000 -0400
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 23:33:22.000000000 +0100
+++ dhcp-4.1.1/client/Makefile.am 2010-01-20 17:39:07.000000000 +0100
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
scripts/netbsd scripts/nextstep scripts/openbsd \
scripts/solaris scripts/openwrt
@ -39,10 +39,10 @@ diff -urp dhcp-4.1.0p1.orig/client/Makefile.am dhcp-4.1.0p1/client/Makefile.am
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
diff -urp dhcp-4.1.0p1.orig/configure.ac dhcp-4.1.0p1/configure.ac
--- dhcp-4.1.0p1.orig/configure.ac 2009-08-15 11:44:33.000000000 -0400
+++ dhcp-4.1.0p1/configure.ac 2009-08-15 12:32:34.000000000 -0400
@@ -388,6 +388,9 @@ AC_TRY_LINK(
diff -up dhcp-4.1.1/configure.ac.capability dhcp-4.1.1/configure.ac
--- dhcp-4.1.1/configure.ac.capability 2010-01-20 17:39:07.000000000 +0100
+++ dhcp-4.1.1/configure.ac 2010-01-20 17:39:07.000000000 +0100
@@ -419,6 +419,9 @@ 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.0/client/clparse.c.requested dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.requested 2009-01-06 10:40:46.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c 2009-01-06 10:40:47.000000000 -1000
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-01-20 17:18:14.000000000 +0100
+++ dhcp-4.1.1/client/clparse.c 2010-01-20 17:18:14.000000000 +0100
@@ -37,7 +37,7 @@
struct client_config top_level_config;

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/client/clparse.c.anycast dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.anycast 2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c 2009-01-06 10:43:53.000000000 -1000
@@ -558,6 +558,17 @@ void parse_client_statement (cfile, ip,
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;
@ -19,9 +19,9 @@ diff -up dhcp-4.1.0/client/clparse.c.anycast dhcp-4.1.0/client/clparse.c
case REQUEST:
token = next_token (&val, (unsigned *)0, cfile);
if (config -> requested_options == default_requested_options)
diff -up dhcp-4.1.0/common/conflex.c.anycast dhcp-4.1.0/common/conflex.c
--- dhcp-4.1.0/common/conflex.c.anycast 2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/common/conflex.c 2009-01-06 10:43:53.000000000 -1000
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"))
@ -31,10 +31,10 @@ diff -up dhcp-4.1.0/common/conflex.c.anycast dhcp-4.1.0/common/conflex.c
if (!strcasecmp (atom + 1, "ppend"))
return APPEND;
if (!strcasecmp (atom + 1, "llow"))
diff -up dhcp-4.1.0/common/lpf.c.anycast dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.anycast 2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c 2009-01-06 10:43:53.000000000 -1000
@@ -333,6 +333,9 @@ ssize_t send_packet (interface, packet,
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);
@ -44,10 +44,10 @@ diff -up dhcp-4.1.0/common/lpf.c.anycast dhcp-4.1.0/common/lpf.c
/* 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.0/includes/dhcpd.h.anycast dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.anycast 2009-01-06 10:43:53.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:43:53.000000000 -1000
@@ -1215,6 +1215,7 @@ struct interface_info {
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 */
@ -55,16 +55,16 @@ diff -up dhcp-4.1.0/includes/dhcpd.h.anycast dhcp-4.1.0/includes/dhcpd.h
};
struct hardware_link {
diff -up dhcp-4.1.0/includes/dhctoken.h.anycast dhcp-4.1.0/includes/dhctoken.h
--- dhcp-4.1.0/includes/dhctoken.h.anycast 2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/includes/dhctoken.h 2009-01-06 10:49:12.000000000 -1000
@@ -353,7 +353,8 @@ enum dhcp_token {
TEMPORARY = 656,
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
+ BOOTP_BROADCAST_ALWAYS = 659,
+ ANYCAST_MAC = 660
BOOTP_BROADCAST_ALWAYS = 659,
- CONFLICT_DONE = 660
+ CONFLICT_DONE = 660,
+ ANYCAST_MAC = 661
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.backoff 2009-01-06 10:08:07.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:10:27.000000000 -1000
@@ -1185,6 +1185,7 @@ void state_init (cpp)
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-01-20 17:14:37.000000000 +0100
+++ dhcp-4.1.1/client/dhclient.c 2010-01-20 17:14:37.000000000 +0100
@@ -1187,6 +1187,7 @@ void state_init (cpp)
void *cpp;
{
struct client_state *client = cpp;
@ -9,7 +9,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
ASSERT_STATE(state, S_INIT);
@@ -1197,9 +1198,16 @@ void state_init (cpp)
@@ -1199,9 +1200,16 @@ void state_init (cpp)
client -> first_sending = cur_time;
client -> interval = client -> config -> initial_interval;
@ -29,7 +29,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
}
/*
@@ -1478,6 +1486,7 @@ void bind_lease (client)
@@ -1480,6 +1488,7 @@ void bind_lease (client)
send_decline (client);
destroy_client_lease (client -> new);
client -> new = (struct client_lease *)0;
@ -37,7 +37,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
state_init (client);
return;
}
@@ -3680,6 +3689,7 @@ void client_location_changed ()
@@ -3689,6 +3698,7 @@ void client_location_changed ()
case S_INIT:
case S_REBINDING:
case S_STOPPED:
@ -45,10 +45,10 @@ diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
break;
}
client -> state = S_INIT;
diff -up dhcp-4.1.0/includes/dhcpd.h.backoff dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.backoff 2009-01-06 10:08:07.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:08:07.000000000 -1000
@@ -1016,7 +1016,8 @@ enum dhcp_state {
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-01-20 17:14:37.000000000 +0100
+++ dhcp-4.1.1/includes/dhcpd.h 2010-01-20 17:14:37.000000000 +0100
@@ -1017,7 +1017,8 @@ enum dhcp_state {
S_BOUND = 5,
S_RENEWING = 6,
S_REBINDING = 7,

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/client/dhclient.c.usage dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.usage 2009-01-06 10:36:55.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:39:58.000000000 -1000
@@ -990,6 +990,10 @@ static void usage()
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()
"[-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.0/omapip/errwarn.c.errwarn dhcp-4.1.0/omapip/errwarn.c
--- dhcp-4.1.0/omapip/errwarn.c.errwarn 2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/omapip/errwarn.c 2009-01-06 07:02:20.000000000 -1000
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
@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
#if !defined (NOMINUM)

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/server/confpars.c.failover dhcp-4.1.0/server/confpars.c
--- dhcp-4.1.0/server/confpars.c.failover 2009-01-06 10:24:38.000000000 -1000
+++ dhcp-4.1.0/server/confpars.c 2009-01-06 10:24:38.000000000 -1000
@@ -1142,10 +1142,17 @@ void parse_failover_peer (cfile, group,
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 */

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/common/tables.c.garbage dhcp-4.1.0/common/tables.c
--- dhcp-4.1.0/common/tables.c.garbage 2008-01-23 16:43:04.000000000 -1000
+++ dhcp-4.1.0/common/tables.c 2009-01-06 12:09:41.000000000 -1000
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
@@ -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.0/client/dhclient.c.inherit dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.inherit 2009-01-06 12:08:56.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 12:08:57.000000000 -1000
@@ -2299,6 +2299,7 @@ void send_request (cpp)
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)
{
struct client_state *client = cpp;
@ -9,7 +9,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.inherit dhcp-4.1.0/client/dhclient.c
int result;
int interval;
struct sockaddr_in destination;
@@ -2358,6 +2359,22 @@ void send_request (cpp)
@@ -2360,6 +2361,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,6 +1,6 @@
diff -up dhcp-4.1.0/client/dhclient.conf.supersede dhcp-4.1.0/client/dhclient.conf
--- dhcp-4.1.0/client/dhclient.conf.supersede 1997-06-02 12:50:44.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.conf 2009-01-06 12:27:08.000000000 -1000
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
@@ -1,10 +1,10 @@
send host-name "andare.fugue.com";
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;

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

@ -0,0 +1,12 @@
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.0/client/dhclient.8.man dhcp-4.1.0/client/dhclient.8
--- dhcp-4.1.0/client/dhclient.8.man 2008-11-20 04:55:14.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.8 2009-01-06 11:51:30.000000000 -1000
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-01-20 17:20:31.000000000 +0100
@@ -111,6 +111,33 @@ relay
.B -w
]
@ -466,9 +466,9 @@ diff -up dhcp-4.1.0/client/dhclient.8.man dhcp-4.1.0/client/dhclient.8
.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
.B DBDIR/dhclient.leases~.
.SH SEE ALSO
diff -up dhcp-4.1.0/client/dhclient.conf.5.man dhcp-4.1.0/client/dhclient.conf.5
--- dhcp-4.1.0/client/dhclient.conf.5.man 2008-03-07 08:58:29.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.conf.5 2009-01-06 10:50:40.000000000 -1000
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-01-20 17:20:31.000000000 +0100
@@ -186,9 +186,9 @@ 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
@ -482,7 +482,7 @@ diff -up dhcp-4.1.0/client/dhclient.conf.5.man dhcp-4.1.0/client/dhclient.conf.5
.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
@@ -627,6 +627,18 @@ database and will record the media type
@@ -659,6 +659,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.
@ -501,7 +501,7 @@ diff -up dhcp-4.1.0/client/dhclient.conf.5.man dhcp-4.1.0/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
@@ -648,12 +660,12 @@ interface "ep0" {
@@ -680,12 +692,12 @@ interface "ep0" {
send host-name "andare.fugue.com";
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 3600;
@ -517,9 +517,9 @@ diff -up dhcp-4.1.0/client/dhclient.conf.5.man dhcp-4.1.0/client/dhclient.conf.5
media "media 10baseT/UTP", "media 10base2/BNC";
}
diff -up dhcp-4.1.0/client/dhclient-script.8.man dhcp-4.1.0/client/dhclient-script.8
--- dhcp-4.1.0/client/dhclient-script.8.man 2006-02-24 13:16:27.000000000 -1000
+++ dhcp-4.1.0/client/dhclient-script.8 2009-01-06 10:50:40.000000000 -1000
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-01-20 17:20:31.000000000 +0100
@@ -47,16 +47,16 @@ 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
@ -600,9 +600,9 @@ diff -up dhcp-4.1.0/client/dhclient-script.8.man dhcp-4.1.0/client/dhclient-scri
In all cases, $reason is set to the name of the reason why the script
has been invoked. The following reasons are currently defined:
MEDIUM, PREINIT, BOUND, RENEW, REBIND, REBOOT, EXPIRE, FAIL, STOP, RELEASE,
diff -up dhcp-4.1.0/common/dhcp-options.5.man dhcp-4.1.0/common/dhcp-options.5
--- dhcp-4.1.0/common/dhcp-options.5.man 2008-11-21 03:59:56.000000000 -1000
+++ dhcp-4.1.0/common/dhcp-options.5 2009-01-06 10:50:40.000000000 -1000
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-01-20 17:20:31.000000000 +0100
@@ -905,6 +905,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
@ -625,9 +625,9 @@ diff -up dhcp-4.1.0/common/dhcp-options.5.man dhcp-4.1.0/common/dhcp-options.5
.RE
.PP
.nf
diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
--- dhcp-4.1.0/server/dhcpd.conf.5.man 2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.conf.5 2009-01-06 10:50:40.000000000 -1000
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-01-20 17:20:31.000000000 +0100
@@ -519,6 +519,9 @@ pool {
};
.fi
@ -692,7 +692,7 @@ diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
secret pRP5FapFoJ95JEL06sv4PQ==;
};
@@ -2302,7 +2301,7 @@ statement
@@ -2315,7 +2314,7 @@ statement
.PP
.I Name
should be the name of the DHCP server's lease file. By default, this
@ -701,7 +701,7 @@ diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
scope of the configuration file - if it appears in some other scope,
it will have no effect. Furthermore, it has no effect if overridden
by the
@@ -2337,7 +2336,7 @@ statement
@@ -2350,7 +2349,7 @@ statement
.PP
.I Name
is the name of the lease file to use if and only if the server is running
@ -710,7 +710,7 @@ diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
like
.I lease-file-name,
\fBmust\fR appear in the outer scope of the configuration file. It
@@ -2495,7 +2494,8 @@ statement
@@ -2508,7 +2507,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
@ -720,7 +720,7 @@ diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
.RE
.PP
The
@@ -2540,7 +2540,7 @@ statement
@@ -2553,7 +2553,7 @@ statement
.I Name
should be the name of the DHCP server's process ID file. This is the
file in which the DHCP server's process ID is stored when the server
@ -729,7 +729,7 @@ diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
.I lease-file-name
statement, this statement must appear in the outer scope
of the configuration file. It has no effect if overridden by the
@@ -2558,7 +2558,7 @@ statement
@@ -2571,7 +2571,7 @@ statement
.PP
.I Name
is the name of the pid file to use if and only if the server is running

View File

@ -0,0 +1,40 @@
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
@@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list
}
#ifdef DHCPv6
- if (local_family == AF_INET6) {
+ if ((local_family == AF_INET6) && !access("/proc/net/if_inet6", R_OK)) {
ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
if (ifaces->fp6 == NULL) {
log_error("Error opening '/proc/net/if_inet6' to "
@@ -454,6 +454,8 @@ begin_iface_scan(struct iface_conf_list
ifaces->fp = NULL;
return 0;
}
+ } else {
+ ifaces->fp6 = NULL;
}
#endif
@@ -721,7 +723,7 @@ next_iface(struct iface_info *info, int
return 1;
}
#ifdef DHCPv6
- if (!(*err)) {
+ if (!(*err) && ifaces->fp6) {
if (local_family == AF_INET6)
return next_iface6(info, err, ifaces);
}
@@ -740,7 +742,8 @@ end_iface_scan(struct iface_conf_list *i
ifaces->sock = -1;
#ifdef DHCPv6
if (local_family == AF_INET6) {
- fclose(ifaces->fp6);
+ if (ifaces->fp6)
+ fclose(ifaces->fp6);
ifaces->fp6 = NULL;
}
#endif

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/client/clparse.c.options dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.options 2008-05-23 03:22:23.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c 2009-01-06 07:59:14.000000000 -1000
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
@@ -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.0/client/clparse.c.options dhcp-4.1.0/client/clparse.c
void parse_client_statement (cfile, ip, config)
struct parse *cfile;
@@ -693,6 +695,12 @@ void parse_client_statement (cfile, ip,
@@ -706,6 +708,12 @@ void parse_client_statement (cfile, ip,
parse_reject_statement (cfile, config);
return;
@ -32,9 +32,9 @@ diff -up dhcp-4.1.0/client/clparse.c.options dhcp-4.1.0/client/clparse.c
default:
lose = 0;
stmt = (struct executable_statement *)0;
diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.options 2008-06-11 10:17:10.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 08:27:57.000000000 -1000
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>
#include <limits.h>
@ -48,7 +48,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
@@ -80,6 +86,9 @@ int wanted_ia_na = -1; /* the absolute
@@ -82,6 +88,9 @@ int wanted_ia_na = -1; /* the absolute
int wanted_ia_ta = 0;
int wanted_ia_pd = 0;
char *mockup_relay = NULL;
@ -58,7 +58,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
void run_stateless(int exit_mode);
@@ -110,6 +119,15 @@ main(int argc, char **argv) {
@@ -112,6 +121,15 @@ main(int argc, char **argv) {
int local_family_set = 0;
#endif /* DHCPv6 */
char *s;
@ -74,7 +74,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
/* Initialize client globals. */
memset(&default_duid, 0, sizeof(default_duid));
@@ -274,6 +292,88 @@ main(int argc, char **argv) {
@@ -276,6 +294,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.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
} else if (argv[i][0] == '-') {
usage();
} else if (interfaces_requested < 0) {
@@ -443,6 +543,166 @@ main(int argc, char **argv) {
@@ -445,6 +545,166 @@ main(int argc, char **argv) {
/* Parse the dhclient.conf file. */
read_client_conf();
@ -330,7 +330,7 @@ diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
/* Parse the lease database. */
read_client_leases();
@@ -2313,7 +2573,8 @@ void make_discover (client, lease)
@@ -2315,7 +2575,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.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -2397,7 +2658,9 @@ void make_request (client, lease)
@@ -2399,7 +2660,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.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
@@ -2459,7 +2722,8 @@ void make_decline (client, lease)
@@ -2461,7 +2724,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,9 +361,9 @@ diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
diff -up dhcp-4.1.0/common/conflex.c.options dhcp-4.1.0/common/conflex.c
--- dhcp-4.1.0/common/conflex.c.options 2009-01-06 07:59:13.000000000 -1000
+++ dhcp-4.1.0/common/conflex.c 2009-01-06 07:59:14.000000000 -1000
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)
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
@ -372,11 +372,11 @@ diff -up dhcp-4.1.0/common/conflex.c.options dhcp-4.1.0/common/conflex.c
+ return BOOTP_BROADCAST_ALWAYS;
break;
case 'c':
if (!strcasecmp (atom + 1, "ase"))
diff -up dhcp-4.1.0/includes/dhcpd.h.options dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.options 2009-01-06 07:59:13.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 07:59:14.000000000 -1000
@@ -1079,6 +1079,9 @@ struct client_config {
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 {
int do_forward_update; /* If nonzero, and if we have the
information we need, update the
A record for the address we get. */
@ -386,16 +386,14 @@ diff -up dhcp-4.1.0/includes/dhcpd.h.options dhcp-4.1.0/includes/dhcpd.h
};
/* Per-interface state used in the dhcp client... */
diff -up dhcp-4.1.0/includes/dhctoken.h.options dhcp-4.1.0/includes/dhctoken.h
--- dhcp-4.1.0/includes/dhctoken.h.options 2008-02-20 02:45:53.000000000 -1000
+++ dhcp-4.1.0/includes/dhctoken.h 2009-01-06 08:00:51.000000000 -1000
@@ -352,7 +352,8 @@ enum dhcp_token {
ZEROLEN = 655,
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
+ FIXED_PREFIX6 = 658,
+ BOOTP_BROADCAST_ALWAYS = 659
FIXED_PREFIX6 = 658,
+ BOOTP_BROADCAST_ALWAYS = 659,
CONFLICT_DONE = 660
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/includes/dhcpd.h.paths dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.paths 2009-01-06 11:52:57.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 11:52:57.000000000 -1000
@@ -1340,15 +1340,15 @@ typedef unsigned char option_mask [16];
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];
#else /* !DEBUG */
#ifndef _PATH_DHCPD_CONF
@ -20,7 +20,7 @@ diff -up dhcp-4.1.0/includes/dhcpd.h.paths dhcp-4.1.0/includes/dhcpd.h
#endif
#ifndef _PATH_DHCPD_PID
@@ -1362,7 +1362,7 @@ typedef unsigned char option_mask [16];
@@ -1364,7 +1364,7 @@ typedef unsigned char option_mask [16];
#endif /* DEBUG */
#ifndef _PATH_DHCLIENT_CONF
@ -29,7 +29,7 @@ diff -up dhcp-4.1.0/includes/dhcpd.h.paths dhcp-4.1.0/includes/dhcpd.h
#endif
#ifndef _PATH_DHCLIENT_SCRIPT
@@ -1378,11 +1378,11 @@ typedef unsigned char option_mask [16];
@@ -1380,11 +1380,11 @@ typedef unsigned char option_mask [16];
#endif
#ifndef _PATH_DHCLIENT_DB

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.1.0/client/dhclient.c.ifup dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.ifup 2009-01-06 08:29:14.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:07:08.000000000 -1000
@@ -474,9 +474,81 @@ main(int argc, char **argv) {
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) {
kill(oldpid, SIGTERM);
}
fclose(pidfd);

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/server/bootp.c.unicast dhcp-4.1.0/server/bootp.c
--- dhcp-4.1.0/server/bootp.c.unicast 2008-08-20 13:07:19.000000000 -1000
+++ dhcp-4.1.0/server/bootp.c 2009-01-06 10:13:29.000000000 -1000
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
@@ -58,6 +58,7 @@ void bootp (packet)
char msgbuf [1024];
int ignorep;
@ -32,10 +32,10 @@ diff -up dhcp-4.1.0/server/bootp.c.unicast dhcp-4.1.0/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.0/server/dhcp.c.unicast dhcp-4.1.0/server/dhcp.c
--- dhcp-4.1.0/server/dhcp.c.unicast 2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/dhcp.c 2009-01-06 10:13:29.000000000 -1000
@@ -4111,6 +4111,7 @@ int locate_network (packet)
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)
struct data_string data;
struct subnet *subnet = (struct subnet *)0;
struct option_cache *oc;
@ -43,7 +43,7 @@ diff -up dhcp-4.1.0/server/dhcp.c.unicast dhcp-4.1.0/server/dhcp.c
/* See if there's a Relay Agent Link Selection Option, or a
* Subnet Selection Option. The Link-Select and Subnet-Select
@@ -4126,12 +4127,24 @@ int locate_network (packet)
@@ -4128,12 +4129,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.0/server/dhcp.c.unicast dhcp-4.1.0/server/dhcp.c
}
/* If there's an option indicating link connection, and it's valid,
@@ -4154,7 +4167,10 @@ int locate_network (packet)
@@ -4156,7 +4169,10 @@ int locate_network (packet)
data_string_forget (&data, MDL);
} else {
ia.len = 4;
@ -85,7 +85,7 @@ diff -up dhcp-4.1.0/server/dhcp.c.unicast dhcp-4.1.0/server/dhcp.c
}
/* If we know the subnet on which the IP address lives, use it. */
@@ -4162,7 +4178,10 @@ int locate_network (packet)
@@ -4164,7 +4180,10 @@ int locate_network (packet)
shared_network_reference (&packet -> shared_network,
subnet -> shared_network, MDL);
subnet_dereference (&subnet, MDL);

View File

@ -1,6 +1,6 @@
diff -up dhcp-4.1.0/common/bpf.c.xen dhcp-4.1.0/common/bpf.c
--- dhcp-4.1.0/common/bpf.c.xen 2007-08-22 23:49:51.000000000 -1000
+++ dhcp-4.1.0/common/bpf.c 2009-01-06 10:41:32.000000000 -1000
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,
offset = decode_udp_ip_header (interface,
interface -> rbuf,
@ -10,21 +10,21 @@ diff -up dhcp-4.1.0/common/bpf.c.xen dhcp-4.1.0/common/bpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff -up dhcp-4.1.0/common/dlpi.c.xen dhcp-4.1.0/common/dlpi.c
--- dhcp-4.1.0/common/dlpi.c.xen 2008-02-29 13:57:56.000000000 -1000
+++ dhcp-4.1.0/common/dlpi.c 2009-01-06 10:41:32.000000000 -1000
@@ -689,7 +689,7 @@ ssize_t receive_packet (interface, buf,
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,
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
- from, length, &paylen);
+ from, length, &paylen, 0);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.xen 2009-01-06 10:41:31.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c 2009-01-06 10:41:32.000000000 -1000
/*
* 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
@@ -29,18 +29,33 @@
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
@ -115,7 +115,7 @@ diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
#if defined (HAVE_TR_SUPPORT)
if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
lpf_tr_filter_setup (info);
@@ -293,7 +326,6 @@ ssize_t send_packet (interface, packet,
@@ -294,7 +327,6 @@ ssize_t send_packet (interface, packet,
double hh [16];
double ih [1536 / sizeof (double)];
unsigned char *buf = (unsigned char *)ih;
@ -123,7 +123,7 @@ diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
int result;
int fudge;
@@ -311,15 +343,7 @@ ssize_t send_packet (interface, packet,
@@ -312,15 +344,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.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
if (result < 0)
log_error ("send_packet: %m");
return result;
@@ -336,14 +360,35 @@ ssize_t receive_packet (interface, buf,
@@ -337,14 +361,35 @@ ssize_t receive_packet (interface, buf,
{
int length = 0;
int offset = 0;
@ -177,7 +177,7 @@ diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
bufix = 0;
/* Decode the physical header... */
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
@@ -360,7 +405,7 @@ ssize_t receive_packet (interface, buf,
@@ -361,7 +406,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
@ -186,9 +186,9 @@ diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.0/common/nit.c.xen dhcp-4.1.0/common/nit.c
--- dhcp-4.1.0/common/nit.c.xen 2007-09-05 07:32:10.000000000 -1000
+++ dhcp-4.1.0/common/nit.c 2009-01-06 10:41:32.000000000 -1000
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,
/* Decode the IP and UDP headers... */
@ -198,10 +198,10 @@ diff -up dhcp-4.1.0/common/nit.c.xen dhcp-4.1.0/common/nit.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.0/common/packet.c.xen dhcp-4.1.0/common/packet.c
--- dhcp-4.1.0/common/packet.c.xen 2009-01-06 10:41:31.000000000 -1000
+++ dhcp-4.1.0/common/packet.c 2009-01-06 10:41:32.000000000 -1000
@@ -210,7 +210,7 @@ ssize_t
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
@@ -211,7 +211,7 @@ ssize_t
decode_udp_ip_header(struct interface_info *interface,
unsigned char *buf, unsigned bufix,
struct sockaddr_in *from, unsigned buflen,
@ -210,7 +210,7 @@ diff -up dhcp-4.1.0/common/packet.c.xen dhcp-4.1.0/common/packet.c
{
unsigned char *data;
struct ip ip;
@@ -321,7 +321,7 @@ decode_udp_ip_header(struct interface_in
@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_in
8, IPPROTO_UDP + ulen))));
udp_packets_seen++;
@ -219,9 +219,9 @@ diff -up dhcp-4.1.0/common/packet.c.xen dhcp-4.1.0/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.0/common/upf.c.xen dhcp-4.1.0/common/upf.c
--- dhcp-4.1.0/common/upf.c.xen 2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/common/upf.c 2009-01-06 10:41:32.000000000 -1000
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,
/* Decode the IP and UDP headers... */
@ -231,10 +231,10 @@ diff -up dhcp-4.1.0/common/upf.c.xen dhcp-4.1.0/common/upf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff -up dhcp-4.1.0/includes/dhcpd.h.xen dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.xen 2009-01-06 10:41:32.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:41:32.000000000 -1000
@@ -2640,7 +2640,7 @@ ssize_t decode_hw_header PROTO ((struct
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
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,

127
dhcp.spec
View File

@ -5,15 +5,15 @@
%global dhcpconfdir %{_sysconfdir}/dhcp
# Base version number from ISC
%global basever 4.1.0
%global basever 4.1.1
# LDAP patch version
%global ldappatchver %{basever}-5
%global ldappatchver %{basever}-1
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: %{basever}p1
Release: 18%{?dist}
Version: %{basever}
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.
@ -31,33 +31,29 @@ Source5: README.dhclient.d
Source6: 10-dhclient
Source7: 56dhclient
Source8: dhcpd6.init
Source9: dhcpd6.conf.sample
Patch0: %{name}-4.1.0-errwarn-message.patch
Patch1: %{name}-4.1.0-memory.patch
Patch2: %{name}-4.1.0-options.patch
Patch3: %{name}-4.1.0-release-by-ifup.patch
Patch4: %{name}-4.1.0-dhclient-decline-backoff.patch
Patch5: %{name}-4.1.0-unicast-bootp.patch
Patch6: %{name}-4.1.0-failover-ports.patch
Patch7: %{name}-4.1.0-dhclient-usage.patch
Patch8: %{name}-4.1.0-default-requested-options.patch
Patch9: %{name}-4.1.0-xen-checksum.patch
Patch10: %{name}-4.1.0-dhclient-anycast.patch
Patch11: %{name}-4.1.0-manpages.patch
Patch12: %{name}-4.1.0-paths.patch
Patch13: %{name}-4.1.0-CLOEXEC.patch
Patch14: %{name}-4.1.0-inherit-leases.patch
Patch15: %{name}-4.1.0-garbage-chars.patch
Patch16: %{name}-4.1.0-port-validation.patch
Patch17: %{name}-4.1.0-invalid-dhclient-conf.patch
Patch18: %{name}-4.1.0-missing-ipv6-not-fatal.patch
Patch19: %{name}-4.1.0-IFNAMSIZ.patch
Patch20: %{name}-4.1.0-add_timeout_when_NULL.patch
Patch21: %{name}-4.1.0-64_bit_lease_parse.patch
Patch22: %{name}-4.1.0-CVE-2009-1892.patch
Patch23: %{name}-4.1.0p1-capability.patch
Patch24: %{name}-4.1.0p1-logpid.patch
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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
@ -130,107 +126,90 @@ libdhcpctl and libomapi static libraries are also included in this package.
# Replace the standard ISC warning message about requesting help with an
# explanation that this is a patched build of ISC DHCP and bugs should be
# reported through bugzilla.redhat.com
%patch0 -p1
# Fix memory alignment and initialization problems in common/packet.c
# Fix buffer overflow in minires library
# Init struct sock_prog in common/lpf.c to NULL
%patch1 -p1
%patch0 -p1 -b .errwarn
# Add more dhclient options (-I, -B, -H, -F, -timeout, -V, and -R)
%patch2 -p1
%patch1 -p1 -b .options
# Handle releasing interfaces requested by /sbin/ifup
# pid file is assumed to be /var/run/dhclient-$interface.pid
%patch3 -p1
%patch2 -p1 -b .ifup
# If we receive a DHCP offer in dhclient and it's DECLINEd in dhclient-script,
# backoff for an amount of time before trying again
%patch4 -p1
%patch3 -p1 -b .backoff
# Support unicast BOOTP for IBM pSeries systems (and maybe others)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19146])
%patch5 -p1
%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
%patch6 -p1
%patch5 -p1 -b .failover-ports
# Update the usage screen for dhclient(8) indicating new options
# Use printf() rather than log_info() to display the information
# Also, return EXIT_FAILURE when the usage() screen is displayed (stop parsing)
%patch7 -p1
%patch6 -p1 -b .usage
# Add NIS domain, NIS servers, and NTP servers to the list of default
# requested DHCP options
%patch8 -p1
%patch7 -p1 -b .requested
# Handle Xen partial UDP checksums
%patch9 -p1
%patch8 -p1 -b .xen
# Add anycast support to dhclient (for OLPC)
%patch10 -p1
%patch9 -p1 -b .anycast
# Patch man page contents
%patch11 -p1
%patch10 -p1 -b .man
# Change paths to conform to our standards
%patch12 -p1
%patch11 -p1 -b .paths
# Make sure all open file descriptors are closed-on-exec for SELinux (#446632)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19148])
%patch13 -p1
%patch12 -p1 -b .cloexec
# If we have an active lease, do not down the interface (#453982)
%patch14 -p1
%patch13 -p1 -b .inherit
# Fix 'garbage in format string' error (#450042)
%patch15 -p1
# Validate port numbers specified for dhclient, dhcpd, and dhcrelay
# to make sure they are within 1-65535, inclusive. (#438149)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #18695])
%patch16 -p1
%patch14 -p1 -b .garbage
# The sample dhclient.conf should say 'supersede domain-search' (#467955)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19147])
%patch17 -p1
%patch15 -p1 -b .supersede
# If the ipv6 kernel module is missing, do not segfault
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19367])
%patch18 -p1
%patch16 -p1 -b .noipv6
# Read only up to IFNAMSIZ characters for the interface name in dhcpd (#441524)
%patch19 -p1
%patch17 -p1 -b .ifnamsiz
# Handle cases in add_timeout() where the function is called with a NULL
# value for the 'when' parameter
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19867])
%patch20 -p1
%patch18 -p1 -b .dracut
# Ensure 64-bit platforms parse lease file dates & times correctly (#448615)
%patch21 -p1
# Fix for CVE-2009-1892 (patch from Mandriva SRPM)
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1892
%patch22 -p1
%patch19 -p1 -b .64-bit_lease_parse
# Drop unnecessary capabilities in dhclient (#517649)
%patch23 -p1
%patch20 -p1 -b .capability
# dhclient logs its pid to make troubleshooting NM managed systems
# with multiple dhclients running easier (#546792)
%patch24 -p1
%patch21 -p1 -b .logpid
# 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 dhcpd6.conf.sample
%{__install} -p -m 0644 %{SOURCE9} .
# Copy in the Fedora/RHEL dhclient script
%{__install} -p -m 0755 %{SOURCE4} client/scripts/linux
%{__install} -p -m 0644 %{SOURCE5} .
@ -350,8 +329,10 @@ EOF
# Copy sample conf files into position (called by doc macro)
%{__cp} -p client/dhclient.conf dhclient.conf.sample
%{__cp} -p server/dhcpd.conf dhcpd.conf.sample
%{__cp} -p doc/examples/dhclient-dhcpv6.conf dhclient6.conf.sample
%{__cp} -p doc/examples/dhcpd-dhcpv6.conf dhcpd6.conf.sample
# Install default (empty) dhcpd.conf and dhcpd6.conf:
# Install default (empty) dhcpd.conf:
%{__mkdir} -p %{buildroot}%{dhcpconfdir}
%{__cat} << EOF > %{buildroot}%{dhcpconfdir}/dhcpd.conf
#
@ -361,6 +342,7 @@ EOF
#
EOF
# Install default (empty) dhcpd6.conf:
%{__cat} << EOF > %{buildroot}%{dhcpconfdir}/dhcpd6.conf
#
# DHCP for IPv6 Server Configuration file.
@ -491,7 +473,7 @@ fi
%files -n dhclient
%defattr(-,root,root,-)
%doc dhclient.conf.sample README.dhclient.d
%doc dhclient.conf.sample dhclient6.conf.sample README.dhclient.d
%attr(0750,root,root) %dir %{dhcpconfdir}
%dir %{dhcpconfdir}/dhclient.d
%dir %{_localstatedir}/lib/dhclient
@ -517,6 +499,9 @@ fi
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
%changelog
* Wed Jan 20 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.1-1
- Upgraded to ISC dhcp-4.1.1
* Mon Jan 18 2010 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.0p1-18
- Hide startup info when starting dhcpd6 service.
- Remove -TERM from calling killproc when stopping dhcrelay (#555672)

View File

@ -1,17 +0,0 @@
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 2001:db8:0:1::/64 {
# Range for clients
range6 2001:db8:0:1::129 2001:db8:0:1::254;
# Additional options
option dhcp6.name-servers fec0:0:0:1::1;
option dhcp6.domain-search "domain.example";
# Prefix range for delegation to sub-routers
prefix6 2001:db8:0:100:: 2001:db8:0:f00:: /56;
# Example for a fixed host address
host specialclient {
host-identifier option dhcp6.client-id 00:01:00:01:4a:1f:ba:e3:60:b9:1f:01:23:45;
fixed-address6 2001:db8:0:1::127;
}
}

View File

@ -1,2 +1,2 @@
325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz
f6e192cb2fb0fea15b226732f201d9cd ldap-for-dhcp-4.1.0-5.tar.gz
38a74c89d8913b9b5f33737047623c18 dhcp-4.1.1.tar.gz
1a99ffb11c00a603ce2146f7d13ab967 ldap-for-dhcp-4.1.1-1.tar.gz