[dhcp] 4.2.2b1
Jiří Popelka
jpopelka at fedoraproject.org
Fri Jul 1 14:07:35 UTC 2011
commit bb77af8b5e5357f0b440e950229874a7ee3ac96e
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Fri Jul 1 14:42:18 2011 +0200
4.2.2b1
.gitignore | 1 +
dhcp-4.2.0-dhclient-usage.patch | 14 -
dhcp-4.2.0-initialization-delay.patch | 45 --
dhcp-4.2.2-CLOEXEC.patch | 423 ++++++++++++++++++++
...1-PIE-RELRO.patch => dhcp-4.2.2-PIE-RELRO.patch | 42 +-
dhcp-4.2.2-dhclient-usage.patch | 14 +
...4.2.0-options.patch => dhcp-4.2.2-options.patch | 66 ++--
...hcp-4.2.2-rfc3442-classless-static-routes.patch | 94 +++---
...checksum.patch => dhcp-4.2.2-xen-checksum.patch | 87 ++--
dhcp.spec | 31 +-
sources | 2 +-
11 files changed, 600 insertions(+), 219 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7cb7255..d7fafe9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/dhcp-4.2.1rc1.tar.gz
/dhcp-4.2.1.tar.gz
/dhcp-4.2.1-P1.tar.gz
+/dhcp-4.2.2b1.tar.gz
diff --git a/dhcp-4.2.2-CLOEXEC.patch b/dhcp-4.2.2-CLOEXEC.patch
new file mode 100644
index 0000000..b07e2ff
--- /dev/null
+++ b/dhcp-4.2.2-CLOEXEC.patch
@@ -0,0 +1,423 @@
+diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
+--- dhcp-4.2.2b1/client/clparse.c.cloexec 2011-07-01 14:13:30.973887714 +0200
++++ dhcp-4.2.2b1/client/clparse.c 2011-07-01 14:15:15.021580693 +0200
+@@ -246,7 +246,7 @@ int read_client_conf_file (const char *n
+ int token;
+ isc_result_t status;
+
+- if ((file = open (name, O_RDONLY)) < 0)
++ if ((file = open (name, O_RDONLY | O_CLOEXEC)) < 0)
+ return uerr2isc (errno);
+
+ cfile = NULL;
+@@ -283,7 +283,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. */
+- if ((file = open (path_dhclient_db, O_RDONLY)) < 0)
++ if ((file = open (path_dhclient_db, O_RDONLY | O_CLOEXEC)) < 0)
+ return;
+
+ cfile = NULL;
+diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
+--- dhcp-4.2.2b1/client/dhclient.c.cloexec 2011-07-01 14:13:30.970887717 +0200
++++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 14:16:51.485930388 +0200
+@@ -148,11 +148,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. */
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 0)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 1)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 2)
+ log_perror = 0; /* No sense logging to /dev/null. */
+ else if (fd != -1)
+@@ -506,7 +506,7 @@ main(int argc, char **argv) {
+ int e;
+
+ oldpid = 0;
+- if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
++ if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
+ e = fscanf(pidfd, "%ld\n", &temp);
+ oldpid = (pid_t)temp;
+
+@@ -548,7 +548,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);
+
+- if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) {
++ if ((pidfd = fopen(new_path_dhclient_pid, "re")) != NULL) {
+ e = fscanf(pidfd, "%ld\n", &temp);
+ oldpid = (pid_t)temp;
+
+@@ -573,7 +573,7 @@ main(int argc, char **argv) {
+ int dhc_running = 0;
+ char procfn[256] = "";
+
+- if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) {
++ if ((pidfp = fopen(path_dhclient_pid, "re")) != NULL) {
+ if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
+ snprintf(procfn,256,"/proc/%u",dhcpid);
+ dhc_running = (access(procfn, F_OK) == 0);
+@@ -2995,7 +2995,7 @@ void rewrite_client_leases ()
+
+ if (leaseFile != NULL)
+ fclose (leaseFile);
+- leaseFile = fopen (path_dhclient_db, "w");
++ leaseFile = fopen (path_dhclient_db, "we");
+ if (leaseFile == NULL) {
+ log_error ("can't create %s: %m", path_dhclient_db);
+ return;
+@@ -3105,7 +3105,7 @@ write_duid(struct data_string *duid)
+ return DHCP_R_INVALIDARG;
+
+ if (leaseFile == NULL) { /* XXX? */
+- leaseFile = fopen(path_dhclient_db, "w");
++ leaseFile = fopen(path_dhclient_db, "we");
+ if (leaseFile == NULL) {
+ log_error("can't create %s: %m", path_dhclient_db);
+ return ISC_R_IOERROR;
+@@ -3285,7 +3285,7 @@ int write_client_lease (client, lease, r
+ return 1;
+
+ if (leaseFile == NULL) { /* XXX */
+- leaseFile = fopen (path_dhclient_db, "w");
++ leaseFile = fopen (path_dhclient_db, "we");
+ if (leaseFile == NULL) {
+ log_error ("can't create %s: %m", path_dhclient_db);
+ return 0;
+@@ -3772,9 +3772,9 @@ void go_daemon ()
+ close(2);
+
+ /* Reopen them on /dev/null. */
+- open("/dev/null", O_RDWR);
+- open("/dev/null", O_RDWR);
+- open("/dev/null", O_RDWR);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
+
+ write_client_pid_file ();
+
+@@ -3791,14 +3791,14 @@ void write_client_pid_file ()
+ return;
+ }
+
+- pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY, 0644);
++ pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
+
+ if (pfdesc < 0) {
+ log_error ("Can't create %s: %m", path_dhclient_pid);
+ return;
+ }
+
+- pf = fdopen (pfdesc, "w");
++ pf = fdopen (pfdesc, "we");
+ if (!pf) {
+ close(pfdesc);
+ log_error ("Can't fdopen %s: %m", path_dhclient_pid);
+diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
+--- dhcp-4.2.2b1/common/bpf.c.cloexec 2011-07-01 14:13:30.976887712 +0200
++++ dhcp-4.2.2b1/common/bpf.c 2011-07-01 14:13:31.030887673 +0200
+@@ -94,7 +94,7 @@ int if_register_bpf (info)
+ for (b = 0; 1; b++) {
+ /* %Audit% 31 bytes max. %2004.06.17,Safe% */
+ sprintf(filename, BPF_FORMAT, b);
+- sock = open (filename, O_RDWR, 0);
++ sock = open (filename, O_RDWR | O_CLOEXEC, 0);
+ if (sock < 0) {
+ if (errno == EBUSY) {
+ continue;
+diff -up dhcp-4.2.2b1/common/discover.c.cloexec dhcp-4.2.2b1/common/discover.c
+--- dhcp-4.2.2b1/common/discover.c.cloexec 2011-06-27 18:18:20.000000000 +0200
++++ dhcp-4.2.2b1/common/discover.c 2011-07-01 14:13:31.031887673 +0200
+@@ -421,7 +421,7 @@ begin_iface_scan(struct iface_conf_list
+ int len;
+ int i;
+
+- ifaces->fp = fopen("/proc/net/dev", "r");
++ ifaces->fp = fopen("/proc/net/dev", "re");
+ if (ifaces->fp == NULL) {
+ log_error("Error opening '/proc/net/dev' to list interfaces");
+ return 0;
+@@ -456,7 +456,7 @@ begin_iface_scan(struct iface_conf_list
+
+ #ifdef DHCPv6
+ if (local_family == AF_INET6) {
+- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
++ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
+ if (ifaces->fp6 == NULL) {
+ log_error("Error opening '/proc/net/if_inet6' to "
+ "list IPv6 interfaces; %m");
+diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
+--- dhcp-4.2.2b1/common/dlpi.c.cloexec 2011-07-01 14:13:30.977887712 +0200
++++ dhcp-4.2.2b1/common/dlpi.c 2011-07-01 14:13:31.032887673 +0200
+@@ -806,7 +806,7 @@ dlpiopen(const char *ifname) {
+ }
+ *dp = '\0';
+
+- return open (devname, O_RDWR, 0);
++ return open (devname, O_RDWR | O_CLOEXEC, 0);
+ }
+
+ /*
+diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
+--- dhcp-4.2.2b1/common/nit.c.cloexec 2011-07-01 14:13:30.978887712 +0200
++++ dhcp-4.2.2b1/common/nit.c 2011-07-01 14:13:31.033887672 +0200
+@@ -81,7 +81,7 @@ int if_register_nit (info)
+ struct strioctl sio;
+
+ /* Open a NIT device */
+- sock = open ("/dev/nit", O_RDWR);
++ sock = open ("/dev/nit", O_RDWR | O_CLOEXEC);
+ if (sock < 0)
+ log_fatal ("Can't open NIT device for %s: %m", info -> name);
+
+diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
+--- dhcp-4.2.2b1/common/resolv.c.cloexec 2009-11-20 02:49:01.000000000 +0100
++++ dhcp-4.2.2b1/common/resolv.c 2011-07-01 14:13:31.033887672 +0200
+@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
+ struct domain_search_list *dp, *dl, *nd;
+ isc_result_t status;
+
+- if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
++ if ((file = open (path_resolv_conf, O_RDONLY | O_CLOEXEC)) < 0) {
+ log_error ("Can't open %s: %m", path_resolv_conf);
+ return;
+ }
+diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
+--- dhcp-4.2.2b1/common/upf.c.cloexec 2011-07-01 14:13:30.979887712 +0200
++++ dhcp-4.2.2b1/common/upf.c 2011-07-01 14:13:31.034887671 +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);
+
+- sock = open (filename, O_RDWR, 0);
++ sock = open (filename, O_RDWR | O_CLOEXEC, 0);
+ if (sock < 0) {
+ if (errno == EBUSY) {
+ continue;
+diff -up dhcp-4.2.2b1/dst/dst_api.c.cloexec dhcp-4.2.2b1/dst/dst_api.c
+--- dhcp-4.2.2b1/dst/dst_api.c.cloexec 2009-10-29 01:46:48.000000000 +0100
++++ dhcp-4.2.2b1/dst/dst_api.c 2011-07-01 14:13:31.035887670 +0200
+@@ -437,7 +437,7 @@ dst_s_write_private_key(const DST_KEY *k
+ PRIVATE_KEY, PATH_MAX);
+
+ /* Do not overwrite an existing file */
+- if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) {
++ if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) {
+ 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",
+@@ -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.)
+ */
+- if ((fp = dst_s_fopen(name, "r", 0)) == NULL) {
++ if ((fp = dst_s_fopen(name, "re", 0)) == NULL) {
+ EREPORT(("dst_read_public_key(): Public Key not found %s\n",
+ name));
+ return (NULL);
+@@ -620,7 +620,7 @@ dst_s_write_public_key(const DST_KEY *ke
+ return (0);
+ }
+ /* create public key file */
+- if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) {
++ if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) {
+ EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
+ filename, errno));
+ return (0);
+@@ -854,7 +854,7 @@ dst_s_read_private_key_file(char *name,
+ return (0);
+ }
+ /* first check if we can find the key file */
+- if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) {
++ if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) {
+ 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.2.2b1/dst/prandom.c.cloexec dhcp-4.2.2b1/dst/prandom.c
+--- dhcp-4.2.2b1/dst/prandom.c.cloexec 2009-11-20 02:49:01.000000000 +0100
++++ dhcp-4.2.2b1/dst/prandom.c 2011-07-01 14:13:31.035887670 +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)) {
+- if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) {
++ if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) {
+ if ((n = read(fd, output, size)) < 0)
+ n = 0;
+ close(fd);
+@@ -480,7 +480,7 @@ digest_file(dst_work *work)
+ work->file_digest = dst_free_key(work->file_digest);
+ return (0);
+ }
+- if ((fp = fopen(name, "r")) == NULL)
++ if ((fp = fopen(name, "re")) == NULL)
+ return (0);
+ for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0;
+ no += i)
+diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
+--- dhcp-4.2.2b1/omapip/trace.c.cloexec 2010-05-27 02:34:57.000000000 +0200
++++ dhcp-4.2.2b1/omapip/trace.c 2011-07-01 14:13:31.036887669 +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 | O_TRUNC,
++ traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC | O_CLOEXEC,
+ 0600);
+ }
+
+@@ -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);
+ return;
+diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
+--- dhcp-4.2.2b1/relay/dhcrelay.c.cloexec 2011-05-10 15:07:37.000000000 +0200
++++ dhcp-4.2.2b1/relay/dhcrelay.c 2011-07-01 14:18:07.630209767 +0200
+@@ -183,11 +183,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. */
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 0)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 1)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 2)
+ log_perror = 0; /* No sense logging to /dev/null. */
+ else if (fd != -1)
+@@ -540,13 +540,13 @@ main(int argc, char **argv) {
+
+ if (no_pid_file == ISC_FALSE) {
+ pfdesc = open(path_dhcrelay_pid,
+- O_CREAT | O_TRUNC | O_WRONLY, 0644);
++ O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
+
+ if (pfdesc < 0) {
+ log_error("Can't create %s: %m",
+ path_dhcrelay_pid);
+ } else {
+- pf = fdopen(pfdesc, "w");
++ pf = fdopen(pfdesc, "we");
+ if (!pf)
+ log_error("Can't fdopen %s: %m",
+ path_dhcrelay_pid);
+diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
+--- dhcp-4.2.2b1/server/confpars.c.cloexec 2010-10-14 00:34:45.000000000 +0200
++++ dhcp-4.2.2b1/server/confpars.c 2011-07-01 14:13:31.039887666 +0200
+@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char
+ }
+ #endif
+
+- if ((file = open (filename, O_RDONLY)) < 0) {
++ if ((file = open (filename, O_RDONLY | O_CLOEXEC)) < 0) {
+ if (leasep) {
+ log_error ("Can't open lease database %s: %m --",
+ path_dhcpd_db);
+diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
+--- dhcp-4.2.2b1/server/db.c.cloexec 2010-09-14 00:15:26.000000000 +0200
++++ dhcp-4.2.2b1/server/db.c 2011-07-01 14:13:31.040887665 +0200
+@@ -1035,7 +1035,7 @@ void db_startup (testp)
+ }
+ #endif
+ if (!testp) {
+- db_file = fopen (path_dhcpd_db, "a");
++ db_file = fopen (path_dhcpd_db, "ae");
+ if (!db_file)
+ log_fatal ("Can't open %s for append.", path_dhcpd_db);
+ expire_all_pools ();
+@@ -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");
+
+- db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
++ db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0664);
+ if (db_fd < 0) {
+ log_error ("Can't create new lease file: %m");
+ return 0;
+ }
+- if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
++ if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
+ log_error("Can't fdopen new lease file: %m");
+ close(db_fd);
+ goto fdfail;
+diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
+--- dhcp-4.2.2b1/server/dhcpd.c.cloexec 2011-04-21 16:08:15.000000000 +0200
++++ dhcp-4.2.2b1/server/dhcpd.c 2011-07-01 14:19:40.354124505 +0200
+@@ -270,11 +270,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. */
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 0)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 1)
+- fd = open("/dev/null", O_RDWR);
++ fd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (fd == 2)
+ log_perror = 0; /* No sense logging to /dev/null. */
+ else if (fd != -1)
+@@ -793,7 +793,7 @@ main(int argc, char **argv) {
+ */
+ if (no_pid_file == ISC_FALSE) {
+ /*Read previous pid file. */
+- if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
++ if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) {
+ status = read(i, pbuf, (sizeof pbuf) - 1);
+ close (i);
+ if (status > 0) {
+@@ -812,7 +812,7 @@ main(int argc, char **argv) {
+ }
+
+ /* Write new pid file. */
+- i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644);
++ i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
+ if (i >= 0) {
+ sprintf(pbuf, "%d\n", (int) getpid());
+ IGNORE_RET (write(i, pbuf, strlen(pbuf)));
+@@ -840,9 +840,9 @@ main(int argc, char **argv) {
+ close(2);
+
+ /* Reopen them on /dev/null. */
+- open("/dev/null", O_RDWR);
+- open("/dev/null", O_RDWR);
+- open("/dev/null", O_RDWR);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
++ open("/dev/null", O_RDWR | O_CLOEXEC);
+ log_perror = 0; /* No sense logging to /dev/null. */
+
+ IGNORE_RET (chdir("/"));
+diff -up dhcp-4.2.2b1/server/ldap.c.cloexec dhcp-4.2.2b1/server/ldap.c
+--- dhcp-4.2.2b1/server/ldap.c.cloexec 2010-03-25 16:26:58.000000000 +0100
++++ dhcp-4.2.2b1/server/ldap.c 2011-07-01 14:13:31.043887665 +0200
+@@ -685,7 +685,7 @@ ldap_start (void)
+
+ if (ldap_debug_file != NULL && ldap_debug_fd == -1)
+ {
+- if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY,
++ if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
+ S_IRUSR | S_IWUSR)) < 0)
+ log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
+ strerror (errno));
diff --git a/dhcp-4.2.1-PIE-RELRO.patch b/dhcp-4.2.2-PIE-RELRO.patch
similarity index 62%
rename from dhcp-4.2.1-PIE-RELRO.patch
rename to dhcp-4.2.2-PIE-RELRO.patch
index 2dea12a..0eb68b1 100644
--- a/dhcp-4.2.1-PIE-RELRO.patch
+++ b/dhcp-4.2.2-PIE-RELRO.patch
@@ -1,18 +1,18 @@
-diff -up dhcp-4.2.1rc1/bind/Makefile.PIE-RELRO dhcp-4.2.1rc1/bind/Makefile
---- dhcp-4.2.1rc1/bind/Makefile.PIE-RELRO 2011-02-18 20:59:02.000000000 +0100
-+++ dhcp-4.2.1rc1/bind/Makefile 2011-02-23 10:56:35.000000000 +0100
+diff -up dhcp-4.2.2b1/bind/Makefile.PIE-RELRO dhcp-4.2.2b1/bind/Makefile
+--- dhcp-4.2.2b1/bind/Makefile.PIE-RELRO 2011-06-27 23:43:09.000000000 +0200
++++ dhcp-4.2.2b1/bind/Makefile 2011-07-01 14:28:49.134674155 +0200
@@ -45,7 +45,7 @@ all:
# Currently disable the epoll and devpoll options as they don't interact
# well with the DHCP code.
@echo Configuring BIND Export libraries for DHCP.
-- @(cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib > ${binddir}/configure.log)
-+ @(cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-libtool --with-pic --disable-shared > ${binddir}/configure.log)
+- @(cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log)
++ @(cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no --with-libtool --with-pic --disable-shared > ${binddir}/configure.log)
# Build the export libraries
@echo Building BIND Export libraries - this takes some time.
-diff -up dhcp-4.2.1rc1/client/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/client/Makefile.am
---- dhcp-4.2.1rc1/client/Makefile.am.PIE-RELRO 2011-02-23 10:56:35.000000000 +0100
-+++ dhcp-4.2.1rc1/client/Makefile.am 2011-02-23 10:56:35.000000000 +0100
+diff -up dhcp-4.2.2b1/client/Makefile.am.PIE-RELRO dhcp-4.2.2b1/client/Makefile.am
+--- dhcp-4.2.2b1/client/Makefile.am.PIE-RELRO 2011-07-01 14:26:36.995286194 +0200
++++ dhcp-4.2.2b1/client/Makefile.am 2011-07-01 14:26:37.047285196 +0200
@@ -4,15 +4,11 @@ dhclient_SOURCES = clparse.c dhclient.c
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
scripts/netbsd scripts/nextstep scripts/openbsd \
@@ -33,9 +33,9 @@ diff -up dhcp-4.2.1rc1/client/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/client/Makefil
-dhc6.o: dhc6.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
-diff -up dhcp-4.2.1rc1/common/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/common/Makefile.am
---- dhcp-4.2.1rc1/common/Makefile.am.PIE-RELRO 2011-02-18 19:44:42.000000000 +0100
-+++ dhcp-4.2.1rc1/common/Makefile.am 2011-02-23 10:59:39.000000000 +0100
+diff -up dhcp-4.2.2b1/common/Makefile.am.PIE-RELRO dhcp-4.2.2b1/common/Makefile.am
+--- dhcp-4.2.2b1/common/Makefile.am.PIE-RELRO 2011-02-18 19:44:42.000000000 +0100
++++ dhcp-4.2.2b1/common/Makefile.am 2011-07-01 14:26:37.048285177 +0200
@@ -1,5 +1,5 @@
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
-AM_CFLAGS = $(LDAP_CFLAGS)
@@ -43,9 +43,9 @@ diff -up dhcp-4.2.1rc1/common/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/common/Makefil
noinst_LIBRARIES = libdhcp.a
libdhcp_a_SOURCES = alloc.c bpf.c comapi.c conflex.c ctrace.c discover.c \
-diff -up dhcp-4.2.1rc1/omapip/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/omapip/Makefile.am
---- dhcp-4.2.1rc1/omapip/Makefile.am.PIE-RELRO 2010-02-12 01:13:54.000000000 +0100
-+++ dhcp-4.2.1rc1/omapip/Makefile.am 2011-02-23 10:56:35.000000000 +0100
+diff -up dhcp-4.2.2b1/omapip/Makefile.am.PIE-RELRO dhcp-4.2.2b1/omapip/Makefile.am
+--- dhcp-4.2.2b1/omapip/Makefile.am.PIE-RELRO 2011-07-01 14:26:36.884288319 +0200
++++ dhcp-4.2.2b1/omapip/Makefile.am 2011-07-01 14:26:37.048285177 +0200
@@ -1,3 +1,5 @@
+AM_CFLAGS = -fpic
+
@@ -59,9 +59,9 @@ diff -up dhcp-4.2.1rc1/omapip/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/omapip/Makefil
+svtest_CFLAGS = -fpie
svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
-diff -up dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/relay/Makefile.am
---- dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO 2009-10-28 05:12:30.000000000 +0100
-+++ dhcp-4.2.1rc1/relay/Makefile.am 2011-02-23 10:56:35.000000000 +0100
+diff -up dhcp-4.2.2b1/relay/Makefile.am.PIE-RELRO dhcp-4.2.2b1/relay/Makefile.am
+--- dhcp-4.2.2b1/relay/Makefile.am.PIE-RELRO 2011-07-01 14:26:36.884288319 +0200
++++ dhcp-4.2.2b1/relay/Makefile.am 2011-07-01 14:26:37.049285158 +0200
@@ -2,8 +2,11 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
sbin_PROGRAMS = dhcrelay
@@ -74,10 +74,10 @@ diff -up dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/relay/Makefile.
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.1rc1/server/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/server/Makefile.am
---- dhcp-4.2.1rc1/server/Makefile.am.PIE-RELRO 2010-03-24 22:49:47.000000000 +0100
-+++ dhcp-4.2.1rc1/server/Makefile.am 2011-02-23 10:56:35.000000000 +0100
-@@ -6,9 +6,10 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
+diff -up dhcp-4.2.2b1/server/Makefile.am.PIE-RELRO dhcp-4.2.2b1/server/Makefile.am
+--- dhcp-4.2.2b1/server/Makefile.am.PIE-RELRO 2011-07-01 14:26:36.885288300 +0200
++++ dhcp-4.2.2b1/server/Makefile.am 2011-07-01 14:26:37.049285158 +0200
+@@ -6,9 +6,10 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
dhcpv6.c mdb6.c ldap.c ldap_casa.c
diff --git a/dhcp-4.2.2-dhclient-usage.patch b/dhcp-4.2.2-dhclient-usage.patch
new file mode 100644
index 0000000..0d41943
--- /dev/null
+++ b/dhcp-4.2.2-dhclient-usage.patch
@@ -0,0 +1,14 @@
+diff -up dhcp-4.2.2b1/client/dhclient.c.usage dhcp-4.2.2b1/client/dhclient.c
+--- dhcp-4.2.2b1/client/dhclient.c.usage 2011-07-01 13:55:16.000000000 +0200
++++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 13:58:55.243800602 +0200
+@@ -1047,6 +1047,10 @@ static void usage()
+ " [-s server-addr] [-cf config-file] "
+ "[-lf lease-file]\n"
+ " [-pf pid-file] [--no-pid] [-e VAR=val]\n"
++ " [-I <dhcp-client-identifier>] [-B]\n"
++ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
++ " [-V <vendor-class-identifier>]\n"
++ " [-R <request option list>]\n"
+ " [-sf script-file] [interface]");
+ }
+
diff --git a/dhcp-4.2.0-options.patch b/dhcp-4.2.2-options.patch
similarity index 86%
rename from dhcp-4.2.0-options.patch
rename to dhcp-4.2.2-options.patch
index 5ebe870..32e2add 100644
--- a/dhcp-4.2.0-options.patch
+++ b/dhcp-4.2.2-options.patch
@@ -1,7 +1,7 @@
-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 ()
+diff -up dhcp-4.2.2b1/client/clparse.c.options dhcp-4.2.2b1/client/clparse.c
+--- dhcp-4.2.2b1/client/clparse.c.options 2011-04-21 16:08:14.000000000 +0200
++++ dhcp-4.2.2b1/client/clparse.c 2011-07-01 13:51:52.935755570 +0200
+@@ -146,6 +146,7 @@ isc_result_t read_client_conf ()
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
*/
top_level_config.requested_lease = 7200;
@@ -9,7 +9,7 @@ diff -up dhcp-4.2.0/client/clparse.c.options dhcp-4.2.0/client/clparse.c
group_allocate (&top_level_config.on_receipt, MDL);
if (!top_level_config.on_receipt)
-@@ -303,7 +304,8 @@ void read_client_leases ()
+@@ -313,7 +314,8 @@ void read_client_leases ()
interface-declaration |
LEASE client-lease-statement |
ALIAS client-lease-statement |
@@ -19,7 +19,7 @@ diff -up dhcp-4.2.0/client/clparse.c.options dhcp-4.2.0/client/clparse.c
void parse_client_statement (cfile, ip, config)
struct parse *cfile;
-@@ -717,6 +719,12 @@ void parse_client_statement (cfile, ip,
+@@ -732,6 +734,12 @@ void parse_client_statement (cfile, ip,
parse_reject_statement (cfile, config);
return;
@@ -32,9 +32,9 @@ diff -up dhcp-4.2.0/client/clparse.c.options dhcp-4.2.0/client/clparse.c
default:
lose = 0;
stmt = (struct executable_statement *)0;
-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
+diff -up dhcp-4.2.2b1/client/dhclient.c.options dhcp-4.2.2b1/client/dhclient.c
+--- dhcp-4.2.2b1/client/dhclient.c.options 2011-05-11 16:20:59.000000000 +0200
++++ dhcp-4.2.2b1/client/dhclient.c 2011-07-01 13:51:52.936755545 +0200
@@ -39,6 +39,12 @@
#include <limits.h>
#include <dns/result.h>
@@ -48,7 +48,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
-@@ -82,6 +88,9 @@ int wanted_ia_na = -1; /* the absolute
+@@ -87,6 +93,9 @@ int wanted_ia_na = -1; /* the absolute
int wanted_ia_ta = 0;
int wanted_ia_pd = 0;
char *mockup_relay = NULL;
@@ -58,7 +58,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
void run_stateless(int exit_mode);
-@@ -112,6 +121,15 @@ main(int argc, char **argv) {
+@@ -123,6 +132,15 @@ main(int argc, char **argv) {
int local_family_set = 0;
#endif /* DHCPv6 */
char *s;
@@ -74,7 +74,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
/* Initialize client globals. */
memset(&default_duid, 0, sizeof(default_duid));
-@@ -297,6 +315,88 @@ main(int argc, char **argv) {
+@@ -310,6 +328,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.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
} else if (argv[i][0] == '-') {
usage();
} else if (interfaces_requested < 0) {
-@@ -466,6 +566,166 @@ main(int argc, char **argv) {
+@@ -484,6 +584,166 @@ main(int argc, char **argv) {
/* Parse the dhclient.conf file. */
read_client_conf();
@@ -330,7 +330,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
/* Parse the lease database. */
read_client_leases();
-@@ -2337,7 +2597,8 @@ void make_discover (client, lease)
+@@ -2397,7 +2657,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.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2421,7 +2682,9 @@ void make_request (client, lease)
+@@ -2481,7 +2742,9 @@ void make_request (client, lease)
} else {
memset (&client -> packet.ciaddr, 0,
sizeof client -> packet.ciaddr);
@@ -351,7 +351,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2483,7 +2746,8 @@ void make_decline (client, lease)
+@@ -2543,7 +2806,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.2.0/client/dhclient.c.options dhcp-4.2.0/client/dhclient.c
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-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)
+diff -up dhcp-4.2.2b1/common/conflex.c.options dhcp-4.2.2b1/common/conflex.c
+--- dhcp-4.2.2b1/common/conflex.c.options 2011-05-11 16:20:59.000000000 +0200
++++ dhcp-4.2.2b1/common/conflex.c 2011-07-01 13:51:52.938755494 +0200
+@@ -808,6 +808,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.2.0/common/conflex.c.options dhcp-4.2.0/common/conflex.c
break;
case 'c':
if (!strcasecmp(atom + 1, "ase"))
-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 {
+diff -up dhcp-4.2.2b1/includes/dhcpd.h.options dhcp-4.2.2b1/includes/dhcpd.h
+--- dhcp-4.2.2b1/includes/dhcpd.h.options 2011-05-20 16:21:11.000000000 +0200
++++ dhcp-4.2.2b1/includes/dhcpd.h 2011-07-01 13:51:52.940755442 +0200
+@@ -1147,6 +1147,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,16 @@ diff -up dhcp-4.2.0/includes/dhcpd.h.options dhcp-4.2.0/includes/dhcpd.h
};
/* Per-interface state used in the dhcp client... */
-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,
+diff -up dhcp-4.2.2b1/includes/dhctoken.h.options dhcp-4.2.2b1/includes/dhctoken.h
+--- dhcp-4.2.2b1/includes/dhctoken.h.options 2011-05-12 14:02:47.000000000 +0200
++++ dhcp-4.2.2b1/includes/dhctoken.h 2011-07-01 13:53:43.316861637 +0200
+@@ -361,7 +361,8 @@ enum dhcp_token {
GETHOSTNAME = 662,
-- REWIND = 663
-+ REWIND = 663,
-+ BOOTP_BROADCAST_ALWAYS = 664
+ REWIND = 663,
+ INITIAL_DELAY = 664,
+- GETHOSTBYNAME = 665
++ GETHOSTBYNAME = 665,
++ BOOTP_BROADCAST_ALWAYS = 666
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
diff --git a/dhcp-4.2.0-rfc3442-classless-static-routes.patch b/dhcp-4.2.2-rfc3442-classless-static-routes.patch
similarity index 79%
rename from dhcp-4.2.0-rfc3442-classless-static-routes.patch
rename to dhcp-4.2.2-rfc3442-classless-static-routes.patch
index d1292f5..0a0bfcb 100644
--- a/dhcp-4.2.0-rfc3442-classless-static-routes.patch
+++ b/dhcp-4.2.2-rfc3442-classless-static-routes.patch
@@ -1,6 +1,6 @@
-diff -up dhcp-4.2.0/client/clparse.c.rfc3442 dhcp-4.2.0/client/clparse.c
---- dhcp-4.2.0/client/clparse.c.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/client/clparse.c 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/client/clparse.c.rfc3442 dhcp-4.2.2b1/client/clparse.c
+--- dhcp-4.2.2b1/client/clparse.c.rfc3442 2011-07-01 14:22:38.031534508 +0200
++++ dhcp-4.2.2b1/client/clparse.c 2011-07-01 14:22:38.128532940 +0200
@@ -37,7 +37,7 @@
struct client_config top_level_config;
@@ -35,9 +35,9 @@ diff -up dhcp-4.2.0/client/clparse.c.rfc3442 dhcp-4.2.0/client/clparse.c
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
if (default_requested_options[code] == NULL)
log_fatal("Unable to find option definition for "
-diff -up dhcp-4.2.0/common/dhcp-options.5.rfc3442 dhcp-4.2.0/common/dhcp-options.5
---- dhcp-4.2.0/common/dhcp-options.5.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/common/dhcp-options.5 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/common/dhcp-options.5.rfc3442 dhcp-4.2.2b1/common/dhcp-options.5
+--- dhcp-4.2.2b1/common/dhcp-options.5.rfc3442 2011-07-01 14:22:38.020534686 +0200
++++ dhcp-4.2.2b1/common/dhcp-options.5 2011-07-01 14:22:38.129532924 +0200
@@ -115,6 +115,26 @@ hexadecimal, separated by colons. For
or
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
@@ -95,10 +95,10 @@ diff -up dhcp-4.2.0/common/dhcp-options.5.rfc3442 dhcp-4.2.0/common/dhcp-options
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
[\fB,\fR \fIip-address\fR...]\fB;\fR
.fi
-diff -up dhcp-4.2.0/common/inet.c.rfc3442 dhcp-4.2.0/common/inet.c
---- dhcp-4.2.0/common/inet.c.rfc3442 2009-11-20 02:49:00.000000000 +0100
-+++ dhcp-4.2.0/common/inet.c 2010-08-31 10:13:49.000000000 +0200
-@@ -526,6 +526,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
+diff -up dhcp-4.2.2b1/common/inet.c.rfc3442 dhcp-4.2.2b1/common/inet.c
+--- dhcp-4.2.2b1/common/inet.c.rfc3442 2011-05-11 02:47:22.000000000 +0200
++++ dhcp-4.2.2b1/common/inet.c 2011-07-01 14:22:38.130532908 +0200
+@@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
return ISC_R_SUCCESS;
}
@@ -159,9 +159,9 @@ diff -up dhcp-4.2.0/common/inet.c.rfc3442 dhcp-4.2.0/common/inet.c
/* piaddr() turns an iaddr structure into a printable address. */
/* XXX: should use a const pointer rather than passing the structure */
const char *
-diff -up dhcp-4.2.0/common/options.c.rfc3442 dhcp-4.2.0/common/options.c
---- dhcp-4.2.0/common/options.c.rfc3442 2010-06-01 19:29:59.000000000 +0200
-+++ dhcp-4.2.0/common/options.c 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/common/options.c.rfc3442 dhcp-4.2.2b1/common/options.c
+--- dhcp-4.2.2b1/common/options.c.rfc3442 2011-03-24 22:57:13.000000000 +0100
++++ dhcp-4.2.2b1/common/options.c 2011-07-01 14:22:38.132532876 +0200
@@ -706,7 +706,11 @@ cons_options(struct packet *inpacket, st
* packet.
*/
@@ -246,9 +246,9 @@ diff -up dhcp-4.2.0/common/options.c.rfc3442 dhcp-4.2.0/common/options.c
case '6':
iaddr.len = 16;
memcpy(iaddr.iabuf, dp, 16);
-diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
---- dhcp-4.2.0/common/parse.c.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/common/parse.c 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/common/parse.c.rfc3442 dhcp-4.2.2b1/common/parse.c
+--- dhcp-4.2.2b1/common/parse.c.rfc3442 2011-07-01 14:22:38.097533441 +0200
++++ dhcp-4.2.2b1/common/parse.c 2011-07-01 14:22:38.135532828 +0200
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
}
@@ -289,7 +289,7 @@ diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
* Return true if every character in the string is hexadecimal.
*/
static int
-@@ -707,8 +740,10 @@ unsigned char *parse_numeric_aggregate (
+@@ -700,8 +733,10 @@ unsigned char *parse_numeric_aggregate (
if (count) {
token = peek_token (&val, (unsigned *)0, cfile);
if (token != separator) {
@@ -301,7 +301,7 @@ diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
if (token != RBRACE && token != LBRACE)
token = next_token (&val,
(unsigned *)0,
-@@ -1619,6 +1654,9 @@ int parse_option_code_definition (cfile,
+@@ -1624,6 +1659,9 @@ int parse_option_code_definition (cfile,
case IP_ADDRESS:
type = 'I';
break;
@@ -311,7 +311,7 @@ diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
case IP6_ADDRESS:
type = '6';
break;
-@@ -5232,6 +5270,15 @@ int parse_option_token (rv, cfile, fmt,
+@@ -5288,6 +5326,15 @@ int parse_option_token (rv, cfile, fmt,
}
break;
@@ -327,7 +327,7 @@ diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
case '6': /* IPv6 address. */
if (!parse_ip6_addr(cfile, &addr)) {
return 0;
-@@ -5492,6 +5539,13 @@ int parse_option_decl (oc, cfile)
+@@ -5548,6 +5595,13 @@ int parse_option_decl (oc, cfile)
goto exit;
len = ip_addr.len;
dp = ip_addr.iabuf;
@@ -341,9 +341,9 @@ diff -up dhcp-4.2.0/common/parse.c.rfc3442 dhcp-4.2.0/common/parse.c
alloc:
if (hunkix + len > sizeof hunkbuf) {
-diff -up dhcp-4.2.0/common/tables.c.rfc3442 dhcp-4.2.0/common/tables.c
---- dhcp-4.2.0/common/tables.c.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/common/tables.c 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/common/tables.c.rfc3442 dhcp-4.2.2b1/common/tables.c
+--- dhcp-4.2.2b1/common/tables.c.rfc3442 2011-07-01 14:22:38.087533601 +0200
++++ dhcp-4.2.2b1/common/tables.c 2011-07-01 14:22:38.137532796 +0200
@@ -51,6 +51,7 @@ HASH_FUNCTIONS (option_code, const unsig
Format codes:
@@ -360,28 +360,28 @@ diff -up dhcp-4.2.0/common/tables.c.rfc3442 dhcp-4.2.0/common/tables.c
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
#if 0
-diff -up dhcp-4.2.0/includes/dhcpd.h.rfc3442 dhcp-4.2.0/includes/dhcpd.h
---- dhcp-4.2.0/includes/dhcpd.h.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/includes/dhcpd.h 2010-08-31 10:13:49.000000000 +0200
-@@ -2638,6 +2638,7 @@ isc_result_t range2cidr(struct iaddrcidr
+diff -up dhcp-4.2.2b1/includes/dhcpd.h.rfc3442 dhcp-4.2.2b1/includes/dhcpd.h
+--- dhcp-4.2.2b1/includes/dhcpd.h.rfc3442 2011-07-01 14:22:38.000000000 +0200
++++ dhcp-4.2.2b1/includes/dhcpd.h 2011-07-01 14:24:19.999810333 +0200
+@@ -2662,6 +2662,7 @@ isc_result_t range2cidr(struct iaddrcidr
const struct iaddr *lo, const struct iaddr *hi);
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
- const char *piaddr PROTO ((struct iaddr));
-+const char *pdestdesc PROTO ((struct iaddr));
+ const char *piaddr (struct iaddr);
++const char *pdestdesc (struct iaddr);
char *piaddrmask(struct iaddr *, struct iaddr *);
char *piaddrcidr(const struct iaddr *, unsigned int);
u_int16_t validate_port(char *);
-@@ -2849,6 +2850,7 @@ void parse_client_lease_declaration PROT
- int parse_option_decl PROTO ((struct option_cache **, struct parse *));
- void parse_string_list PROTO ((struct parse *, struct string_list **, int));
- int parse_ip_addr PROTO ((struct parse *, struct iaddr *));
-+int parse_destination_descriptor PROTO ((struct parse *, struct iaddr *));
+@@ -2869,6 +2870,7 @@ void parse_client_lease_declaration (str
+ int parse_option_decl (struct option_cache **, struct parse *);
+ void parse_string_list (struct parse *, struct string_list **, int);
+ int parse_ip_addr (struct parse *, struct iaddr *);
++int parse_destination_descriptor (struct parse *, struct iaddr *);
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
- void parse_reject_statement PROTO ((struct parse *, struct client_config *));
+ void parse_reject_statement (struct parse *, struct client_config *);
-diff -up dhcp-4.2.0/includes/dhcp.h.rfc3442 dhcp-4.2.0/includes/dhcp.h
---- dhcp-4.2.0/includes/dhcp.h.rfc3442 2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.0/includes/dhcp.h 2010-08-31 10:13:49.000000000 +0200
+diff -up dhcp-4.2.2b1/includes/dhcp.h.rfc3442 dhcp-4.2.2b1/includes/dhcp.h
+--- dhcp-4.2.2b1/includes/dhcp.h.rfc3442 2009-11-20 02:49:01.000000000 +0100
++++ dhcp-4.2.2b1/includes/dhcp.h 2011-07-01 14:22:38.145532665 +0200
@@ -158,6 +158,7 @@ struct dhcp_packet {
#define DHO_ASSOCIATED_IP 92
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
@@ -390,16 +390,16 @@ diff -up dhcp-4.2.0/includes/dhcp.h.rfc3442 dhcp-4.2.0/includes/dhcp.h
#define DHO_VIVCO_SUBOPTIONS 124
#define DHO_VIVSO_SUBOPTIONS 125
-diff -up dhcp-4.2.0/includes/dhctoken.h.rfc3442 dhcp-4.2.0/includes/dhctoken.h
---- dhcp-4.2.0/includes/dhctoken.h.rfc3442 2010-08-31 10:12:51.000000000 +0200
-+++ dhcp-4.2.0/includes/dhctoken.h 2010-08-31 10:15:39.000000000 +0200
-@@ -358,7 +358,8 @@ enum dhcp_token {
- AUTO_PARTNER_DOWN = 661,
- GETHOSTNAME = 662,
+diff -up dhcp-4.2.2b1/includes/dhctoken.h.rfc3442 dhcp-4.2.2b1/includes/dhctoken.h
+--- dhcp-4.2.2b1/includes/dhctoken.h.rfc3442 2011-07-01 14:22:37.000000000 +0200
++++ dhcp-4.2.2b1/includes/dhctoken.h 2011-07-01 14:25:12.541867623 +0200
+@@ -362,7 +362,8 @@ enum dhcp_token {
REWIND = 663,
-- BOOTP_BROADCAST_ALWAYS = 664
-+ BOOTP_BROADCAST_ALWAYS = 664,
-+ DESTINATION_DESCRIPTOR = 666
+ INITIAL_DELAY = 664,
+ GETHOSTBYNAME = 665,
+- BOOTP_BROADCAST_ALWAYS = 666
++ BOOTP_BROADCAST_ALWAYS = 666,
++ DESTINATION_DESCRIPTOR = 667
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
diff --git a/dhcp-4.2.1-xen-checksum.patch b/dhcp-4.2.2-xen-checksum.patch
similarity index 70%
rename from dhcp-4.2.1-xen-checksum.patch
rename to dhcp-4.2.2-xen-checksum.patch
index 65ffca9..038d346 100644
--- a/dhcp-4.2.1-xen-checksum.patch
+++ b/dhcp-4.2.2-xen-checksum.patch
@@ -1,6 +1,6 @@
-diff -up dhcp-4.2.1-P1/common/bpf.c.xen dhcp-4.2.1-P1/common/bpf.c
---- dhcp-4.2.1-P1/common/bpf.c.xen 2009-11-20 02:48:59.000000000 +0100
-+++ dhcp-4.2.1-P1/common/bpf.c 2011-06-17 13:33:18.398055078 +0200
+diff -up dhcp-4.2.2b1/common/bpf.c.xen dhcp-4.2.2b1/common/bpf.c
+--- dhcp-4.2.2b1/common/bpf.c.xen 2009-11-20 02:48:59.000000000 +0100
++++ dhcp-4.2.2b1/common/bpf.c 2011-07-01 14:00:16.936959001 +0200
@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf,
offset = decode_udp_ip_header (interface,
interface -> rbuf,
@@ -10,10 +10,10 @@ diff -up dhcp-4.2.1-P1/common/bpf.c.xen dhcp-4.2.1-P1/common/bpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
-diff -up dhcp-4.2.1-P1/common/dlpi.c.xen dhcp-4.2.1-P1/common/dlpi.c
---- dhcp-4.2.1-P1/common/dlpi.c.xen 2011-02-18 20:16:04.000000000 +0100
-+++ dhcp-4.2.1-P1/common/dlpi.c 2011-06-17 13:33:18.398055078 +0200
-@@ -695,7 +695,7 @@ ssize_t receive_packet (interface, buf,
+diff -up dhcp-4.2.2b1/common/dlpi.c.xen dhcp-4.2.2b1/common/dlpi.c
+--- dhcp-4.2.2b1/common/dlpi.c.xen 2011-05-11 16:20:59.000000000 +0200
++++ dhcp-4.2.2b1/common/dlpi.c 2011-07-01 14:00:16.937958997 +0200
+@@ -693,7 +693,7 @@ ssize_t receive_packet (interface, buf,
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
@@ -22,10 +22,10 @@ diff -up dhcp-4.2.1-P1/common/dlpi.c.xen dhcp-4.2.1-P1/common/dlpi.c
/*
* If the IP or UDP checksum was bad, skip the packet...
-diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
---- dhcp-4.2.1-P1/common/lpf.c.xen 2009-07-23 20:52:19.000000000 +0200
-+++ dhcp-4.2.1-P1/common/lpf.c 2011-06-17 13:37:31.611730430 +0200
-@@ -29,18 +29,33 @@
+diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
+--- dhcp-4.2.2b1/common/lpf.c.xen 2011-05-10 16:38:58.000000000 +0200
++++ dhcp-4.2.2b1/common/lpf.c 2011-07-01 14:11:24.725748028 +0200
+@@ -29,19 +29,33 @@
#include "dhcpd.h"
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
#include <sys/ioctl.h>
@@ -38,6 +38,7 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
#include <linux/if_ether.h>
+#include <linux/if_packet.h>
#include <netinet/in_systm.h>
+-#include <net/if_packet.h>
#include "includes/netinet/ip.h"
#include "includes/netinet/udp.h"
#include "includes/netinet/if_ether.h"
@@ -59,7 +60,7 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */
-@@ -66,10 +81,14 @@ int if_register_lpf (info)
+@@ -67,10 +81,14 @@ int if_register_lpf (info)
struct interface_info *info;
{
int sock;
@@ -76,7 +77,7 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
htons((short)ETH_P_ALL))) < 0) {
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-@@ -84,11 +103,17 @@ int if_register_lpf (info)
+@@ -85,11 +103,17 @@ int if_register_lpf (info)
log_fatal ("Open a socket for LPF: %m");
}
@@ -97,7 +98,7 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
errno == EAFNOSUPPORT || errno == EINVAL) {
-@@ -170,9 +195,18 @@ static void lpf_gen_filter_setup (struct
+@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
void if_register_receive (info)
struct interface_info *info;
{
@@ -116,32 +117,34 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
#if defined (HAVE_TR_SUPPORT)
if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
lpf_tr_filter_setup (info);
-@@ -294,7 +328,6 @@ ssize_t send_packet (interface, packet,
+@@ -295,7 +328,6 @@ ssize_t send_packet (interface, packet,
double hh [16];
double ih [1536 / sizeof (double)];
unsigned char *buf = (unsigned char *)ih;
-- struct sockaddr sa;
+- struct sockaddr_pkt sa;
int result;
int fudge;
-@@ -315,15 +348,7 @@ ssize_t send_packet (interface, packet,
+@@ -316,17 +348,7 @@ ssize_t send_packet (interface, packet,
(unsigned char *)raw, len);
memcpy (buf + ibufp, raw, len);
- /* For some reason, SOCK_PACKET sockets can't be connected,
- so we have to do a sentdo every time. */
- memset (&sa, 0, sizeof sa);
-- sa.sa_family = AF_PACKET;
-- strncpy (sa.sa_data,
-- (const char *)interface -> ifp, sizeof sa.sa_data);
+- sa.spkt_family = AF_PACKET;
+- strncpy ((char *)sa.spkt_device,
+- (const char *)interface -> ifp, sizeof sa.spkt_device);
+- sa.spkt_protocol = htons(ETH_P_IP);
-
- result = sendto (interface -> wfdesc,
-- buf + fudge, ibufp + len - fudge, 0, &sa, sizeof sa);
+- buf + fudge, ibufp + len - fudge, 0,
+- (const struct sockaddr *)&sa, sizeof sa);
+ result = write (interface -> wfdesc, buf + fudge, ibufp + len - fudge);
if (result < 0)
log_error ("send_packet: %m");
return result;
-@@ -340,14 +365,35 @@ ssize_t receive_packet (interface, buf,
+@@ -343,14 +365,35 @@ ssize_t receive_packet (interface, buf,
{
int length = 0;
int offset = 0;
@@ -178,7 +181,7 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
bufix = 0;
/* Decode the physical header... */
offset = decode_hw_header (interface, ibuf, bufix, hfrom);
-@@ -364,7 +410,7 @@ ssize_t receive_packet (interface, buf,
+@@ -367,7 +410,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
@@ -187,9 +190,9 @@ diff -up dhcp-4.2.1-P1/common/lpf.c.xen dhcp-4.2.1-P1/common/lpf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
-diff -up dhcp-4.2.1-P1/common/nit.c.xen dhcp-4.2.1-P1/common/nit.c
---- dhcp-4.2.1-P1/common/nit.c.xen 2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.1-P1/common/nit.c 2011-06-17 13:33:18.414054663 +0200
+diff -up dhcp-4.2.2b1/common/nit.c.xen dhcp-4.2.2b1/common/nit.c
+--- dhcp-4.2.2b1/common/nit.c.xen 2009-11-20 02:49:01.000000000 +0100
++++ dhcp-4.2.2b1/common/nit.c 2011-07-01 14:00:16.939958989 +0200
@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
@@ -199,9 +202,9 @@ diff -up dhcp-4.2.1-P1/common/nit.c.xen dhcp-4.2.1-P1/common/nit.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
-diff -up dhcp-4.2.1-P1/common/packet.c.xen dhcp-4.2.1-P1/common/packet.c
---- dhcp-4.2.1-P1/common/packet.c.xen 2009-07-23 20:52:20.000000000 +0200
-+++ dhcp-4.2.1-P1/common/packet.c 2011-06-17 13:33:18.414054663 +0200
+diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
+--- dhcp-4.2.2b1/common/packet.c.xen 2009-07-23 20:52:20.000000000 +0200
++++ dhcp-4.2.2b1/common/packet.c 2011-07-01 14:00:16.939958989 +0200
@@ -211,7 +211,7 @@ ssize_t
decode_udp_ip_header(struct interface_info *interface,
unsigned char *buf, unsigned bufix,
@@ -220,9 +223,9 @@ diff -up dhcp-4.2.1-P1/common/packet.c.xen dhcp-4.2.1-P1/common/packet.c
udp_packets_bad_checksum++;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
-diff -up dhcp-4.2.1-P1/common/upf.c.xen dhcp-4.2.1-P1/common/upf.c
---- dhcp-4.2.1-P1/common/upf.c.xen 2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.1-P1/common/upf.c 2011-06-17 13:33:18.418054566 +0200
+diff -up dhcp-4.2.2b1/common/upf.c.xen dhcp-4.2.2b1/common/upf.c
+--- dhcp-4.2.2b1/common/upf.c.xen 2009-11-20 02:49:01.000000000 +0100
++++ dhcp-4.2.2b1/common/upf.c 2011-07-01 14:00:16.940958986 +0200
@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf,
/* Decode the IP and UDP headers... */
@@ -232,15 +235,15 @@ diff -up dhcp-4.2.1-P1/common/upf.c.xen dhcp-4.2.1-P1/common/upf.c
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
-diff -up dhcp-4.2.1-P1/includes/dhcpd.h.xen dhcp-4.2.1-P1/includes/dhcpd.h
---- dhcp-4.2.1-P1/includes/dhcpd.h.xen 2011-06-17 13:33:18.382055486 +0200
-+++ dhcp-4.2.1-P1/includes/dhcpd.h 2011-06-17 13:33:18.420054516 +0200
-@@ -2776,7 +2776,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 *,
-- unsigned, unsigned *));
-+ unsigned, unsigned *, int));
+diff -up dhcp-4.2.2b1/includes/dhcpd.h.xen dhcp-4.2.2b1/includes/dhcpd.h
+--- dhcp-4.2.2b1/includes/dhcpd.h.xen 2011-07-01 14:00:16.000000000 +0200
++++ dhcp-4.2.2b1/includes/dhcpd.h 2011-07-01 14:12:18.069642470 +0200
+@@ -2796,7 +2796,7 @@ ssize_t decode_hw_header (struct interfa
+ unsigned, struct hardware *);
+ ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
+ unsigned, struct sockaddr_in *,
+- unsigned, unsigned *);
++ unsigned, unsigned *, int);
/* ethernet.c */
- void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
+ void assemble_ethernet_header (struct interface_info *, unsigned char *,
diff --git a/dhcp.spec b/dhcp.spec
index 5b2dbe9..bedd73c 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -5,18 +5,18 @@
%global dhcpconfdir %{_sysconfdir}/dhcp
# Patch version
-%global patchver P1
+#%global patchver P1
# Pre-Release version
-#%global prever rc1
+%global prever b1
-#%global VERSION %{version}%{prever}
#%global VERSION %{version}
-%global VERSION %{version}-%{patchver}
+#%global VERSION %{version}-%{patchver}
+%global VERSION %{version}%{prever}
Summary: Dynamic host configuration protocol software
Name: dhcp
-Version: 4.2.1
-Release: 12.%{patchver}%{?dist}
+Version: 4.2.2
+Release: 0.1.%{prever}%{?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.
@@ -39,16 +39,16 @@ Source10: dhcpd6.service
Source11: dhcrelay.service
Patch0: dhcp-4.2.0-errwarn-message.patch
-Patch1: dhcp-4.2.0-options.patch
+Patch1: dhcp-4.2.2-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
-Patch6: dhcp-4.2.0-dhclient-usage.patch
+Patch6: dhcp-4.2.2-dhclient-usage.patch
Patch7: dhcp-4.2.0-default-requested-options.patch
-Patch8: dhcp-4.2.1-xen-checksum.patch
+Patch8: dhcp-4.2.2-xen-checksum.patch
Patch10: dhcp-4.2.1-manpages.patch
Patch11: dhcp-4.2.0-paths.patch
-Patch12: dhcp-4.2.0-CLOEXEC.patch
+Patch12: dhcp-4.2.2-CLOEXEC.patch
Patch13: dhcp-4.2.0-inherit-leases.patch
Patch14: dhcp-4.2.0-garbage-chars.patch
Patch15: dhcp-4.2.0-missing-ipv6-not-fatal.patch
@@ -59,9 +59,8 @@ Patch20: dhcp-4.2.0-logpid.patch
Patch21: dhcp-4.2.0-UseMulticast.patch
Patch22: dhcp-4.2.1-sendDecline.patch
Patch23: dhcp-4.2.1-retransmission.patch
-Patch24: dhcp-4.2.0-initialization-delay.patch
-Patch25: dhcp-4.2.0-rfc3442-classless-static-routes.patch
-Patch26: dhcp-4.2.1-PIE-RELRO.patch
+Patch25: dhcp-4.2.2-rfc3442-classless-static-routes.patch
+Patch26: dhcp-4.2.2-PIE-RELRO.patch
Patch27: dhcp-4.2.0-honor-expired.patch
Patch28: dhcp-4.2.0-noprefixavail.patch
Patch29: dhcp420-rh637017.patch
@@ -276,9 +275,6 @@ rm bind/bind.tar.gz
# (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #21238])
%patch23 -p1 -b .retransmission
-# Cut down the 0-4 second delay before sending first DHCPDISCOVER (#587070)
-%patch24 -p1 -b .initialization-delay
-
# RFC 3442 - Classless Static Route Option for DHCPv4 (#516325)
%patch25 -p1 -b .rfc3442
@@ -651,6 +647,9 @@ fi
%{_initddir}/dhcrelay
%changelog
+* Fri Jul 01 2011 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.2-0.1.b1
+- 4.2.2b1: upstream merged initialization-delay.patch
+
* Fri Jun 17 2011 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.1-12.P1
- Removed upstream-merged IFNAMSIZ.patch
- Polished patches according to results from static analysis of code.
diff --git a/sources b/sources
index da855bd..69c9811 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-22e6f1eff6d5cfe2621a06cc62ba5b70 dhcp-4.2.1-P1.tar.gz
+8522920f79ec79614a8f0dae30ae14c8 dhcp-4.2.2b1.tar.gz
More information about the scm-commits
mailing list