From d5d042fc457eaf487fc22e1f69f118ff5877365a Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 17 Apr 2012 11:46:32 +0200 Subject: [PATCH] 4.2.4b1: noprefixavail.patch merged upstream --- .gitignore | 1 + dhcp-4.2.0-noprefixavail.patch | 140 --------------- dhcp-4.2.3-P2-send_release.patch | 23 --- ...tch => dhcp-4.2.4-64_bit_lease_parse.patch | 36 ++-- dhcp-4.2.0-PPP.patch => dhcp-4.2.4-PPP.patch | 64 +++---- ...ast.patch => dhcp-4.2.4-UseMulticast.patch | 38 +++-- ...xid.patch => dhcp-4.2.4-improved-xid.patch | 40 ++--- ....2-lpf-ib.patch => dhcp-4.2.4-lpf-ib.patch | 61 +++---- ...-options.patch => dhcp-4.2.4-options.patch | 52 +++--- ....2.4-rfc3442-classless-static-routes.patch | 86 +++++----- dhcp-4.2.4-send_release.patch | 23 +++ ...temtap.patch => dhcp-4.2.4-systemtap.patch | 161 +++++++++--------- ...tp.patch => dhcp-4.2.4-unicast-bootp.patch | 32 ++-- dhcp.spec | 51 +++--- sources | 1 + 15 files changed, 326 insertions(+), 483 deletions(-) delete mode 100644 dhcp-4.2.0-noprefixavail.patch delete mode 100644 dhcp-4.2.3-P2-send_release.patch rename dhcp-4.2.1-64_bit_lease_parse.patch => dhcp-4.2.4-64_bit_lease_parse.patch (64%) rename dhcp-4.2.0-PPP.patch => dhcp-4.2.4-PPP.patch (65%) rename dhcp-4.2.0-UseMulticast.patch => dhcp-4.2.4-UseMulticast.patch (85%) rename dhcp-4.2.2-improved-xid.patch => dhcp-4.2.4-improved-xid.patch (78%) rename dhcp-4.2.2-lpf-ib.patch => dhcp-4.2.4-lpf-ib.patch (87%) rename dhcp-4.2.3-options.patch => dhcp-4.2.4-options.patch (88%) rename dhcp-4.2.3-rfc3442-classless-static-routes.patch => dhcp-4.2.4-rfc3442-classless-static-routes.patch (80%) create mode 100644 dhcp-4.2.4-send_release.patch rename dhcp-4.2.2-systemtap.patch => dhcp-4.2.4-systemtap.patch (78%) rename dhcp-4.2.0-unicast-bootp.patch => dhcp-4.2.4-unicast-bootp.patch (72%) diff --git a/.gitignore b/.gitignore index d6061ec..b16a929 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /dhcp-4.2.3.tar.gz /dhcp-4.2.3-P1.tar.gz /dhcp-4.2.3-P2.tar.gz +/dhcp-4.2.4b1.tar.gz diff --git a/dhcp-4.2.0-noprefixavail.patch b/dhcp-4.2.0-noprefixavail.patch deleted file mode 100644 index 729a172..0000000 --- a/dhcp-4.2.0-noprefixavail.patch +++ /dev/null @@ -1,140 +0,0 @@ -diff -up dhcp-4.2.0/server/dhcpv6.c.noprefixavail dhcp-4.2.0/server/dhcpv6.c ---- dhcp-4.2.0/server/dhcpv6.c.noprefixavail 2010-10-07 13:48:45.000000000 +0200 -+++ dhcp-4.2.0/server/dhcpv6.c 2010-10-13 11:00:25.000000000 +0200 -@@ -1134,7 +1134,7 @@ try_client_v6_prefix(struct iasubopt **p - return DHCP_R_INVALIDARG; - } - tmp_plen = (int) requested_pref->data[0]; -- if ((tmp_plen < 3) || (tmp_plen > 128)) { -+ if ((tmp_plen < 3) || (tmp_plen > 128) ||((int)tmp_plen != pool->units)) { - return ISC_R_FAILURE; - } - memcpy(&tmp_pref, requested_pref->data + 1, sizeof(tmp_pref)); -@@ -1147,9 +1147,8 @@ try_client_v6_prefix(struct iasubopt **p - return ISC_R_FAILURE; - } - -- if (((int)tmp_plen != pool->units) || -- !ipv6_in_pool(&tmp_pref, pool)) { -- return ISC_R_FAILURE; -+ if (!ipv6_in_pool(&tmp_pref, pool)) { -+ return ISC_R_ADDRNOTAVAIL; - } - - if (prefix6_exists(pool, &tmp_pref, tmp_plen)) { -@@ -1409,13 +1408,6 @@ lease_to_client(struct data_string *repl - if ((status != ISC_R_SUCCESS) && - (status != ISC_R_NORESOURCES)) - goto exit; -- -- /* -- * If any prefix cannot be given to any IA_PD, then -- * set the NoPrefixAvail status code. -- */ -- if (reply.client_resources == 0) -- no_resources_avail = ISC_TRUE; - } - - /* -@@ -1549,36 +1541,6 @@ lease_to_client(struct data_string *repl - reply.opt_state, reply.packet, - required_opts_NAA, - NULL); -- } else if (no_resources_avail && (reply.ia_count == 0) && -- (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT)) -- { -- /* Set the NoPrefixAvail status code. */ -- if (!set_status_code(STATUS_NoPrefixAvail, -- "No prefixes available for this " -- "interface.", reply.opt_state)) { -- log_error("lease_to_client: Unable to set " -- "NoPrefixAvail status code."); -- goto exit; -- } -- -- /* Rewind the cursor to the start. */ -- reply.cursor = REPLY_OPTIONS_INDEX; -- -- /* -- * Produce an advertise that includes only: -- * -- * Status code. -- * Server DUID. -- * Client DUID. -- */ -- reply.buf.reply.msg_type = DHCPV6_ADVERTISE; -- reply.cursor += store_options6((char *)reply.buf.data + -- reply.cursor, -- sizeof(reply.buf) - -- reply.cursor, -- reply.opt_state, reply.packet, -- required_opts_NAA, -- NULL); - } else { - /* - * Having stored the client's IA's, store any options that -@@ -2793,16 +2755,18 @@ find_client_temporaries(struct reply_sta - */ - static isc_result_t - reply_process_try_addr(struct reply_state *reply, struct iaddr *addr) { -- isc_result_t status = ISC_R_NORESOURCES; -+ isc_result_t status = ISC_R_ADDRNOTAVAIL; - struct ipv6_pool *pool; - int i; - struct data_string data_addr; - - if ((reply == NULL) || (reply->shared == NULL) || -- (reply->shared->ipv6_pools == NULL) || (addr == NULL) || -- (reply->lease != NULL)) -+ (addr == NULL) || (reply->lease != NULL)) - return DHCP_R_INVALIDARG; - -+ if (reply->shared->ipv6_pools == NULL) -+ return ISC_R_ADDRNOTAVAIL; -+ - memset(&data_addr, 0, sizeof(data_addr)); - data_addr.len = addr->len; - data_addr.data = addr->iabuf; -@@ -3314,7 +3278,9 @@ reply_process_ia_pd(struct reply_state * - if (status == ISC_R_CANCELED) - break; - -- if ((status != ISC_R_SUCCESS) && (status != ISC_R_ADDRINUSE)) -+ if ((status != ISC_R_SUCCESS) && -+ (status != ISC_R_ADDRINUSE) && -+ (status != ISC_R_ADDRNOTAVAIL)) - goto cleanup; - } - -@@ -3594,7 +3560,8 @@ reply_process_prefix(struct reply_state - - /* Either error out or skip this prefix. */ - if ((status != ISC_R_SUCCESS) && -- (status != ISC_R_ADDRINUSE)) -+ (status != ISC_R_ADDRINUSE) && -+ (status != ISC_R_ADDRNOTAVAIL)) - goto cleanup; - - if (reply->lease == NULL) { -@@ -3773,16 +3740,18 @@ prefix_is_owned(struct reply_state *repl - static isc_result_t - reply_process_try_prefix(struct reply_state *reply, - struct iaddrcidrnet *pref) { -- isc_result_t status = ISC_R_NORESOURCES; -+ isc_result_t status = ISC_R_ADDRNOTAVAIL; - struct ipv6_pool *pool; - int i; - struct data_string data_pref; - - if ((reply == NULL) || (reply->shared == NULL) || -- (reply->shared->ipv6_pools == NULL) || (pref == NULL) || -- (reply->lease != NULL)) -+ (pref == NULL) || (reply->lease != NULL)) - return DHCP_R_INVALIDARG; - -+ if (reply->shared->ipv6_pools == NULL) -+ return ISC_R_ADDRNOTAVAIL; -+ - memset(&data_pref, 0, sizeof(data_pref)); - data_pref.len = 17; - if (!buffer_allocate(&data_pref.buffer, data_pref.len, MDL)) { diff --git a/dhcp-4.2.3-P2-send_release.patch b/dhcp-4.2.3-P2-send_release.patch deleted file mode 100644 index 2aa18f1..0000000 --- a/dhcp-4.2.3-P2-send_release.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up dhcp-4.2.3-P2/client/dhclient.c.send_release dhcp-4.2.3-P2/client/dhclient.c ---- dhcp-4.2.3-P2/client/dhclient.c.send_release 2012-03-21 19:16:16.000000000 +0100 -+++ dhcp-4.2.3-P2/client/dhclient.c 2012-03-21 19:21:39.920599903 +0100 -@@ -2749,8 +2749,8 @@ void send_release (cpp) - inet_ntoa (destination.sin_addr), - ntohs (destination.sin_port), client -> xid); - -- if (fallback_interface) -- result = send_packet (fallback_interface, -+ if (client -> interface) -+ result = send_packet (client -> interface, - (struct packet *)0, - &client -> packet, - client -> packet_length, -@@ -2758,7 +2758,7 @@ void send_release (cpp) - (struct hardware *)0); - else - /* Send out a packet. */ -- result = send_packet (client -> interface, (struct packet *)0, -+ result = send_packet (fallback_interface, (struct packet *)0, - &client -> packet, - client -> packet_length, - from, &destination, diff --git a/dhcp-4.2.1-64_bit_lease_parse.patch b/dhcp-4.2.4-64_bit_lease_parse.patch similarity index 64% rename from dhcp-4.2.1-64_bit_lease_parse.patch rename to dhcp-4.2.4-64_bit_lease_parse.patch index a540bc1..c1b978b 100644 --- a/dhcp-4.2.1-64_bit_lease_parse.patch +++ b/dhcp-4.2.4-64_bit_lease_parse.patch @@ -1,19 +1,18 @@ -diff -up dhcp-4.2.1b1/common/dispatch.c.64-bit_lease_parse dhcp-4.2.1b1/common/dispatch.c -diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/parse.c ---- dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse 2010-12-30 00:01:42.000000000 +0100 -+++ dhcp-4.2.1b1/common/parse.c 2011-01-28 08:01:10.000000000 +0100 -@@ -909,8 +909,8 @@ TIME +diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c +--- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse 2012-03-09 12:28:10.000000000 +0100 ++++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:30:55.867045149 +0200 +@@ -906,8 +906,8 @@ TIME parse_date_core(cfile) struct parse *cfile; { - int guess; -- int tzoff, wday, year, mon, mday, hour, min, sec; +- int tzoff, year, mon, mday, hour, min, sec; + TIME guess; -+ long int tzoff, wday, year, mon, mday, hour, min, sec; ++ long int tzoff, year, mon, mday, hour, min, sec; const char *val; enum dhcp_token token; static int months[11] = { 31, 59, 90, 120, 151, 181, -@@ -936,7 +936,7 @@ parse_date_core(cfile) +@@ -933,7 +933,7 @@ parse_date_core(cfile) } token = next_token(&val, NULL, cfile); /* consume number */ @@ -22,16 +21,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars return((TIME)guess); } -@@ -948,7 +948,7 @@ parse_date_core(cfile) - return((TIME)0); - } - token = next_token(&val, NULL, cfile); /* consume day of week */ -- wday = atoi(val); -+ wday = atol(val); - - /* Year... */ - token = peek_token(&val, NULL, cfile); -@@ -964,7 +964,7 @@ parse_date_core(cfile) +@@ -961,7 +961,7 @@ parse_date_core(cfile) somebody invents a time machine, I think we can safely disregard it. This actually works around a stupid Y2K bug that was present in a very early beta release of dhcpd. */ @@ -40,7 +30,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars if (year > 1900) year -= 1900; -@@ -988,7 +988,7 @@ parse_date_core(cfile) +@@ -985,7 +985,7 @@ parse_date_core(cfile) return((TIME)0); } token = next_token(&val, NULL, cfile); /* consume month */ @@ -49,7 +39,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars /* Slash separating month from day... */ token = peek_token(&val, NULL, cfile); -@@ -1010,7 +1010,7 @@ parse_date_core(cfile) +@@ -1007,7 +1007,7 @@ parse_date_core(cfile) return((TIME)0); } token = next_token(&val, NULL, cfile); /* consume day of month */ @@ -58,7 +48,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars /* Hour... */ token = peek_token(&val, NULL, cfile); -@@ -1021,7 +1021,7 @@ parse_date_core(cfile) +@@ -1018,7 +1018,7 @@ parse_date_core(cfile) return((TIME)0); } token = next_token(&val, NULL, cfile); /* consume hour */ @@ -67,7 +57,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars /* Colon separating hour from minute... */ token = peek_token(&val, NULL, cfile); -@@ -1043,7 +1043,7 @@ parse_date_core(cfile) +@@ -1040,7 +1040,7 @@ parse_date_core(cfile) return((TIME)0); } token = next_token(&val, NULL, cfile); /* consume minute */ @@ -76,7 +66,7 @@ diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/pars /* Colon separating minute from second... */ token = peek_token(&val, NULL, cfile); -@@ -1065,13 +1065,13 @@ parse_date_core(cfile) +@@ -1062,13 +1062,13 @@ parse_date_core(cfile) return((TIME)0); } token = next_token(&val, NULL, cfile); /* consume second */ diff --git a/dhcp-4.2.0-PPP.patch b/dhcp-4.2.4-PPP.patch similarity index 65% rename from dhcp-4.2.0-PPP.patch rename to dhcp-4.2.4-PPP.patch index bef2be7..edb11bf 100644 --- a/dhcp-4.2.0-PPP.patch +++ b/dhcp-4.2.4-PPP.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.0-P1/client/dhc6.c.PPP dhcp-4.2.0-P1/client/dhc6.c ---- dhcp-4.2.0-P1/client/dhc6.c.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/client/dhc6.c 2010-11-09 15:54:12.000000000 +0100 -@@ -129,7 +129,7 @@ extern int stateless; +diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c +--- dhcp-4.2.4b1/client/dhc6.c.PPP 2012-04-16 17:37:23.243618764 +0200 ++++ dhcp-4.2.4b1/client/dhc6.c 2012-04-16 17:37:23.252618638 +0200 +@@ -133,7 +133,7 @@ extern int stateless; * is not how it is intended. Upcoming rearchitecting the client should * address this "one daemon model." */ @@ -10,7 +10,7 @@ diff -up dhcp-4.2.0-P1/client/dhc6.c.PPP dhcp-4.2.0-P1/client/dhc6.c form_duid(struct data_string *duid, const char *file, int line) { struct interface_info *ip; -@@ -141,6 +141,15 @@ form_duid(struct data_string *duid, cons +@@ -145,6 +145,15 @@ form_duid(struct data_string *duid, cons if (ip == NULL) log_fatal("Impossible condition at %s:%d.", MDL); @@ -26,7 +26,7 @@ diff -up dhcp-4.2.0-P1/client/dhc6.c.PPP dhcp-4.2.0-P1/client/dhc6.c if ((ip->hw_address.hlen == 0) || (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf))) log_fatal("Impossible hardware address length at %s:%d.", MDL); -@@ -176,6 +185,8 @@ form_duid(struct data_string *duid, cons +@@ -180,6 +189,8 @@ form_duid(struct data_string *duid, cons memcpy(duid->buffer->data + 4, ip->hw_address.hbuf + 1, ip->hw_address.hlen - 1); } @@ -35,7 +35,7 @@ diff -up dhcp-4.2.0-P1/client/dhc6.c.PPP dhcp-4.2.0-P1/client/dhc6.c } /* -@@ -5289,7 +5300,8 @@ make_client6_options(struct client_state +@@ -5130,7 +5141,8 @@ make_client6_options(struct client_state */ if ((oc = lookup_option(&dhcpv6_universe, *op, D6O_CLIENTID)) == NULL) { @@ -45,10 +45,10 @@ diff -up dhcp-4.2.0-P1/client/dhc6.c.PPP dhcp-4.2.0-P1/client/dhc6.c MDL)) log_fatal("Failure assembling a DUID."); -diff -up dhcp-4.2.0-P1/client/dhclient.c.PPP dhcp-4.2.0-P1/client/dhclient.c ---- dhcp-4.2.0-P1/client/dhclient.c.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/client/dhclient.c 2010-11-09 15:37:26.000000000 +0100 -@@ -911,8 +911,8 @@ main(int argc, char **argv) { +diff -up dhcp-4.2.4b1/client/dhclient.c.PPP dhcp-4.2.4b1/client/dhclient.c +--- dhcp-4.2.4b1/client/dhclient.c.PPP 2012-04-16 17:37:23.214619170 +0200 ++++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:37:23.254618610 +0200 +@@ -919,8 +919,8 @@ main(int argc, char **argv) { if (default_duid.buffer != NULL) data_string_forget(&default_duid, MDL); @@ -59,9 +59,9 @@ diff -up dhcp-4.2.0-P1/client/dhclient.c.PPP dhcp-4.2.0-P1/client/dhclient.c } for (ip = interfaces ; ip != NULL ; ip = ip->next) { -diff -up dhcp-4.2.0-P1/common/bpf.c.PPP dhcp-4.2.0-P1/common/bpf.c ---- dhcp-4.2.0-P1/common/bpf.c.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/common/bpf.c 2010-11-09 15:42:42.000000000 +0100 +diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c +--- dhcp-4.2.4b1/common/bpf.c.PPP 2012-04-16 17:37:23.175619716 +0200 ++++ dhcp-4.2.4b1/common/bpf.c 2012-04-16 17:37:23.255618596 +0200 @@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen); break; @@ -85,10 +85,10 @@ diff -up dhcp-4.2.0-P1/common/bpf.c.PPP dhcp-4.2.0-P1/common/bpf.c default: log_fatal("Unsupported device type %d for \"%s\"", sa->sdl_type, name); -diff -up dhcp-4.2.0-P1/common/lpf.c.PPP dhcp-4.2.0-P1/common/lpf.c ---- dhcp-4.2.0-P1/common/lpf.c.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/common/lpf.c 2010-11-09 15:45:40.000000000 +0100 -@@ -502,6 +502,22 @@ get_hw_addr(const char *name, struct har +diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c +--- dhcp-4.2.4b1/common/lpf.c.PPP 2012-04-16 17:37:23.155619996 +0200 ++++ dhcp-4.2.4b1/common/lpf.c 2012-04-16 17:37:23.256618582 +0200 +@@ -503,6 +503,22 @@ get_hw_addr(const char *name, struct har hw->hbuf[0] = HTYPE_FDDI; memcpy(&hw->hbuf[1], sa->sa_data, 16); break; @@ -111,10 +111,10 @@ diff -up dhcp-4.2.0-P1/common/lpf.c.PPP dhcp-4.2.0-P1/common/lpf.c default: log_fatal("Unsupported device type %ld for \"%s\"", (long int)sa->sa_family, name); -diff -up dhcp-4.2.0-P1/includes/dhcpd.h.PPP dhcp-4.2.0-P1/includes/dhcpd.h ---- dhcp-4.2.0-P1/includes/dhcpd.h.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/includes/dhcpd.h 2010-11-09 15:46:58.000000000 +0100 -@@ -2733,7 +2733,7 @@ void dhcpv4_client_assignments(void); +diff -up dhcp-4.2.4b1/includes/dhcpd.h.PPP dhcp-4.2.4b1/includes/dhcpd.h +--- dhcp-4.2.4b1/includes/dhcpd.h.PPP 2012-04-16 17:37:23.239618820 +0200 ++++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:37:23.257618568 +0200 +@@ -2760,7 +2760,7 @@ void dhcpv4_client_assignments(void); void dhcpv6_client_assignments(void); /* dhc6.c */ @@ -123,21 +123,21 @@ diff -up dhcp-4.2.0-P1/includes/dhcpd.h.PPP dhcp-4.2.0-P1/includes/dhcpd.h void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line); void start_init6(struct client_state *client); void start_info_request6(struct client_state *client); -diff -up dhcp-4.2.0-P1/includes/dhcp.h.PPP dhcp-4.2.0-P1/includes/dhcp.h ---- dhcp-4.2.0-P1/includes/dhcp.h.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/includes/dhcp.h 2010-11-09 15:48:53.000000000 +0100 -@@ -80,6 +80,8 @@ struct dhcp_packet { - #define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */ - #define HTYPE_FDDI 8 /* FDDI... */ +diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h +--- dhcp-4.2.4b1/includes/dhcp.h.PPP 2012-04-16 17:37:23.000000000 +0200 ++++ dhcp-4.2.4b1/includes/dhcp.h 2012-04-16 17:38:34.675618138 +0200 +@@ -85,6 +85,8 @@ struct dhcp_packet { + * is no standard for this so we + * just steal a type */ -+#define HTYPE_RESERVED 0 /* RFC 5494 */ ++#define HTYPE_RESERVED 0 /* RFC 5494 */ + /* Magic cookie validating dhcp options field (and bootp vendor extensions field). */ #define DHCP_OPTIONS_COOKIE "\143\202\123\143" -diff -up dhcp-4.2.0-P1/server/dhcpv6.c.PPP dhcp-4.2.0-P1/server/dhcpv6.c ---- dhcp-4.2.0-P1/server/dhcpv6.c.PPP 2010-11-05 10:47:37.000000000 +0100 -+++ dhcp-4.2.0-P1/server/dhcpv6.c 2010-11-09 15:50:17.000000000 +0100 +diff -up dhcp-4.2.4b1/server/dhcpv6.c.PPP dhcp-4.2.4b1/server/dhcpv6.c +--- dhcp-4.2.4b1/server/dhcpv6.c.PPP 2012-04-16 17:37:23.218619114 +0200 ++++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 17:37:23.260618526 +0200 @@ -300,6 +300,9 @@ generate_new_server_duid(void) { if (p->hw_address.hlen > 0) { break; diff --git a/dhcp-4.2.0-UseMulticast.patch b/dhcp-4.2.4-UseMulticast.patch similarity index 85% rename from dhcp-4.2.0-UseMulticast.patch rename to dhcp-4.2.4-UseMulticast.patch index 319344a..d0c5dfe 100644 --- a/dhcp-4.2.0-UseMulticast.patch +++ b/dhcp-4.2.4-UseMulticast.patch @@ -1,6 +1,6 @@ -diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c ---- dhcp-4.2.0/server/dhcpv6.c.UseMulticast 2010-06-01 19:30:00.000000000 +0200 -+++ dhcp-4.2.0/server/dhcpv6.c 2010-07-21 16:17:30.000000000 +0200 +diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c +--- dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast 2012-04-11 00:14:04.000000000 +0200 ++++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 19:21:43.575923732 +0200 @@ -346,6 +346,48 @@ generate_new_server_duid(void) { } @@ -50,7 +50,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c * Get the client identifier from the packet. */ isc_result_t -@@ -1405,6 +1447,56 @@ lease_to_client(struct data_string *repl +@@ -1404,6 +1446,56 @@ lease_to_client(struct data_string *repl reply.shared->group); } @@ -102,21 +102,31 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c + reply.opt_state, reply.packet, + required_opts_NAA, + NULL); -+ } else if (no_resources_avail && (reply.ia_count != 0) && -+ (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT)) ++ } ++ /* * RFC3315 section 17.2.2 (Solicit): * -@@ -1429,8 +1521,6 @@ lease_to_client(struct data_string *repl - * the server. +@@ -1429,8 +1521,8 @@ lease_to_client(struct data_string *repl * Sends a Renew/Rebind if the IA is not in the Reply message. */ + #if defined (RFC3315_PRE_ERRATA_2010_08) - if (no_resources_avail && (reply.ia_count != 0) && - (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT)) ++ else if (no_resources_avail && (reply.ia_count != 0) && ++ (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT)) { /* Set the NoAddrsAvail status code. */ if (!set_status_code(STATUS_NoAddrsAvail, -@@ -4128,7 +4218,6 @@ dhcpv6_solicit(struct data_string *reply +@@ -1477,6 +1569,7 @@ lease_to_client(struct data_string *repl + * Having stored the client's IA's, store any options that + * will fit in the remaining space. + */ ++ else + reply.cursor += store_options6((char *)reply.buf.data + reply.cursor, + sizeof(reply.buf) - reply.cursor, + reply.opt_state, reply.packet, +@@ -4126,7 +4219,6 @@ dhcpv6_solicit(struct data_string *reply * Very similar to Solicit handling, except the server DUID is required. */ @@ -124,7 +134,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c static void dhcpv6_request(struct data_string *reply_ret, struct packet *packet) { struct data_string client_id; -@@ -4443,7 +4532,6 @@ exit: +@@ -4456,7 +4548,6 @@ exit: * except for the error code of when addresses don't match. */ @@ -132,7 +142,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c static void dhcpv6_renew(struct data_string *reply, struct packet *packet) { struct data_string client_id; -@@ -4688,18 +4776,60 @@ iterate_over_ia_na(struct data_string *r +@@ -4700,18 +4791,60 @@ iterate_over_ia_na(struct data_string *r goto exit; } @@ -203,7 +213,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c /* * Loop through the IA_NA reported by the client, and deal with -@@ -4838,6 +4968,7 @@ iterate_over_ia_na(struct data_string *r +@@ -4849,6 +4982,7 @@ iterate_over_ia_na(struct data_string *r /* * Return our reply to the caller. */ @@ -211,7 +221,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c reply_ret->len = reply_ofs; reply_ret->buffer = NULL; if (!buffer_allocate(&reply_ret->buffer, reply_ofs, MDL)) { -@@ -4883,7 +5014,6 @@ exit: +@@ -4894,7 +5028,6 @@ exit: * we still need to be aware of this possibility. */ @@ -219,7 +229,7 @@ diff -up dhcp-4.2.0/server/dhcpv6.c.UseMulticast dhcp-4.2.0/server/dhcpv6.c /* TODO: IA_TA */ static void dhcpv6_decline(struct data_string *reply, struct packet *packet) { -@@ -5355,7 +5485,6 @@ exit: +@@ -5364,7 +5497,6 @@ exit: * Release means a client is done with the leases. */ diff --git a/dhcp-4.2.2-improved-xid.patch b/dhcp-4.2.4-improved-xid.patch similarity index 78% rename from dhcp-4.2.2-improved-xid.patch rename to dhcp-4.2.4-improved-xid.patch index f49fc78..f353fb0 100644 --- a/dhcp-4.2.2-improved-xid.patch +++ b/dhcp-4.2.4-improved-xid.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c ---- dhcp-4.2.2/client/dhclient.c.improved-xid 2011-09-16 18:18:00.649730661 +0200 -+++ dhcp-4.2.2/client/dhclient.c 2011-09-16 18:22:36.815035513 +0200 -@@ -898,6 +898,26 @@ main(int argc, char **argv) { +diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclient.c +--- dhcp-4.2.4b1/client/dhclient.c.improved-xid 2012-04-16 17:42:37.444217424 +0200 ++++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:45:32.105770755 +0200 +@@ -888,6 +888,26 @@ main(int argc, char **argv) { } } @@ -28,7 +28,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c /* At this point, all the interfaces that the script thinks are relevant should be running, so now we once again call discover_interfaces(), and this time ask it to actually set -@@ -912,14 +932,36 @@ main(int argc, char **argv) { +@@ -902,14 +922,36 @@ main(int argc, char **argv) { Not much entropy, but we're booting, so we're not likely to find anything better. */ seed = 0; @@ -66,7 +66,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c /* Setup specific Infiniband options */ for (ip = interfaces; ip; ip = ip->next) { -@@ -1457,7 +1499,7 @@ void dhcpack (packet) +@@ -1447,7 +1489,7 @@ void dhcpack (packet) return; } @@ -75,7 +75,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c lease = packet_to_lease (packet, client); if (!lease) { -@@ -2174,7 +2216,7 @@ void dhcpnak (packet) +@@ -2164,7 +2206,7 @@ void dhcpnak (packet) return; } @@ -84,7 +84,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c if (!client -> active) { #if defined (DEBUG) -@@ -2300,10 +2342,10 @@ void send_discover (cpp) +@@ -2290,10 +2332,10 @@ void send_discover (cpp) client -> packet.secs = htons (65535); client -> secs = client -> packet.secs; @@ -96,8 +96,8 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c + ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), client -> xid); /* Send out a packet. */ - result = send_packet (client -> interface, (struct packet *)0, -@@ -2584,10 +2626,10 @@ void send_request (cpp) + result = send_packet(client->interface, NULL, &client->packet, +@@ -2577,10 +2619,10 @@ void send_request (cpp) client -> packet.secs = htons (65535); } @@ -109,21 +109,21 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c + ntohs (destination.sin_port), client -> xid); if (destination.sin_addr.s_addr != INADDR_BROADCAST && - fallback_interface) -@@ -2618,10 +2660,10 @@ void send_decline (cpp) + fallback_interface) { +@@ -2620,10 +2662,10 @@ void send_decline (cpp) int result; - log_info ("DHCPDECLINE on %s to %s port %d", + log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)", - client -> name ? client -> name : client -> interface -> name, - inet_ntoa (sockaddr_broadcast.sin_addr), -- ntohs (sockaddr_broadcast.sin_port)); -+ ntohs (sockaddr_broadcast.sin_port), client -> xid); + client->name ? client->name : client->interface->name, + inet_ntoa(sockaddr_broadcast.sin_addr), +- ntohs(sockaddr_broadcast.sin_port)); ++ ntohs(sockaddr_broadcast.sin_port), client -> xid); /* Send out a packet. */ - result = send_packet (client -> interface, (struct packet *)0, -@@ -2661,10 +2703,10 @@ void send_release (cpp) + result = send_packet(client->interface, NULL, &client->packet, +@@ -2666,10 +2708,10 @@ void send_release (cpp) return; } @@ -134,5 +134,5 @@ diff -up dhcp-4.2.2/client/dhclient.c.improved-xid dhcp-4.2.2/client/dhclient.c - ntohs (destination.sin_port)); + ntohs (destination.sin_port), client -> xid); - if (fallback_interface) - result = send_packet (fallback_interface, + if (fallback_interface) { + result = send_packet(fallback_interface, NULL, &client->packet, diff --git a/dhcp-4.2.2-lpf-ib.patch b/dhcp-4.2.4-lpf-ib.patch similarity index 87% rename from dhcp-4.2.2-lpf-ib.patch rename to dhcp-4.2.4-lpf-ib.patch index 4034028..7511691 100644 --- a/dhcp-4.2.2-lpf-ib.patch +++ b/dhcp-4.2.4-lpf-ib.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.2/client/dhclient.c.lpf-ib dhcp-4.2.2/client/dhclient.c ---- dhcp-4.2.2/client/dhclient.c.lpf-ib 2011-09-19 11:24:08.693775799 +0200 -+++ dhcp-4.2.2/client/dhclient.c 2011-09-19 11:24:08.703775541 +0200 -@@ -113,6 +113,8 @@ static int check_domain_name_list(const +diff -up dhcp-4.2.4b1/client/dhclient.c.lpf-ib dhcp-4.2.4b1/client/dhclient.c +--- dhcp-4.2.4b1/client/dhclient.c.lpf-ib 2012-04-16 17:41:56.866785839 +0200 ++++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:41:56.879785657 +0200 +@@ -113,6 +113,8 @@ static int check_domain_name_list(const static int check_option_values(struct universe *universe, unsigned int opt, const char *ptr, size_t len); @@ -10,7 +10,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.lpf-ib dhcp-4.2.2/client/dhclient.c int main(int argc, char **argv) { int fd; -@@ -919,6 +921,14 @@ main(int argc, char **argv) { +@@ -909,6 +911,14 @@ main(int argc, char **argv) { } srandom(seed + cur_time + (unsigned)getpid()); @@ -25,7 +25,7 @@ diff -up dhcp-4.2.2/client/dhclient.c.lpf-ib dhcp-4.2.2/client/dhclient.c /* Start a configuration state machine for each interface. */ #ifdef DHCPv6 if (local_family == AF_INET6) { -@@ -1195,6 +1205,29 @@ int find_subnet (struct subnet **sp, +@@ -1185,6 +1195,29 @@ int find_subnet (struct subnet **sp, return 0; } @@ -55,9 +55,9 @@ diff -up dhcp-4.2.2/client/dhclient.c.lpf-ib dhcp-4.2.2/client/dhclient.c /* Individual States: * * Each routine is called from the dhclient_state_machine() in one of -diff -up dhcp-4.2.2/common/bpf.c.lpf-ib dhcp-4.2.2/common/bpf.c ---- dhcp-4.2.2/common/bpf.c.lpf-ib 2011-09-19 11:24:08.694775773 +0200 -+++ dhcp-4.2.2/common/bpf.c 2011-09-19 11:24:08.704775516 +0200 +diff -up dhcp-4.2.4b1/common/bpf.c.lpf-ib dhcp-4.2.4b1/common/bpf.c +--- dhcp-4.2.4b1/common/bpf.c.lpf-ib 2012-04-16 17:41:56.867785825 +0200 ++++ dhcp-4.2.4b1/common/bpf.c 2012-04-16 17:41:56.879785657 +0200 @@ -198,11 +198,44 @@ struct bpf_insn dhcp_bpf_filter [] = { BPF_STMT(BPF_RET+BPF_K, 0), }; @@ -103,9 +103,9 @@ diff -up dhcp-4.2.2/common/bpf.c.lpf-ib dhcp-4.2.2/common/bpf.c #if defined (HAVE_TR_SUPPORT) struct bpf_insn dhcp_bpf_tr_filter [] = { /* accept all token ring packets due to variable length header */ -diff -up dhcp-4.2.2/common/lpf.c.lpf-ib dhcp-4.2.2/common/lpf.c ---- dhcp-4.2.2/common/lpf.c.lpf-ib 2011-09-19 11:24:08.694775773 +0200 -+++ dhcp-4.2.2/common/lpf.c 2011-09-19 11:26:15.107109935 +0200 +diff -up dhcp-4.2.4b1/common/lpf.c.lpf-ib dhcp-4.2.4b1/common/lpf.c +--- dhcp-4.2.4b1/common/lpf.c.lpf-ib 2012-04-16 17:41:56.867785825 +0200 ++++ dhcp-4.2.4b1/common/lpf.c 2012-04-16 17:41:56.880785643 +0200 @@ -42,6 +42,7 @@ #include "includes/netinet/udp.h" #include "includes/netinet/if_ether.h" @@ -292,7 +292,7 @@ diff -up dhcp-4.2.2/common/lpf.c.lpf-ib dhcp-4.2.2/common/lpf.c ssize_t send_packet (interface, packet, raw, len, from, to, hto) struct interface_info *interface; struct packet *packet; -@@ -335,6 +420,11 @@ ssize_t send_packet (interface, packet, +@@ -335,6 +420,11 @@ ssize_t send_packet (interface, packet, return send_fallback (interface, packet, raw, len, from, to, hto); @@ -304,7 +304,7 @@ diff -up dhcp-4.2.2/common/lpf.c.lpf-ib dhcp-4.2.2/common/lpf.c if (hto == NULL && interface->anycast_mac_addr.hlen) hto = &interface->anycast_mac_addr; -@@ -356,6 +446,42 @@ ssize_t send_packet (interface, packet, +@@ -356,6 +446,42 @@ ssize_t send_packet (interface, packet, #endif /* USE_LPF_SEND */ #ifdef USE_LPF_RECEIVE @@ -347,7 +347,7 @@ diff -up dhcp-4.2.2/common/lpf.c.lpf-ib dhcp-4.2.2/common/lpf.c ssize_t receive_packet (interface, buf, len, from, hfrom) struct interface_info *interface; unsigned char *buf; -@@ -382,6 +508,10 @@ ssize_t receive_packet (interface, buf, +@@ -382,6 +508,10 @@ ssize_t receive_packet (interface, buf, }; struct cmsghdr *cmsg; @@ -475,10 +475,10 @@ diff -up dhcp-4.2.2/common/lpf.c.lpf-ib dhcp-4.2.2/common/lpf.c + freeifaddrs(ifaddrs); } #endif -diff -up dhcp-4.2.2/common/socket.c.lpf-ib dhcp-4.2.2/common/socket.c ---- dhcp-4.2.2/common/socket.c.lpf-ib 2011-06-27 18:18:20.000000000 +0200 -+++ dhcp-4.2.2/common/socket.c 2011-09-19 11:24:08.705775490 +0200 -@@ -324,7 +324,7 @@ void if_register_send (info) +diff -up dhcp-4.2.4b1/common/socket.c.lpf-ib dhcp-4.2.4b1/common/socket.c +--- dhcp-4.2.4b1/common/socket.c.lpf-ib 2012-03-09 12:28:11.000000000 +0100 ++++ dhcp-4.2.4b1/common/socket.c 2012-04-16 17:41:56.880785643 +0200 +@@ -325,7 +325,7 @@ void if_register_send (info) info->wfdesc = if_register_socket(info, AF_INET, 0); /* If this is a normal IPv4 address, get the hardware address. */ if (strcmp(info->name, "fallback") != 0) @@ -487,7 +487,7 @@ diff -up dhcp-4.2.2/common/socket.c.lpf-ib dhcp-4.2.2/common/socket.c #if defined (USE_SOCKET_FALLBACK) /* Fallback only registers for send, but may need to receive as well. */ -@@ -387,7 +387,7 @@ void if_register_receive (info) +@@ -388,7 +388,7 @@ void if_register_receive (info) #endif /* IP_PKTINFO... */ /* If this is a normal IPv4 address, get the hardware address. */ if (strcmp(info->name, "fallback") != 0) @@ -496,7 +496,7 @@ diff -up dhcp-4.2.2/common/socket.c.lpf-ib dhcp-4.2.2/common/socket.c if (!quiet_interface_discovery) log_info ("Listening on Socket/%s%s%s", -@@ -497,7 +497,7 @@ if_register6(struct interface_info *info +@@ -498,7 +498,7 @@ if_register6(struct interface_info *info if (req_multi) if_register_multicast(info); @@ -505,9 +505,9 @@ diff -up dhcp-4.2.2/common/socket.c.lpf-ib dhcp-4.2.2/common/socket.c if (!quiet_interface_discovery) { if (info->shared_network != NULL) { -diff -up dhcp-4.2.2/includes/dhcpd.h.lpf-ib dhcp-4.2.2/includes/dhcpd.h ---- dhcp-4.2.2/includes/dhcpd.h.lpf-ib 2011-09-19 11:24:08.696775721 +0200 -+++ dhcp-4.2.2/includes/dhcpd.h 2011-09-19 11:24:08.707775438 +0200 +diff -up dhcp-4.2.4b1/includes/dhcpd.h.lpf-ib dhcp-4.2.4b1/includes/dhcpd.h +--- dhcp-4.2.4b1/includes/dhcpd.h.lpf-ib 2012-04-16 17:41:56.869785797 +0200 ++++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:41:56.882785615 +0200 @@ -1243,6 +1243,7 @@ struct interface_info { struct shared_network *shared_network; /* Networks connected to this interface. */ @@ -516,7 +516,7 @@ diff -up dhcp-4.2.2/includes/dhcpd.h.lpf-ib dhcp-4.2.2/includes/dhcpd.h struct in_addr *addresses; /* Addresses associated with this * interface. */ -@@ -2356,7 +2357,7 @@ void print_dns_status (int, struct dhcp_ +@@ -2360,7 +2361,7 @@ void print_dns_status (int, struct dhcp_ #endif const char *print_time(TIME); @@ -525,14 +525,3 @@ diff -up dhcp-4.2.2/includes/dhcpd.h.lpf-ib dhcp-4.2.2/includes/dhcpd.h /* socket.c */ #if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \ -diff -up dhcp-4.2.2/includes/dhcp.h.lpf-ib dhcp-4.2.2/includes/dhcp.h ---- dhcp-4.2.2/includes/dhcp.h.lpf-ib 2011-09-19 11:24:08.696775721 +0200 -+++ dhcp-4.2.2/includes/dhcp.h 2011-09-19 11:24:08.707775438 +0200 -@@ -79,6 +79,7 @@ struct dhcp_packet { - #define HTYPE_ETHER 1 /* Ethernet 10Mbps */ - #define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */ - #define HTYPE_FDDI 8 /* FDDI... */ -+#define HTYPE_INFINIBAND 32 /* Infiniband IPoIB */ - - #define HTYPE_RESERVED 0 /* RFC 5494 */ - diff --git a/dhcp-4.2.3-options.patch b/dhcp-4.2.4-options.patch similarity index 88% rename from dhcp-4.2.3-options.patch rename to dhcp-4.2.4-options.patch index c902e62..b0080e1 100644 --- a/dhcp-4.2.3-options.patch +++ b/dhcp-4.2.4-options.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.3-P2/client/clparse.c.options dhcp-4.2.3-P2/client/clparse.c ---- dhcp-4.2.3-P2/client/clparse.c.options 2011-04-21 16:08:14.000000000 +0200 -+++ dhcp-4.2.3-P2/client/clparse.c 2012-02-13 18:21:32.233471518 +0100 -@@ -146,6 +146,7 @@ isc_result_t read_client_conf () +diff -up dhcp-4.2.4b1/client/clparse.c.options dhcp-4.2.4b1/client/clparse.c +--- dhcp-4.2.4b1/client/clparse.c.options 2012-03-09 12:28:10.000000000 +0100 ++++ dhcp-4.2.4b1/client/clparse.c 2012-04-16 17:24:58.794047046 +0200 +@@ -154,6 +154,7 @@ isc_result_t read_client_conf () /* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache) */ top_level_config.requested_lease = 7200; @@ -9,7 +9,7 @@ diff -up dhcp-4.2.3-P2/client/clparse.c.options dhcp-4.2.3-P2/client/clparse.c group_allocate (&top_level_config.on_receipt, MDL); if (!top_level_config.on_receipt) -@@ -313,7 +314,8 @@ void read_client_leases () +@@ -320,7 +321,8 @@ void read_client_leases () interface-declaration | LEASE client-lease-statement | ALIAS client-lease-statement | @@ -19,7 +19,7 @@ diff -up dhcp-4.2.3-P2/client/clparse.c.options dhcp-4.2.3-P2/client/clparse.c void parse_client_statement (cfile, ip, config) struct parse *cfile; -@@ -732,6 +734,12 @@ void parse_client_statement (cfile, ip, +@@ -739,6 +741,12 @@ void parse_client_statement (cfile, ip, parse_reject_statement (cfile, config); return; @@ -32,9 +32,9 @@ diff -up dhcp-4.2.3-P2/client/clparse.c.options dhcp-4.2.3-P2/client/clparse.c default: lose = 0; stmt = (struct executable_statement *)0; -diff -up dhcp-4.2.3-P2/client/dhclient.c.options dhcp-4.2.3-P2/client/dhclient.c ---- dhcp-4.2.3-P2/client/dhclient.c.options 2011-12-31 01:55:21.000000000 +0100 -+++ dhcp-4.2.3-P2/client/dhclient.c 2012-02-13 18:22:11.554979930 +0100 +diff -up dhcp-4.2.4b1/client/dhclient.c.options dhcp-4.2.4b1/client/dhclient.c +--- dhcp-4.2.4b1/client/dhclient.c.options 2012-04-11 22:43:24.000000000 +0200 ++++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:24:58.795047032 +0200 @@ -39,6 +39,12 @@ #include #include @@ -320,7 +320,7 @@ diff -up dhcp-4.2.3-P2/client/dhclient.c.options dhcp-4.2.3-P2/client/dhclient.c /* Parse the lease database. */ read_client_leases(); -@@ -2397,7 +2647,8 @@ void make_discover (client, lease) +@@ -2421,7 +2671,8 @@ void make_discover (client, lease) client -> packet.xid = random (); client -> packet.secs = 0; /* filled in by send_discover. */ @@ -330,7 +330,7 @@ diff -up dhcp-4.2.3-P2/client/dhclient.c.options dhcp-4.2.3-P2/client/dhclient.c client -> packet.flags = 0; else client -> packet.flags = htons (BOOTP_BROADCAST); -@@ -2481,7 +2732,9 @@ void make_request (client, lease) +@@ -2505,7 +2756,9 @@ void make_request (client, lease) } else { memset (&client -> packet.ciaddr, 0, sizeof client -> packet.ciaddr); @@ -341,7 +341,7 @@ diff -up dhcp-4.2.3-P2/client/dhclient.c.options dhcp-4.2.3-P2/client/dhclient.c client -> packet.flags = 0; else client -> packet.flags = htons (BOOTP_BROADCAST); -@@ -2543,7 +2796,8 @@ void make_decline (client, lease) +@@ -2567,7 +2820,8 @@ void make_decline (client, lease) client -> packet.hops = 0; client -> packet.xid = client -> xid; client -> packet.secs = 0; /* Filled in by send_request. */ @@ -351,9 +351,9 @@ diff -up dhcp-4.2.3-P2/client/dhclient.c.options dhcp-4.2.3-P2/client/dhclient.c client -> packet.flags = 0; else client -> packet.flags = htons (BOOTP_BROADCAST); -diff -up dhcp-4.2.3-P2/common/conflex.c.options dhcp-4.2.3-P2/common/conflex.c ---- dhcp-4.2.3-P2/common/conflex.c.options 2011-09-21 22:43:10.000000000 +0200 -+++ dhcp-4.2.3-P2/common/conflex.c 2012-02-13 18:21:32.335470243 +0100 +diff -up dhcp-4.2.4b1/common/conflex.c.options dhcp-4.2.4b1/common/conflex.c +--- dhcp-4.2.4b1/common/conflex.c.options 2012-02-16 22:09:14.000000000 +0100 ++++ dhcp-4.2.4b1/common/conflex.c 2012-04-16 17:24:58.796047018 +0200 @@ -808,6 +808,8 @@ intern(char *atom, enum dhcp_token dfv) return BALANCE; if (!strcasecmp (atom + 1, "ound")) @@ -363,9 +363,9 @@ diff -up dhcp-4.2.3-P2/common/conflex.c.options dhcp-4.2.3-P2/common/conflex.c break; case 'c': if (!strcasecmp(atom + 1, "ase")) -diff -up dhcp-4.2.3-P2/includes/dhcpd.h.options dhcp-4.2.3-P2/includes/dhcpd.h ---- dhcp-4.2.3-P2/includes/dhcpd.h.options 2011-12-31 00:17:04.000000000 +0100 -+++ dhcp-4.2.3-P2/includes/dhcpd.h 2012-02-13 18:21:32.542467656 +0100 +diff -up dhcp-4.2.4b1/includes/dhcpd.h.options dhcp-4.2.4b1/includes/dhcpd.h +--- dhcp-4.2.4b1/includes/dhcpd.h.options 2012-04-10 02:55:06.000000000 +0200 ++++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:24:58.797047004 +0200 @@ -1147,6 +1147,9 @@ struct client_config { int do_forward_update; /* If nonzero, and if we have the information we need, update the @@ -376,16 +376,16 @@ diff -up dhcp-4.2.3-P2/includes/dhcpd.h.options dhcp-4.2.3-P2/includes/dhcpd.h }; /* Per-interface state used in the dhcp client... */ -diff -up dhcp-4.2.3-P2/includes/dhctoken.h.options dhcp-4.2.3-P2/includes/dhctoken.h ---- dhcp-4.2.3-P2/includes/dhctoken.h.options 2011-09-21 22:43:10.000000000 +0200 -+++ dhcp-4.2.3-P2/includes/dhctoken.h 2012-02-13 18:21:32.644466377 +0100 -@@ -363,7 +363,8 @@ enum dhcp_token { - INITIAL_DELAY = 664, +diff -up dhcp-4.2.4b1/includes/dhctoken.h.options dhcp-4.2.4b1/includes/dhctoken.h +--- dhcp-4.2.4b1/includes/dhctoken.h.options 2012-02-16 22:09:15.000000000 +0100 ++++ dhcp-4.2.4b1/includes/dhctoken.h 2012-04-16 17:25:53.819276248 +0200 +@@ -364,7 +364,8 @@ enum dhcp_token { GETHOSTBYNAME = 665, PRIMARY6 = 666, -- SECONDARY6 = 667 -+ SECONDARY6 = 667, -+ BOOTP_BROADCAST_ALWAYS = 668 + SECONDARY6 = 667, +- TOKEN_INFINIBAND = 668 ++ TOKEN_INFINIBAND = 668, ++ BOOTP_BROADCAST_ALWAYS = 669 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ diff --git a/dhcp-4.2.3-rfc3442-classless-static-routes.patch b/dhcp-4.2.4-rfc3442-classless-static-routes.patch similarity index 80% rename from dhcp-4.2.3-rfc3442-classless-static-routes.patch rename to dhcp-4.2.4-rfc3442-classless-static-routes.patch index 5897c21..a2fe219 100644 --- a/dhcp-4.2.3-rfc3442-classless-static-routes.patch +++ b/dhcp-4.2.4-rfc3442-classless-static-routes.patch @@ -1,6 +1,6 @@ -diff -up dhcp-4.2.3rc1/client/clparse.c.rfc3442 dhcp-4.2.3rc1/client/clparse.c ---- dhcp-4.2.3rc1/client/clparse.c.rfc3442 2011-10-18 18:50:11.564621939 +0200 -+++ dhcp-4.2.3rc1/client/clparse.c 2011-10-18 18:50:11.661620727 +0200 +diff -up dhcp-4.2.4b1/client/clparse.c.rfc3442 dhcp-4.2.4b1/client/clparse.c +--- dhcp-4.2.4b1/client/clparse.c.rfc3442 2012-04-16 17:34:27.546079944 +0200 ++++ dhcp-4.2.4b1/client/clparse.c 2012-04-16 17:34:27.605079118 +0200 @@ -37,7 +37,7 @@ struct client_config top_level_config; @@ -10,7 +10,7 @@ diff -up dhcp-4.2.3rc1/client/clparse.c.rfc3442 dhcp-4.2.3rc1/client/clparse.c struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1]; static void parse_client_default_duid(struct parse *cfile); -@@ -82,7 +82,11 @@ isc_result_t read_client_conf () +@@ -90,7 +90,11 @@ isc_result_t read_client_conf () dhcp_universe.code_hash, &code, 0, MDL); /* 4 */ @@ -23,7 +23,7 @@ diff -up dhcp-4.2.3rc1/client/clparse.c.rfc3442 dhcp-4.2.3rc1/client/clparse.c option_code_hash_lookup(&default_requested_options[3], dhcp_universe.code_hash, &code, 0, MDL); -@@ -136,6 +140,11 @@ isc_result_t read_client_conf () +@@ -144,6 +148,11 @@ isc_result_t read_client_conf () option_code_hash_lookup(&default_requested_options[13], dhcp_universe.code_hash, &code, 0, MDL); @@ -35,9 +35,9 @@ diff -up dhcp-4.2.3rc1/client/clparse.c.rfc3442 dhcp-4.2.3rc1/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.3rc1/common/dhcp-options.5.rfc3442 dhcp-4.2.3rc1/common/dhcp-options.5 ---- dhcp-4.2.3rc1/common/dhcp-options.5.rfc3442 2011-10-18 18:50:11.550622114 +0200 -+++ dhcp-4.2.3rc1/common/dhcp-options.5 2011-10-18 18:50:11.662620715 +0200 +diff -up dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 dhcp-4.2.4b1/common/dhcp-options.5 +--- dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 2012-04-16 17:34:27.537080070 +0200 ++++ dhcp-4.2.4b1/common/dhcp-options.5 2012-04-16 17:34:27.606079104 +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,9 +95,9 @@ diff -up dhcp-4.2.3rc1/common/dhcp-options.5.rfc3442 dhcp-4.2.3rc1/common/dhcp-o .B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...]\fB;\fR .fi -diff -up dhcp-4.2.3rc1/common/inet.c.rfc3442 dhcp-4.2.3rc1/common/inet.c ---- dhcp-4.2.3rc1/common/inet.c.rfc3442 2011-05-11 02:47:22.000000000 +0200 -+++ dhcp-4.2.3rc1/common/inet.c 2011-10-18 18:50:11.665620676 +0200 +diff -up dhcp-4.2.4b1/common/inet.c.rfc3442 dhcp-4.2.4b1/common/inet.c +--- dhcp-4.2.4b1/common/inet.c.rfc3442 2011-05-11 02:47:22.000000000 +0200 ++++ dhcp-4.2.4b1/common/inet.c 2012-04-16 17:34:27.607079090 +0200 @@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne return ISC_R_SUCCESS; } @@ -159,9 +159,9 @@ diff -up dhcp-4.2.3rc1/common/inet.c.rfc3442 dhcp-4.2.3rc1/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.3rc1/common/options.c.rfc3442 dhcp-4.2.3rc1/common/options.c ---- dhcp-4.2.3rc1/common/options.c.rfc3442 2011-07-20 00:22:48.000000000 +0200 -+++ dhcp-4.2.3rc1/common/options.c 2011-10-18 18:50:11.725619925 +0200 +diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c +--- dhcp-4.2.4b1/common/options.c.rfc3442 2012-03-20 01:31:53.000000000 +0100 ++++ dhcp-4.2.4b1/common/options.c 2012-04-16 17:34:27.608079076 +0200 @@ -706,7 +706,11 @@ cons_options(struct packet *inpacket, st * packet. */ @@ -246,9 +246,9 @@ diff -up dhcp-4.2.3rc1/common/options.c.rfc3442 dhcp-4.2.3rc1/common/options.c case '6': iaddr.len = 16; memcpy(iaddr.iabuf, dp, 16); -diff -up dhcp-4.2.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c ---- dhcp-4.2.3rc1/common/parse.c.rfc3442 2011-10-18 18:50:11.609621377 +0200 -+++ dhcp-4.2.3rc1/common/parse.c 2011-10-18 18:50:11.731619852 +0200 +diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c +--- dhcp-4.2.4b1/common/parse.c.rfc3442 2012-04-16 17:34:27.577079510 +0200 ++++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:34:27.610079048 +0200 @@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr) } @@ -289,7 +289,7 @@ diff -up dhcp-4.2.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c * Return true if every character in the string is hexadecimal. */ static int -@@ -700,8 +733,10 @@ unsigned char *parse_numeric_aggregate ( +@@ -704,8 +737,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.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c if (token != RBRACE && token != LBRACE) token = next_token (&val, (unsigned *)0, -@@ -1624,6 +1659,9 @@ int parse_option_code_definition (cfile, +@@ -1628,6 +1663,9 @@ int parse_option_code_definition (cfile, case IP_ADDRESS: type = 'I'; break; @@ -311,7 +311,7 @@ diff -up dhcp-4.2.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c case IP6_ADDRESS: type = '6'; break; -@@ -5372,6 +5410,15 @@ int parse_option_token (rv, cfile, fmt, +@@ -5375,6 +5413,15 @@ int parse_option_token (rv, cfile, fmt, } break; @@ -327,7 +327,7 @@ diff -up dhcp-4.2.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c case '6': /* IPv6 address. */ if (!parse_ip6_addr(cfile, &addr)) { return 0; -@@ -5632,6 +5679,13 @@ int parse_option_decl (oc, cfile) +@@ -5635,6 +5682,13 @@ int parse_option_decl (oc, cfile) goto exit; len = ip_addr.len; dp = ip_addr.iabuf; @@ -341,10 +341,10 @@ diff -up dhcp-4.2.3rc1/common/parse.c.rfc3442 dhcp-4.2.3rc1/common/parse.c alloc: if (hunkix + len > sizeof hunkbuf) { -diff -up dhcp-4.2.3rc1/common/tables.c.rfc3442 dhcp-4.2.3rc1/common/tables.c ---- dhcp-4.2.3rc1/common/tables.c.rfc3442 2011-10-18 18:50:11.600621489 +0200 -+++ dhcp-4.2.3rc1/common/tables.c 2011-10-18 18:50:11.736619789 +0200 -@@ -51,6 +51,7 @@ HASH_FUNCTIONS (option_code, const unsig +diff -up dhcp-4.2.4b1/common/tables.c.rfc3442 dhcp-4.2.4b1/common/tables.c +--- dhcp-4.2.4b1/common/tables.c.rfc3442 2012-04-16 17:34:27.566079664 +0200 ++++ dhcp-4.2.4b1/common/tables.c 2012-04-16 17:34:27.611079034 +0200 +@@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig Format codes: I - IPv4 address @@ -352,7 +352,7 @@ diff -up dhcp-4.2.3rc1/common/tables.c.rfc3442 dhcp-4.2.3rc1/common/tables.c 6 - IPv6 address l - 32-bit signed integer L - 32-bit unsigned integer -@@ -208,6 +209,7 @@ static struct option dhcp_options[] = { +@@ -209,6 +210,7 @@ static struct option dhcp_options[] = { { "default-url", "t", &dhcp_universe, 114, 1 }, { "subnet-selection", "I", &dhcp_universe, 118, 1 }, { "domain-search", "D", &dhcp_universe, 119, 1 }, @@ -360,10 +360,10 @@ diff -up dhcp-4.2.3rc1/common/tables.c.rfc3442 dhcp-4.2.3rc1/common/tables.c { "vivco", "Evendor-class.", &dhcp_universe, 124, 1 }, { "vivso", "Evendor.", &dhcp_universe, 125, 1 }, #if 0 -diff -up dhcp-4.2.3rc1/includes/dhcpd.h.rfc3442 dhcp-4.2.3rc1/includes/dhcpd.h ---- dhcp-4.2.3rc1/includes/dhcpd.h.rfc3442 2011-10-18 18:50:11.561621977 +0200 -+++ dhcp-4.2.3rc1/includes/dhcpd.h 2011-10-18 18:50:11.767619401 +0200 -@@ -2665,6 +2665,7 @@ isc_result_t range2cidr(struct iaddrcidr +diff -up dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 dhcp-4.2.4b1/includes/dhcpd.h +--- dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 2012-04-16 17:34:27.543079986 +0200 ++++ dhcp-4.2.4b1/includes/dhcpd.h 2012-04-16 17:34:27.613079006 +0200 +@@ -2666,6 +2666,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 (struct iaddr); @@ -371,7 +371,7 @@ diff -up dhcp-4.2.3rc1/includes/dhcpd.h.rfc3442 dhcp-4.2.3rc1/includes/dhcpd.h char *piaddrmask(struct iaddr *, struct iaddr *); char *piaddrcidr(const struct iaddr *, unsigned int); u_int16_t validate_port(char *); -@@ -2872,6 +2873,7 @@ void parse_client_lease_declaration (str +@@ -2873,6 +2874,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 *); @@ -379,10 +379,10 @@ diff -up dhcp-4.2.3rc1/includes/dhcpd.h.rfc3442 dhcp-4.2.3rc1/includes/dhcpd.h int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *); void parse_reject_statement (struct parse *, struct client_config *); -diff -up dhcp-4.2.3rc1/includes/dhcp.h.rfc3442 dhcp-4.2.3rc1/includes/dhcp.h ---- dhcp-4.2.3rc1/includes/dhcp.h.rfc3442 2009-11-20 02:49:01.000000000 +0100 -+++ dhcp-4.2.3rc1/includes/dhcp.h 2011-10-18 18:50:11.772619339 +0200 -@@ -158,6 +158,7 @@ struct dhcp_packet { +diff -up dhcp-4.2.4b1/includes/dhcp.h.rfc3442 dhcp-4.2.4b1/includes/dhcp.h +--- dhcp-4.2.4b1/includes/dhcp.h.rfc3442 2012-02-16 22:09:14.000000000 +0100 ++++ dhcp-4.2.4b1/includes/dhcp.h 2012-04-16 17:34:27.613079006 +0200 +@@ -163,6 +163,7 @@ struct dhcp_packet { #define DHO_ASSOCIATED_IP 92 #define DHO_SUBNET_SELECTION 118 /* RFC3011! */ #define DHO_DOMAIN_SEARCH 119 /* RFC3397 */ @@ -390,16 +390,16 @@ diff -up dhcp-4.2.3rc1/includes/dhcp.h.rfc3442 dhcp-4.2.3rc1/includes/dhcp.h #define DHO_VIVCO_SUBOPTIONS 124 #define DHO_VIVSO_SUBOPTIONS 125 -diff -up dhcp-4.2.3rc1/includes/dhctoken.h.rfc3442 dhcp-4.2.3rc1/includes/dhctoken.h ---- dhcp-4.2.3rc1/includes/dhctoken.h.rfc3442 2011-10-18 18:50:11.000000000 +0200 -+++ dhcp-4.2.3rc1/includes/dhctoken.h 2011-10-18 18:50:55.753069508 +0200 -@@ -364,7 +364,8 @@ enum dhcp_token { - GETHOSTBYNAME = 665, +diff -up dhcp-4.2.4b1/includes/dhctoken.h.rfc3442 dhcp-4.2.4b1/includes/dhctoken.h +--- dhcp-4.2.4b1/includes/dhctoken.h.rfc3442 2012-04-16 17:34:27.000000000 +0200 ++++ dhcp-4.2.4b1/includes/dhctoken.h 2012-04-16 17:35:15.028414805 +0200 +@@ -365,7 +365,8 @@ enum dhcp_token { PRIMARY6 = 666, SECONDARY6 = 667, -- BOOTP_BROADCAST_ALWAYS = 668 -+ BOOTP_BROADCAST_ALWAYS = 668, -+ DESTINATION_DESCRIPTOR = 669 + TOKEN_INFINIBAND = 668, +- BOOTP_BROADCAST_ALWAYS = 669 ++ BOOTP_BROADCAST_ALWAYS = 669, ++ DESTINATION_DESCRIPTOR = 670 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ diff --git a/dhcp-4.2.4-send_release.patch b/dhcp-4.2.4-send_release.patch new file mode 100644 index 0000000..3e0a618 --- /dev/null +++ b/dhcp-4.2.4-send_release.patch @@ -0,0 +1,23 @@ +diff -up dhcp-4.2.4b1/client/dhclient.c.send_release dhcp-4.2.4b1/client/dhclient.c +--- dhcp-4.2.4b1/client/dhclient.c.send_release 2012-04-16 17:48:52.000000000 +0200 ++++ dhcp-4.2.4b1/client/dhclient.c 2012-04-16 17:50:44.357396720 +0200 +@@ -2764,8 +2764,8 @@ void send_release (cpp) + inet_ntoa (destination.sin_addr), + ntohs (destination.sin_port), client -> xid); + +- if (fallback_interface) { +- result = send_packet(fallback_interface, NULL, &client->packet, ++ if (client -> interface) { ++ result = send_packet(client -> interface, NULL, &client->packet, + client->packet_length, from, &destination, + NULL); + if (result < 0) { +@@ -2776,7 +2776,7 @@ void send_release (cpp) + } + } else { + /* Send out a packet. */ +- result = send_packet(client->interface, NULL, &client->packet, ++ result = send_packet(fallback_interface, NULL, &client->packet, + client->packet_length, from, &destination, + NULL); + if (result < 0) { diff --git a/dhcp-4.2.2-systemtap.patch b/dhcp-4.2.4-systemtap.patch similarity index 78% rename from dhcp-4.2.2-systemtap.patch rename to dhcp-4.2.4-systemtap.patch index 327c573..bba60b1 100644 --- a/dhcp-4.2.2-systemtap.patch +++ b/dhcp-4.2.4-systemtap.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.2/configure.ac.systemtap dhcp-4.2.2/configure.ac ---- dhcp-4.2.2/configure.ac.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/configure.ac 2011-10-09 20:22:23.000000000 +0200 -@@ -485,6 +485,35 @@ else +diff -up dhcp-4.2.4b1/configure.ac.systemtap dhcp-4.2.4b1/configure.ac +--- dhcp-4.2.4b1/configure.ac.systemtap 2012-04-16 17:46:10.913227143 +0200 ++++ dhcp-4.2.4b1/configure.ac 2012-04-16 17:46:10.947226667 +0200 +@@ -504,6 +504,35 @@ else AC_MSG_RESULT(no) fi @@ -37,7 +37,7 @@ diff -up dhcp-4.2.2/configure.ac.systemtap dhcp-4.2.2/configure.ac # Solaris needs some libraries for functions AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(inet_ntoa, [nsl]) -@@ -631,6 +660,7 @@ AC_OUTPUT([ +@@ -650,6 +679,7 @@ AC_OUTPUT([ relay/Makefile server/Makefile tests/Makefile @@ -45,9 +45,9 @@ diff -up dhcp-4.2.2/configure.ac.systemtap dhcp-4.2.2/configure.ac ]) sh util/bindvar.sh -diff -up dhcp-4.2.2/Makefile.am.systemtap dhcp-4.2.2/Makefile.am ---- dhcp-4.2.2/Makefile.am.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/Makefile.am 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/Makefile.am.systemtap dhcp-4.2.4b1/Makefile.am +--- dhcp-4.2.4b1/Makefile.am.systemtap 2012-04-16 17:46:10.791228851 +0200 ++++ dhcp-4.2.4b1/Makefile.am 2012-04-16 17:46:10.947226667 +0200 @@ -29,5 +29,8 @@ endif SUBDIRS += includes tests common dst omapip client dhcpctl relay server @@ -57,9 +57,9 @@ diff -up dhcp-4.2.2/Makefile.am.systemtap dhcp-4.2.2/Makefile.am + nobase_include_HEADERS = dhcpctl/dhcpctl.h -diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c ---- dhcp-4.2.2/server/dhcp.c.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/dhcp.c 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/server/dhcp.c.systemtap dhcp-4.2.4b1/server/dhcp.c +--- dhcp-4.2.4b1/server/dhcp.c.systemtap 2012-04-16 17:46:10.816228501 +0200 ++++ dhcp-4.2.4b1/server/dhcp.c 2012-04-16 17:48:11.528537555 +0200 @@ -36,7 +36,7 @@ #include #include @@ -87,8 +87,8 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c } void dhcprequest (packet, ms_nulltp, ip_lease) -@@ -422,6 +426,8 @@ void dhcprequest (packet, ms_nulltp, ip_ - int have_server_identifier = 0; +@@ -421,6 +425,8 @@ void dhcprequest (packet, ms_nulltp, ip_ + #endif int have_requested_addr = 0; + TRACE(DHCPD_REQUEST_START()); @@ -96,7 +96,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_REQUESTED_ADDRESS); memset (&data, 0, sizeof data); -@@ -679,6 +685,9 @@ void dhcprequest (packet, ms_nulltp, ip_ +@@ -677,6 +683,9 @@ void dhcprequest (packet, ms_nulltp, ip_ log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip)); out: @@ -106,7 +106,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c if (subnet) subnet_dereference (&subnet, MDL); if (lease) -@@ -697,6 +706,7 @@ void dhcprelease (packet, ms_nulltp) +@@ -695,6 +704,7 @@ void dhcprelease (packet, ms_nulltp) const char *s; char msgbuf [1024], cstr[16]; /* XXX */ @@ -114,7 +114,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c /* DHCPRELEASE must not specify address in requested-address option, but old protocol specs weren't explicit about this, -@@ -821,6 +831,8 @@ void dhcprelease (packet, ms_nulltp) +@@ -819,6 +829,8 @@ void dhcprelease (packet, ms_nulltp) #endif if (lease) lease_dereference (&lease, MDL); @@ -123,7 +123,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c } void dhcpdecline (packet, ms_nulltp) -@@ -838,6 +850,8 @@ void dhcpdecline (packet, ms_nulltp) +@@ -836,6 +848,8 @@ void dhcpdecline (packet, ms_nulltp) struct option_cache *oc; struct data_string data; @@ -132,7 +132,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c /* DHCPDECLINE must specify address. */ if (!(oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_REQUESTED_ADDRESS))) -@@ -949,6 +963,8 @@ void dhcpdecline (packet, ms_nulltp) +@@ -947,6 +961,8 @@ void dhcpdecline (packet, ms_nulltp) option_state_dereference (&options, MDL); if (lease) lease_dereference (&lease, MDL); @@ -142,16 +142,16 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c void dhcpinform (packet, ms_nulltp) @@ -970,6 +986,8 @@ void dhcpinform (packet, ms_nulltp) - struct in_addr from; - isc_boolean_t zeroed_ciaddr; + struct interface_info *interface; + int result; + TRACE(DHCPD_INFORM_START()); + /* The client should set ciaddr to its IP address, but apparently it's common for clients not to do this, so we'll use their IP source address if they didn't set ciaddr. */ -@@ -1320,6 +1338,8 @@ void dhcpinform (packet, ms_nulltp) - from, &to, (struct hardware *)0); +@@ -1327,6 +1345,8 @@ void dhcpinform (packet, ms_nulltp) + if (subnet) subnet_dereference (&subnet, MDL); + @@ -159,7 +159,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c } void nak_lease (packet, cip) -@@ -1336,6 +1356,8 @@ void nak_lease (packet, cip) +@@ -1343,6 +1363,8 @@ void nak_lease (packet, cip) struct option_state *options = (struct option_state *)0; struct option_cache *oc = (struct option_cache *)0; @@ -168,16 +168,15 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c option_state_allocate (&options, MDL); memset (&outgoing, 0, sizeof outgoing); memset (&raw, 0, sizeof raw); -@@ -1474,6 +1496,8 @@ void nak_lease (packet, cip) - errno = 0; - result = send_packet(packet->interface, packet, &raw, - outgoing.packet_length, from, &to, NULL); -+ +@@ -1494,6 +1516,7 @@ void nak_lease (packet, cip) + packet->interface->name); + } + + TRACE(DHCPD_NAK_LEASE_DONE()); } void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) -@@ -1515,6 +1539,8 @@ void ack_lease (packet, lease, offer, wh +@@ -1535,6 +1558,8 @@ void ack_lease (packet, lease, offer, wh if (lease -> state) return; @@ -186,7 +185,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c /* Save original cltt for comparison later. */ lease_cltt = lease->cltt; -@@ -2877,6 +2903,8 @@ void ack_lease (packet, lease, offer, wh +@@ -2897,6 +2922,8 @@ void ack_lease (packet, lease, offer, wh #endif dhcp_reply(lease); } @@ -195,7 +194,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c } /* -@@ -3029,6 +3057,8 @@ void dhcp_reply (lease) +@@ -3049,6 +3076,8 @@ void dhcp_reply (lease) if (!state) log_fatal ("dhcp_reply was supplied lease with no state!"); @@ -204,7 +203,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c /* Compose a response for the client... */ memset (&raw, 0, sizeof raw); memset (&d1, 0, sizeof d1); -@@ -3236,6 +3266,8 @@ void dhcp_reply (lease) +@@ -3270,6 +3299,8 @@ void dhcp_reply (lease) free_lease_state (state, MDL); lease -> state = (struct lease_state *)0; @@ -213,7 +212,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c } int find_lease (struct lease **lp, -@@ -3258,6 +3290,8 @@ int find_lease (struct lease **lp, +@@ -3292,6 +3323,8 @@ int find_lease (struct lease **lp, struct data_string client_identifier; struct hardware h; @@ -222,7 +221,7 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c #if defined(FAILOVER_PROTOCOL) /* Quick check to see if the peer has leases. */ if (peer_has_leases) { -@@ -3985,6 +4019,9 @@ int find_lease (struct lease **lp, +@@ -4019,6 +4052,9 @@ int find_lease (struct lease **lp, #if defined (DEBUG_FIND_LEASE) log_info ("Not returning a lease."); #endif @@ -232,9 +231,9 @@ diff -up dhcp-4.2.2/server/dhcp.c.systemtap dhcp-4.2.2/server/dhcp.c return 0; } -diff -up dhcp-4.2.2/server/dhcpd.c.systemtap dhcp-4.2.2/server/dhcpd.c ---- dhcp-4.2.2/server/dhcpd.c.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/dhcpd.c 2011-10-09 20:24:24.000000000 +0200 +diff -up dhcp-4.2.4b1/server/dhcpd.c.systemtap dhcp-4.2.4b1/server/dhcpd.c +--- dhcp-4.2.4b1/server/dhcpd.c.systemtap 2012-04-16 17:46:10.928226933 +0200 ++++ dhcp-4.2.4b1/server/dhcpd.c 2012-04-16 17:46:10.951226611 +0200 @@ -58,6 +58,8 @@ static const char url [] = # undef group #endif /* PARANOIA */ @@ -252,9 +251,9 @@ diff -up dhcp-4.2.2/server/dhcpd.c.systemtap dhcp-4.2.2/server/dhcpd.c /* Receive packets and dispatch them... */ dispatch (); -diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c ---- dhcp-4.2.2/server/dhcpv6.c.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/dhcpv6.c 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/server/dhcpv6.c.systemtap dhcp-4.2.4b1/server/dhcpv6.c +--- dhcp-4.2.4b1/server/dhcpv6.c.systemtap 2012-04-16 17:46:10.925226975 +0200 ++++ dhcp-4.2.4b1/server/dhcpv6.c 2012-04-16 17:46:10.953226583 +0200 @@ -15,6 +15,7 @@ */ @@ -263,7 +262,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c #ifdef DHCPv6 -@@ -4171,6 +4172,8 @@ static void +@@ -4198,6 +4199,8 @@ static void dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) { struct data_string client_id; @@ -272,7 +271,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate our input. */ -@@ -4184,6 +4187,8 @@ dhcpv6_solicit(struct data_string *reply +@@ -4211,6 +4214,8 @@ dhcpv6_solicit(struct data_string *reply * Clean up. */ data_string_forget(&client_id, MDL); @@ -281,7 +280,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* -@@ -4197,6 +4202,8 @@ dhcpv6_request(struct data_string *reply +@@ -4224,6 +4229,8 @@ dhcpv6_request(struct data_string *reply struct data_string client_id; struct data_string server_id; @@ -290,7 +289,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate our input. */ -@@ -4214,6 +4221,8 @@ dhcpv6_request(struct data_string *reply +@@ -4241,6 +4248,8 @@ dhcpv6_request(struct data_string *reply */ data_string_forget(&client_id, MDL); data_string_forget(&server_id, MDL); @@ -299,7 +298,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* Find a DHCPv6 packet's shared network from hints in the packet. -@@ -4326,6 +4335,8 @@ dhcpv6_confirm(struct data_string *reply +@@ -4353,6 +4362,8 @@ dhcpv6_confirm(struct data_string *reply struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data; int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options)); @@ -308,7 +307,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Basic client message validation. */ -@@ -4512,6 +4523,8 @@ exit: +@@ -4539,6 +4550,8 @@ exit: option_state_dereference(&cli_enc_opt_state, MDL); if (opt_state != NULL) option_state_dereference(&opt_state, MDL); @@ -317,7 +316,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* -@@ -4526,6 +4539,8 @@ dhcpv6_renew(struct data_string *reply, +@@ -4553,6 +4566,8 @@ dhcpv6_renew(struct data_string *reply, struct data_string client_id; struct data_string server_id; @@ -326,7 +325,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate the request. */ -@@ -4543,6 +4558,8 @@ dhcpv6_renew(struct data_string *reply, +@@ -4570,6 +4585,8 @@ dhcpv6_renew(struct data_string *reply, */ data_string_forget(&server_id, MDL); data_string_forget(&client_id, MDL); @@ -335,7 +334,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* -@@ -4556,6 +4573,8 @@ static void +@@ -4583,6 +4600,8 @@ static void dhcpv6_rebind(struct data_string *reply, struct packet *packet) { struct data_string client_id; @@ -344,7 +343,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c if (!valid_client_msg(packet, &client_id)) { return; } -@@ -4563,6 +4582,8 @@ dhcpv6_rebind(struct data_string *reply, +@@ -4590,6 +4609,8 @@ dhcpv6_rebind(struct data_string *reply, lease_to_client(reply, packet, &client_id, NULL); data_string_forget(&client_id, MDL); @@ -353,7 +352,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } static void -@@ -5009,6 +5030,8 @@ dhcpv6_decline(struct data_string *reply +@@ -5034,6 +5055,8 @@ dhcpv6_decline(struct data_string *reply struct data_string client_id; struct data_string server_id; @@ -362,7 +361,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate our input. */ -@@ -5029,6 +5052,8 @@ dhcpv6_decline(struct data_string *reply +@@ -5054,6 +5077,8 @@ dhcpv6_decline(struct data_string *reply data_string_forget(&server_id, MDL); data_string_forget(&client_id, MDL); @@ -371,7 +370,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } static void -@@ -5479,6 +5504,8 @@ dhcpv6_release(struct data_string *reply +@@ -5502,6 +5527,8 @@ dhcpv6_release(struct data_string *reply struct data_string client_id; struct data_string server_id; @@ -380,7 +379,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate our input. */ -@@ -5500,6 +5527,8 @@ dhcpv6_release(struct data_string *reply +@@ -5523,6 +5550,8 @@ dhcpv6_release(struct data_string *reply data_string_forget(&server_id, MDL); data_string_forget(&client_id, MDL); @@ -389,7 +388,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* -@@ -5512,6 +5541,8 @@ dhcpv6_information_request(struct data_s +@@ -5535,6 +5564,8 @@ dhcpv6_information_request(struct data_s struct data_string client_id; struct data_string server_id; @@ -398,7 +397,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Validate our input. */ -@@ -5543,6 +5574,8 @@ dhcpv6_information_request(struct data_s +@@ -5566,6 +5597,8 @@ dhcpv6_information_request(struct data_s data_string_forget(&client_id, MDL); } data_string_forget(&server_id, MDL); @@ -407,7 +406,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } /* -@@ -5571,6 +5604,8 @@ dhcpv6_relay_forw(struct data_string *re +@@ -5594,6 +5627,8 @@ dhcpv6_relay_forw(struct data_string *re struct dhcpv6_relay_packet *reply; int reply_ofs; @@ -416,7 +415,7 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c /* * Initialize variables for early exit. */ -@@ -5828,6 +5863,8 @@ exit: +@@ -5853,6 +5888,8 @@ exit: if (enc_packet != NULL) { packet_dereference(&enc_packet, MDL); } @@ -425,10 +424,10 @@ diff -up dhcp-4.2.2/server/dhcpv6.c.systemtap dhcp-4.2.2/server/dhcpv6.c } static void -diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c ---- dhcp-4.2.2/server/failover.c.systemtap 2011-05-11 16:21:00.000000000 +0200 -+++ dhcp-4.2.2/server/failover.c 2011-10-09 20:22:23.000000000 +0200 -@@ -35,6 +35,8 @@ +diff -up dhcp-4.2.4b1/server/failover.c.systemtap dhcp-4.2.4b1/server/failover.c +--- dhcp-4.2.4b1/server/failover.c.systemtap 2012-03-19 23:29:49.000000000 +0100 ++++ dhcp-4.2.4b1/server/failover.c 2012-04-16 17:46:10.955226555 +0200 +@@ -36,6 +36,8 @@ #include "dhcpd.h" #include @@ -437,7 +436,7 @@ diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c #if defined (FAILOVER_PROTOCOL) dhcp_failover_state_t *failover_states; static isc_result_t do_a_failover_option (omapi_object_t *, -@@ -1711,6 +1713,8 @@ isc_result_t dhcp_failover_set_state (dh +@@ -1712,6 +1714,8 @@ isc_result_t dhcp_failover_set_state (dh struct lease *l; struct timeval tv; @@ -446,7 +445,7 @@ diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c /* If we're in certain states where we're sending updates, and the peer * state changes, we need to re-schedule any pending updates just to * be on the safe side. This results in retransmission. -@@ -1938,6 +1942,8 @@ isc_result_t dhcp_failover_set_state (dh +@@ -1939,6 +1943,8 @@ isc_result_t dhcp_failover_set_state (dh break; } @@ -455,7 +454,7 @@ diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c return ISC_R_SUCCESS; } -@@ -2420,6 +2426,8 @@ dhcp_failover_pool_dobalance(dhcp_failov +@@ -2422,6 +2428,8 @@ dhcp_failover_pool_dobalance(dhcp_failov if (state -> me.state != normal) return 0; @@ -464,7 +463,7 @@ diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c state->last_balance = cur_time; for (s = shared_networks ; s ; s = s->next) { -@@ -2580,6 +2588,8 @@ dhcp_failover_pool_dobalance(dhcp_failov +@@ -2582,6 +2590,8 @@ dhcp_failover_pool_dobalance(dhcp_failov if (leases_queued) commit_leases(); @@ -473,9 +472,9 @@ diff -up dhcp-4.2.2/server/failover.c.systemtap dhcp-4.2.2/server/failover.c return leases_queued; } -diff -up dhcp-4.2.2/server/Makefile.am.systemtap dhcp-4.2.2/server/Makefile.am ---- dhcp-4.2.2/server/Makefile.am.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/Makefile.am 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/server/Makefile.am.systemtap dhcp-4.2.4b1/server/Makefile.am +--- dhcp-4.2.4b1/server/Makefile.am.systemtap 2012-04-16 17:46:10.914227129 +0200 ++++ dhcp-4.2.4b1/server/Makefile.am 2012-04-16 17:46:10.956226541 +0200 @@ -4,7 +4,7 @@ dist_sysconf_DATA = dhcpd.conf sbin_PROGRAMS = dhcpd dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \ @@ -499,9 +498,9 @@ diff -up dhcp-4.2.2/server/Makefile.am.systemtap dhcp-4.2.2/server/Makefile.am + +dhcpd_LDADD += probes.o +endif -diff -up dhcp-4.2.2/server/probes.d.systemtap dhcp-4.2.2/server/probes.d ---- dhcp-4.2.2/server/probes.d.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/probes.d 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/server/probes.d.systemtap dhcp-4.2.4b1/server/probes.d +--- dhcp-4.2.4b1/server/probes.d.systemtap 2012-04-16 17:46:10.956226541 +0200 ++++ dhcp-4.2.4b1/server/probes.d 2012-04-16 17:46:10.956226541 +0200 @@ -0,0 +1,43 @@ +provider dhcpd { + probe main(); @@ -546,9 +545,9 @@ diff -up dhcp-4.2.2/server/probes.d.systemtap dhcp-4.2.2/server/probes.d + probe failover_set_state_start(int, int) /* state, new_state */ + probe failover_set_state_done() +}; -diff -up dhcp-4.2.2/server/trace.h.systemtap dhcp-4.2.2/server/trace.h ---- dhcp-4.2.2/server/trace.h.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/server/trace.h 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/server/trace.h.systemtap dhcp-4.2.4b1/server/trace.h +--- dhcp-4.2.4b1/server/trace.h.systemtap 2012-04-16 17:46:10.956226541 +0200 ++++ dhcp-4.2.4b1/server/trace.h 2012-04-16 17:46:10.956226541 +0200 @@ -0,0 +1,11 @@ +// trace.h + @@ -561,9 +560,9 @@ diff -up dhcp-4.2.2/server/trace.h.systemtap dhcp-4.2.2/server/trace.h +// Wrap the probe to allow it to be removed when no systemtap available +#define TRACE(probe) +#endif -diff -up dhcp-4.2.2/tapset/dhcpd.stp.systemtap dhcp-4.2.2/tapset/dhcpd.stp ---- dhcp-4.2.2/tapset/dhcpd.stp.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/tapset/dhcpd.stp 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/tapset/dhcpd.stp.systemtap dhcp-4.2.4b1/tapset/dhcpd.stp +--- dhcp-4.2.4b1/tapset/dhcpd.stp.systemtap 2012-04-16 17:46:10.957226527 +0200 ++++ dhcp-4.2.4b1/tapset/dhcpd.stp 2012-04-16 17:46:10.957226527 +0200 @@ -0,0 +1,212 @@ +/* dhcpd tapset + Copyright (C) 2011, Red Hat Inc. @@ -777,9 +776,9 @@ diff -up dhcp-4.2.2/tapset/dhcpd.stp.systemtap dhcp-4.2.2/tapset/dhcpd.stp +{ + probestr = sprintf("%s", $$name); +} -diff -up dhcp-4.2.2/tapset/Makefile.am.systemtap dhcp-4.2.2/tapset/Makefile.am ---- dhcp-4.2.2/tapset/Makefile.am.systemtap 2011-10-09 20:22:23.000000000 +0200 -+++ dhcp-4.2.2/tapset/Makefile.am 2011-10-09 20:22:23.000000000 +0200 +diff -up dhcp-4.2.4b1/tapset/Makefile.am.systemtap dhcp-4.2.4b1/tapset/Makefile.am +--- dhcp-4.2.4b1/tapset/Makefile.am.systemtap 2012-04-16 17:46:10.957226527 +0200 ++++ dhcp-4.2.4b1/tapset/Makefile.am 2012-04-16 17:46:10.957226527 +0200 @@ -0,0 +1,26 @@ +# Makefile.am for dhcp/tapset +# Jiri Popelka diff --git a/dhcp-4.2.0-unicast-bootp.patch b/dhcp-4.2.4-unicast-bootp.patch similarity index 72% rename from dhcp-4.2.0-unicast-bootp.patch rename to dhcp-4.2.4-unicast-bootp.patch index 78bc078..69ab4c8 100644 --- a/dhcp-4.2.0-unicast-bootp.patch +++ b/dhcp-4.2.4-unicast-bootp.patch @@ -1,7 +1,7 @@ -diff -up dhcp-4.2.0/server/bootp.c.unicast dhcp-4.2.0/server/bootp.c ---- dhcp-4.2.0/server/bootp.c.unicast 2009-11-20 02:49:03.000000000 +0100 -+++ dhcp-4.2.0/server/bootp.c 2010-07-21 13:40:25.000000000 +0200 -@@ -58,6 +58,7 @@ void bootp (packet) +diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c +--- dhcp-4.2.4b1/server/bootp.c.unicast 2012-04-10 23:27:06.000000000 +0200 ++++ dhcp-4.2.4b1/server/bootp.c 2012-04-16 17:28:42.095919022 +0200 +@@ -59,6 +59,7 @@ void bootp (packet) char msgbuf [1024]; int ignorep; int peer_has_leases = 0; @@ -9,7 +9,7 @@ diff -up dhcp-4.2.0/server/bootp.c.unicast dhcp-4.2.0/server/bootp.c if (packet -> raw -> op != BOOTREQUEST) return; -@@ -73,7 +74,7 @@ void bootp (packet) +@@ -74,7 +75,7 @@ void bootp (packet) ? inet_ntoa (packet -> raw -> giaddr) : packet -> interface -> name); @@ -18,24 +18,26 @@ diff -up dhcp-4.2.0/server/bootp.c.unicast dhcp-4.2.0/server/bootp.c log_info ("%s: network unknown", msgbuf); return; } -@@ -390,6 +391,13 @@ void bootp (packet) - from, &to, &hto); +@@ -399,6 +400,15 @@ void bootp (packet) + goto out; } + } else if (norelay == 2) { + to.sin_addr = raw.ciaddr; + to.sin_port = remote_port; + if (fallback_interface) { -+ result = send_packet (fallback_interface, (struct packet *)0, &raw, outgoing.packet_length, from, &to, &hto); ++ result = send_packet (fallback_interface, NULL, &raw, ++ outgoing.packet_length, from, ++ &to, &hto); + goto out; + } /* If it comes from a client that already knows its address and is not requesting a broadcast response, and we can -diff -up dhcp-4.2.0/server/dhcp.c.unicast dhcp-4.2.0/server/dhcp.c ---- dhcp-4.2.0/server/dhcp.c.unicast 2010-06-01 19:29:59.000000000 +0200 -+++ dhcp-4.2.0/server/dhcp.c 2010-07-21 13:40:25.000000000 +0200 -@@ -4185,6 +4185,7 @@ int locate_network (packet) +diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c +--- dhcp-4.2.4b1/server/dhcp.c.unicast 2012-03-09 12:28:12.000000000 +0100 ++++ dhcp-4.2.4b1/server/dhcp.c 2012-04-16 17:26:55.067418285 +0200 +@@ -4299,6 +4299,7 @@ int locate_network (packet) struct data_string data; struct subnet *subnet = (struct subnet *)0; struct option_cache *oc; @@ -43,7 +45,7 @@ diff -up dhcp-4.2.0/server/dhcp.c.unicast dhcp-4.2.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 -@@ -4200,12 +4201,24 @@ int locate_network (packet) +@@ -4314,12 +4315,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 +75,7 @@ diff -up dhcp-4.2.0/server/dhcp.c.unicast dhcp-4.2.0/server/dhcp.c } /* If there's an option indicating link connection, and it's valid, -@@ -4228,7 +4241,10 @@ int locate_network (packet) +@@ -4342,7 +4355,10 @@ int locate_network (packet) data_string_forget (&data, MDL); } else { ia.len = 4; @@ -85,7 +87,7 @@ diff -up dhcp-4.2.0/server/dhcp.c.unicast dhcp-4.2.0/server/dhcp.c } /* If we know the subnet on which the IP address lives, use it. */ -@@ -4236,7 +4252,10 @@ int locate_network (packet) +@@ -4350,7 +4366,10 @@ int locate_network (packet) shared_network_reference (&packet -> shared_network, subnet -> shared_network, MDL); subnet_dereference (&subnet, MDL); diff --git a/dhcp.spec b/dhcp.spec index 79b4c73..6b196ac 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -7,19 +7,19 @@ # Where dhcp configuration files are stored %global dhcpconfdir %{_sysconfdir}/dhcp -# Patch version -%global patchver P2 -# Pre-Release version -#%%global prever rc1 -#%%global VERSION %{version}%{prever} +#%%global patchver P2 +%global prever b1 + + #%%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.3 -Release: 25.%{patchver}%{?dist} +Version: 4.2.4 +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. @@ -38,10 +38,10 @@ Source6: dhcpd6.service Source7: dhcrelay.service Patch0: dhcp-4.2.0-errwarn-message.patch -Patch1: dhcp-4.2.3-options.patch +Patch1: dhcp-4.2.4-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 +Patch4: dhcp-4.2.4-unicast-bootp.patch Patch6: dhcp-4.2.2-dhclient-usage.patch Patch7: dhcp-4.2.0-default-requested-options.patch Patch8: dhcp-4.2.2-xen-checksum.patch @@ -52,27 +52,26 @@ 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 Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch -Patch18: dhcp-4.2.1-64_bit_lease_parse.patch +Patch18: dhcp-4.2.4-64_bit_lease_parse.patch Patch19: dhcp-4.2.2-capability.patch Patch20: dhcp-4.2.0-logpid.patch -Patch21: dhcp-4.2.0-UseMulticast.patch +Patch21: dhcp-4.2.4-UseMulticast.patch Patch22: dhcp-4.2.1-sendDecline.patch Patch23: dhcp-4.2.1-retransmission.patch -Patch25: dhcp-4.2.3-rfc3442-classless-static-routes.patch +Patch25: dhcp-4.2.4-rfc3442-classless-static-routes.patch Patch27: dhcp-4.2.0-honor-expired.patch -Patch28: dhcp-4.2.0-noprefixavail.patch Patch29: dhcp-4.2.2-remove-bind.patch Patch30: dhcp-4.2.2-sharedlib.patch -Patch31: dhcp-4.2.0-PPP.patch +Patch31: dhcp-4.2.4-PPP.patch Patch32: dhcp-4.2.3-paranoia.patch -Patch33: dhcp-4.2.2-lpf-ib.patch -Patch34: dhcp-4.2.2-improved-xid.patch +Patch33: dhcp-4.2.4-lpf-ib.patch +Patch34: dhcp-4.2.4-improved-xid.patch Patch35: dhcp-4.2.2-gpxe-cid.patch -Patch36: dhcp-4.2.2-systemtap.patch +Patch36: dhcp-4.2.4-systemtap.patch Patch37: dhcp-4.2.3-dhclient-decline-onetry.patch Patch38: dhcp-4.2.3-P2-log_perror.patch Patch39: dhcp-4.2.3-P2-getifaddrs.patch -Patch40: dhcp-4.2.3-P2-send_release.patch +Patch40: dhcp-4.2.4-send_release.patch Patch41: dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch BuildRequires: autoconf @@ -266,17 +265,6 @@ rm bind/bind.tar.gz # (Submitted to dhcp-suggest@isc.org - [ISC-Bugs #22675]) %patch27 -p1 -b .honor-expired -# 1) When server has empty pool of addresses/prefixes it must send Advertise with -# NoAddrsAvail/NoPrefixAvail status in response to clients Solicit. -# Without this patch server having empty pool of addresses/prefixes was ignoring -# client's' Solicit when client was also sending address in IA_NA or prefix in IA_PD as a preference. -# 2) When client sends prefix in IA_PD as a preference and server doesn't have -# this prefix in any pool the server should offer other free prefix. -# Without this patch server ignored client's Solicit in which the client was sending -# prefix in IA_PD (as a preference) and this prefix was not in any of server's pools. -# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #22676]) -%patch28 -p1 -b .noprefixavail - #Build dhcp's libraries as shared libs instead of static libs. %patch30 -p1 -b .sharedlib @@ -616,6 +604,9 @@ fi %changelog +* Mon Apr 16 2012 Jiri Popelka - 12:4.2.4-0.1.b1 +- 4.2.4b1: noprefixavail.patch merged upstream + * Fri Mar 30 2012 Jiri Popelka - 12:4.2.3-25.P2 - move dhclient & dhclient-script from /sbin to /usr/sbin diff --git a/sources b/sources index ad71aa8..64fb9ad 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 14f57fd580d01633d0fad4809007a801 dhcp-4.2.3-P2.tar.gz +50f45d0436417e777d5b6040d7a38c48 dhcp-4.2.4b1.tar.gz