New version 4.3.6b1
This commit is contained in:
parent
8e64716dfb
commit
af708bb8be
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,3 +31,4 @@
|
||||
/dhcp-4.3.4.tar.gz
|
||||
/dhcp-4.3.5b1.tar.gz
|
||||
/dhcp-4.3.5.tar.gz
|
||||
/dhcp-4.3.6b1.tar.gz
|
||||
|
@ -1,11 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||
|
||||
iQEcBAABAgAGBQJX8jrBAAoJEG+m68mRGkwCczcH/1lMdlvf2RX+IfNraDTXWmY1
|
||||
+MGk51H7aIJDRDFhiLA1f1ht1hIXJB0gnaOdJxLcqQGUiHPQfVZidDz2XxAjr7S2
|
||||
VvV6mfHxO1+oPsaFzCEItDqHk/LJcBDgKWC2cvabNfi5Nyq8rR+Zjn0i509DYFBR
|
||||
cJYzau7Smse8ZVpUrsdLOtKgNznVPioowqCooiOlzZfYNfKOdwk4z6U8vglLhRL4
|
||||
xpfbg373Z78dExeNPqJ97c/tUg2YCnuZGvLfwvI+2Bzrp63TbAnJYB3CnyCj+fS2
|
||||
iSH7WACNSqRQoEWxE+vi9kTY0GGVFaonPZSRMT1DKFhBge4TdMCm2STIIOJiPFw=
|
||||
=xG2q
|
||||
-----END PGP SIGNATURE-----
|
@ -1,9 +1,8 @@
|
||||
diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
--- dhcp-4.3.4/server/dhcp.c.IPoIB-log-id 2016-04-29 12:52:14.285061620 +0200
|
||||
+++ dhcp-4.3.4/server/dhcp.c 2016-04-29 12:53:59.535088020 +0200
|
||||
@@ -85,6 +85,42 @@ const int dhcp_type_name_max = ((sizeof
|
||||
# define send_packet trace_packet_send
|
||||
#endif
|
||||
--- a/server/dhcp.c 2017-07-14 15:32:14.611104590 +0200
|
||||
+++ b/server/dhcp.c 2017-07-14 15:34:17.508858018 +0200
|
||||
@@ -87,6 +87,42 @@
|
||||
|
||||
static TIME leaseTimeCheck(TIME calculated, TIME alternate);
|
||||
|
||||
+char *print_client_identifier_from_packet (packet)
|
||||
+ struct packet *packet;
|
||||
@ -44,7 +43,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
void
|
||||
dhcp (struct packet *packet) {
|
||||
int ms_nulltp = 0;
|
||||
@@ -127,9 +163,7 @@ dhcp (struct packet *packet) {
|
||||
@@ -129,9 +165,7 @@
|
||||
|
||||
log_info("%s from %s via %s: %s", s,
|
||||
(packet->raw->htype
|
||||
@ -55,7 +54,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
: "<no identifier>"),
|
||||
packet->raw->giaddr.s_addr
|
||||
? inet_ntoa(packet->raw->giaddr)
|
||||
@@ -326,9 +360,7 @@ void dhcpdiscover (packet, ms_nulltp)
|
||||
@@ -328,9 +362,7 @@
|
||||
#endif
|
||||
snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
|
||||
(packet -> raw -> htype
|
||||
@ -66,7 +65,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
: (lease
|
||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||
: "<no identifier>")),
|
||||
@@ -540,9 +572,7 @@ void dhcprequest (packet, ms_nulltp, ip_
|
||||
@@ -542,9 +574,7 @@
|
||||
"DHCPREQUEST for %s%s from %s %s%s%svia %s",
|
||||
piaddr (cip), smbuf,
|
||||
(packet -> raw -> htype
|
||||
@ -77,7 +76,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
: (lease
|
||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||
: "<no identifier>")),
|
||||
@@ -783,9 +813,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||
@@ -785,9 +815,7 @@
|
||||
if ((oc = lookup_option (&dhcp_universe, packet -> options,
|
||||
DHO_DHCP_REQUESTED_ADDRESS))) {
|
||||
log_info ("DHCPRELEASE from %s specified requested-address.",
|
||||
@ -88,7 +87,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
}
|
||||
|
||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
||||
@@ -877,9 +905,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||
@@ -879,9 +907,7 @@
|
||||
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
|
||||
cstr,
|
||||
(packet -> raw -> htype
|
||||
@ -99,7 +98,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
: (lease
|
||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||
: "<no identifier>")),
|
||||
@@ -984,9 +1010,7 @@ void dhcpdecline (packet, ms_nulltp)
|
||||
@@ -986,9 +1012,7 @@
|
||||
"DHCPDECLINE of %s from %s %s%s%svia %s",
|
||||
piaddr (cip),
|
||||
(packet -> raw -> htype
|
||||
@ -110,7 +109,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
: (lease
|
||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||
: "<no identifier>")),
|
||||
@@ -1683,8 +1707,7 @@ void dhcpinform (packet, ms_nulltp)
|
||||
@@ -1707,8 +1731,7 @@
|
||||
/* Report what we're sending. */
|
||||
snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip),
|
||||
(packet->raw->htype && packet->raw->hlen) ?
|
||||
@ -120,7 +119,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
"<no client hardware address>");
|
||||
log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
|
||||
packet->interface->name);
|
||||
@@ -1862,9 +1885,7 @@ void nak_lease (packet, cip, network_gro
|
||||
@@ -1886,9 +1909,7 @@
|
||||
#endif
|
||||
log_info ("DHCPNAK on %s to %s via %s",
|
||||
piaddr (*cip),
|
||||
@ -131,7 +130,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
packet -> raw -> giaddr.s_addr
|
||||
? inet_ntoa (packet -> raw -> giaddr)
|
||||
: packet -> interface -> name);
|
||||
@@ -3859,7 +3880,7 @@ void dhcp_reply (lease)
|
||||
@@ -3897,7 +3918,7 @@
|
||||
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
|
||||
: "BOOTREPLY"),
|
||||
piaddr (lease -> ip_addr),
|
||||
@ -140,7 +139,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
? print_hw_addr (lease -> hardware_addr.hbuf [0],
|
||||
lease -> hardware_addr.hlen - 1,
|
||||
&lease -> hardware_addr.hbuf [1])
|
||||
@@ -4408,10 +4429,7 @@ int find_lease (struct lease **lp,
|
||||
@@ -4450,10 +4471,7 @@
|
||||
if (uid_lease) {
|
||||
if (uid_lease->binding_state == FTS_ACTIVE) {
|
||||
log_error ("client %s has duplicate%s on %s",
|
||||
@ -152,7 +151,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||
" leases",
|
||||
(ip_lease -> subnet ->
|
||||
shared_network -> name));
|
||||
@@ -4578,9 +4596,7 @@ int find_lease (struct lease **lp,
|
||||
@@ -4620,9 +4638,7 @@
|
||||
log_error("uid lease %s for client %s is duplicate "
|
||||
"on %s",
|
||||
piaddr(uid_lease->ip_addr),
|
||||
|
@ -11,9 +11,9 @@ diff -up dhcp-4.3.4/client/dhclient.8.capability dhcp-4.3.4/client/dhclient.8
|
||||
.B -B
|
||||
]
|
||||
[
|
||||
@@ -318,6 +321,32 @@ has been added or removed, so that the c
|
||||
@@ -318,6 +321,32 @@ program can then be used to notify the c
|
||||
has been added or removed, so that the client can attempt to configure an IP
|
||||
address on that interface.
|
||||
|
||||
.TP
|
||||
+.BI \-nc
|
||||
+Do not drop capabilities.
|
||||
@ -41,9 +41,9 @@ diff -up dhcp-4.3.4/client/dhclient.8.capability dhcp-4.3.4/client/dhclient.8
|
||||
+was not compiled with libcap-ng support.
|
||||
+
|
||||
+.TP
|
||||
.BI \-B
|
||||
Set the BOOTP broadcast flag in request packets so servers will always
|
||||
broadcast replies.
|
||||
.BI \-n
|
||||
Do not configure any interfaces. This is most likely to be useful in
|
||||
combination with the
|
||||
diff -up dhcp-4.3.4/client/dhclient.c.capability dhcp-4.3.4/client/dhclient.c
|
||||
--- dhcp-4.3.4/client/dhclient.c.capability 2016-04-29 12:19:40.691129307 +0200
|
||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:21:07.620091930 +0200
|
||||
|
@ -1,136 +0,0 @@
|
||||
diff --git a/common/dns.c b/common/dns.c
|
||||
index 0f8be80..37878bc 100644
|
||||
--- a/common/dns.c
|
||||
+++ b/common/dns.c
|
||||
@@ -2132,6 +2132,41 @@ void ddns_interlude(isc_task_t *taskp,
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Moved here from omapip/isclib.c, function dhcp_context_create.
|
||||
+ * Create dnsclient only before the first use.
|
||||
+ */
|
||||
+static isc_result_t
|
||||
+dns_client_lazy() {
|
||||
+ isc_result_t result;
|
||||
+ if (dhcp_gbl_ctx.dnsclient == NULL){
|
||||
+ result = dns_client_createx2(dhcp_gbl_ctx.mctx,
|
||||
+ dhcp_gbl_ctx.actx,
|
||||
+ dhcp_gbl_ctx.taskmgr,
|
||||
+ dhcp_gbl_ctx.socketmgr,
|
||||
+ dhcp_gbl_ctx.timermgr,
|
||||
+ 0,
|
||||
+ &dhcp_gbl_ctx.dnsclient,
|
||||
+ dhcp_gbl_ctx.local4_ptr,
|
||||
+ dhcp_gbl_ctx.local6_ptr);
|
||||
+ if (result != ISC_R_SUCCESS)
|
||||
+ return result;
|
||||
+ /*
|
||||
+ * If we can't set up the servers we may not be able to
|
||||
+ * do DDNS but we should continue to try and perform
|
||||
+ * our basic functions and let the user sort it out.
|
||||
+ */
|
||||
+ result = dhcp_dns_client_setservers();
|
||||
+ if (result != ISC_R_SUCCESS) {
|
||||
+ log_error("Unable to set resolver from resolv.conf; "
|
||||
+ "startup continuing but DDNS support "
|
||||
+ "may be affected");
|
||||
+ }
|
||||
+ };
|
||||
+ return ISC_R_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* This routine does the generic work for sending a ddns message to
|
||||
* modify the forward record (A or AAAA) and calls one of a set of
|
||||
* routines to build the specific message.
|
||||
@@ -2154,6 +2189,10 @@ ddns_modify_fwd(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
|
||||
/* Get a pointer to the clientname to make things easier. */
|
||||
clientname = (unsigned char *)ddns_cb->fwd_name.data;
|
||||
|
||||
+ result = dns_client_lazy();
|
||||
+ if (result != ISC_R_SUCCESS)
|
||||
+ return result;
|
||||
+
|
||||
/* Extract and validate the type of the address. */
|
||||
if (ddns_cb->address.len == 4) {
|
||||
ddns_cb->address_type = dns_rdatatype_a;
|
||||
@@ -2359,6 +2398,10 @@ ddns_modify_ptr(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
|
||||
unsigned char buf[256];
|
||||
int buflen;
|
||||
|
||||
+ result = dns_client_lazy();
|
||||
+ if (result != ISC_R_SUCCESS)
|
||||
+ return result;
|
||||
+
|
||||
/*
|
||||
* Try to lookup the zone in the zone cache. As with the forward
|
||||
* case it's okay if we don't have one, the DNS code will try to
|
||||
diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
|
||||
index caa388a..7f2719b 100644
|
||||
--- a/includes/omapip/isclib.h
|
||||
+++ b/includes/omapip/isclib.h
|
||||
@@ -98,6 +98,8 @@ typedef struct dhcp_context {
|
||||
isc_timermgr_t *timermgr;
|
||||
#if defined (NSUPDATE)
|
||||
dns_client_t *dnsclient;
|
||||
+ isc_sockaddr_t *local4_ptr;
|
||||
+ isc_sockaddr_t *local6_ptr;
|
||||
#endif
|
||||
} dhcp_context_t;
|
||||
|
||||
diff --git a/omapip/isclib.c b/omapip/isclib.c
|
||||
index 13f0d3e..36b399d 100644
|
||||
--- a/omapip/isclib.c
|
||||
+++ b/omapip/isclib.c
|
||||
@@ -220,40 +220,22 @@ dhcp_context_create(int flags,
|
||||
}
|
||||
|
||||
#if defined (NSUPDATE)
|
||||
+ /*
|
||||
+ * Setting addresses only.
|
||||
+ * All real work will be done later on if needed to avoid listening
|
||||
+ * on ddns port if client/server was compiled with ddns support
|
||||
+ * but not using it.
|
||||
+ */
|
||||
if ((flags & DHCP_CONTEXT_POST_DB) != 0) {
|
||||
- isc_sockaddr_t localaddr4, *localaddr4_ptr = NULL;
|
||||
- isc_sockaddr_t localaddr6, *localaddr6_ptr = NULL;
|
||||
+ isc_sockaddr_t localaddr4;
|
||||
+ isc_sockaddr_t localaddr6;
|
||||
if (local4 != NULL) {
|
||||
isc_sockaddr_fromin(&localaddr4, local4, 0);
|
||||
- localaddr4_ptr = &localaddr4;
|
||||
+ dhcp_gbl_ctx.local4_ptr = &localaddr4;
|
||||
}
|
||||
if (local6 != NULL) {
|
||||
isc_sockaddr_fromin6(&localaddr6, local6, 0);
|
||||
- localaddr6_ptr = &localaddr6;
|
||||
- }
|
||||
-
|
||||
- result = dns_client_createx2(dhcp_gbl_ctx.mctx,
|
||||
- dhcp_gbl_ctx.actx,
|
||||
- dhcp_gbl_ctx.taskmgr,
|
||||
- dhcp_gbl_ctx.socketmgr,
|
||||
- dhcp_gbl_ctx.timermgr,
|
||||
- 0,
|
||||
- &dhcp_gbl_ctx.dnsclient,
|
||||
- localaddr4_ptr,
|
||||
- localaddr6_ptr);
|
||||
- if (result != ISC_R_SUCCESS)
|
||||
- goto cleanup;
|
||||
-
|
||||
- /*
|
||||
- * If we can't set up the servers we may not be able to
|
||||
- * do DDNS but we should continue to try and perform
|
||||
- * our basic functions and let the user sort it out.
|
||||
- */
|
||||
- result = dhcp_dns_client_setservers();
|
||||
- if (result != ISC_R_SUCCESS) {
|
||||
- log_error("Unable to set resolver from resolv.conf; "
|
||||
- "startup continuing but DDNS support "
|
||||
- "may be affected");
|
||||
+ dhcp_gbl_ctx.local6_ptr = &localaddr6;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -32,8 +32,8 @@ diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1734,6 +1745,7 @@ void bind_lease (client)
|
||||
"try (declined). Exiting.");
|
||||
@@ -1734,5 +1745,6 @@ void bind_lease (client)
|
||||
#endif
|
||||
exit(2);
|
||||
} else {
|
||||
+ client -> state = S_DECLINED;
|
||||
|
@ -1,6 +1,7 @@
|
||||
diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
|
||||
--- dhcp-4.3.4/client/clparse.c.options 2016-03-22 14:16:51.000000000 +0100
|
||||
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:06:13.485470579 +0200
|
||||
diff --git a/client/clparse.c b/client/clparse.c
|
||||
index 03190c3..2033427 100644
|
||||
--- a/client/clparse.c
|
||||
+++ b/client/clparse.c
|
||||
@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
|
||||
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
|
||||
*/
|
||||
@ -19,7 +20,7 @@ diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
|
||||
|
||||
void parse_client_statement (cfile, ip, config)
|
||||
struct parse *cfile;
|
||||
@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip,
|
||||
@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip, config)
|
||||
parse_lease_id_format(cfile);
|
||||
break;
|
||||
|
||||
@ -32,10 +33,11 @@ diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
|
||||
|
||||
default:
|
||||
lose = 0;
|
||||
diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
|
||||
--- dhcp-4.3.4/client/dhclient.8.options 2016-03-22 14:16:51.000000000 +0100
|
||||
+++ dhcp-4.3.4/client/dhclient.8 2016-04-29 11:59:50.446590077 +0200
|
||||
@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr
|
||||
diff --git a/client/dhclient.8 b/client/dhclient.8
|
||||
index 24f8f12..aa2238d 100644
|
||||
--- a/client/dhclient.8
|
||||
+++ b/client/dhclient.8
|
||||
@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Protocol Client
|
||||
.B -w
|
||||
]
|
||||
[
|
||||
@ -66,82 +68,13 @@ diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
|
||||
+.I timeout
|
||||
+]
|
||||
+[
|
||||
.B -v
|
||||
.B --dad-wait-time
|
||||
.I seconds
|
||||
]
|
||||
[
|
||||
@@ -289,6 +316,69 @@ not to exit when it doesn't find any suc
|
||||
program can then be used to notify the client when a network interface
|
||||
has been added or removed, so that the client can attempt to configure an IP
|
||||
address on that interface.
|
||||
+
|
||||
+.TP
|
||||
+.BI \-B
|
||||
+Set the BOOTP broadcast flag in request packets so servers will always
|
||||
+broadcast replies.
|
||||
+
|
||||
+.TP
|
||||
+.BI \-C\ <dhcp-client-identifier>
|
||||
+Specify the dhcp-client-identifier option to send to the DHCP server.
|
||||
+
|
||||
+.TP
|
||||
+.BI \-H\ <host-name>
|
||||
+Specify the host-name option to send to the DHCP server. The host-name
|
||||
+string only contains the client's hostname prefix, to which the server will
|
||||
+append the ddns-domainname or domain-name options, if any, to derive the
|
||||
+fully qualified domain name of the client. The
|
||||
+.B -H
|
||||
+option cannot be used with the
|
||||
+.B -F
|
||||
+option.
|
||||
+
|
||||
+.TP
|
||||
+.BI \-F\ <fqdn.fqdn>
|
||||
+Specify the fqdn.fqdn option to send to the DHCP server. This option cannot
|
||||
+be used with the
|
||||
+.B -H
|
||||
+option. The fqdn.fqdn option must specify the complete domain name of the
|
||||
+client host, which the server may use for dynamic DNS updates.
|
||||
+
|
||||
+.TP
|
||||
+.BI \-V\ <vendor-class-identifier>
|
||||
+Specify the vendor-class-identifier option to send to the DHCP server.
|
||||
+
|
||||
+.TP
|
||||
+.BI \--request-options\ <option>[,<option>...]
|
||||
+Specify the list of options the client is to request from the server. The
|
||||
+option list must be a single string consisting of option names separated
|
||||
+by at least one command and optional space characters. The default option
|
||||
+list is:
|
||||
+
|
||||
+.BR
|
||||
+ subnet-mask, broadcast-address, time-offset, routers,
|
||||
+.BR
|
||||
+ domain-search, domain-name, domain-name-servers, host-name,
|
||||
+.BR
|
||||
+ nis-domain, nis-servers, ntp-servers, interface-mtu
|
||||
+
|
||||
+.TP
|
||||
+.B --request-options
|
||||
+option does not append options to the default request, it overrides the
|
||||
+default request list. Keep this in mind if you want to request an
|
||||
+additional option besides the default request list. You will have to
|
||||
+specify all option names for the
|
||||
+.B --request-options
|
||||
+parameter.
|
||||
+
|
||||
+.TP
|
||||
+.BI \--timeout\ <timeout>
|
||||
+Specify the time after which
|
||||
+.B dhclient
|
||||
+will decide that no DHCP servers can be contacted when no responses have been
|
||||
+received.
|
||||
+
|
||||
.TP
|
||||
.BI \-n
|
||||
Do not configure any interfaces. This is most likely to be useful in
|
||||
diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
--- dhcp-4.3.4/client/dhclient.c.options 2016-03-22 14:16:51.000000000 +0100
|
||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:12:14.182364093 +0200
|
||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||
index dcf3f1a..270a960 100644
|
||||
--- a/client/dhclient.c
|
||||
+++ b/client/dhclient.c
|
||||
@@ -40,6 +40,12 @@
|
||||
#include <isc/file.h>
|
||||
#include <dns/result.h>
|
||||
@ -155,7 +88,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
TIME default_lease_time = 43200; /* 12 hours... */
|
||||
TIME max_lease_time = 86400; /* 24 hours... */
|
||||
|
||||
@@ -100,6 +106,10 @@ char *mockup_relay = NULL;
|
||||
@@ -101,6 +107,10 @@ char *mockup_relay = NULL;
|
||||
|
||||
char *progname = NULL;
|
||||
|
||||
@ -166,7 +99,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
void run_stateless(int exit_mode, u_int16_t port);
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
@@ -177,7 +187,11 @@ usage(const char *sfmt, const char *sarg
|
||||
@@ -179,7 +189,11 @@ usage(const char *sfmt, const char *sarg)
|
||||
" [-s server-addr] [-cf config-file]\n"
|
||||
" [-df duid-file] [-lf lease-file]\n"
|
||||
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
||||
@ -179,7 +112,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
isc_file_basename(progname));
|
||||
}
|
||||
|
||||
@@ -214,6 +228,16 @@ main(int argc, char **argv) {
|
||||
@@ -216,6 +230,16 @@ main(int argc, char **argv) {
|
||||
progname = argv[0];
|
||||
#endif
|
||||
|
||||
@ -196,7 +129,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
/* Initialize client globals. */
|
||||
memset(&default_duid, 0, sizeof(default_duid));
|
||||
|
||||
@@ -431,6 +455,88 @@ main(int argc, char **argv) {
|
||||
@@ -442,6 +466,88 @@ main(int argc, char **argv) {
|
||||
strlen(PACKAGE_VERSION)));
|
||||
IGNORE_RET(write(STDERR_FILENO, "\n", 1));
|
||||
exit(0);
|
||||
@ -285,7 +218,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
} else if (argv[i][0] == '-') {
|
||||
usage("Unknown command: %s", argv[i]);
|
||||
} else if (interfaces_requested < 0) {
|
||||
@@ -630,6 +736,156 @@ main(int argc, char **argv) {
|
||||
@@ -641,6 +747,156 @@ main(int argc, char **argv) {
|
||||
/* Parse the dhclient.conf file. */
|
||||
read_client_conf();
|
||||
|
||||
@ -442,7 +375,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
/* Parse the lease database. */
|
||||
read_client_leases();
|
||||
|
||||
@@ -3067,7 +3323,8 @@ void make_discover (client, lease)
|
||||
@@ -3092,7 +3348,8 @@ void make_discover (client, lease)
|
||||
client -> packet.xid = random ();
|
||||
client -> packet.secs = 0; /* filled in by send_discover. */
|
||||
|
||||
@ -452,7 +385,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
@@ -3152,7 +3409,9 @@ void make_request (client, lease)
|
||||
@@ -3177,7 +3434,9 @@ void make_request (client, lease)
|
||||
} else {
|
||||
memset (&client -> packet.ciaddr, 0,
|
||||
sizeof client -> packet.ciaddr);
|
||||
@ -463,7 +396,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
@@ -3215,7 +3474,8 @@ void make_decline (client, lease)
|
||||
@@ -3240,7 +3499,8 @@ void make_decline (client, lease)
|
||||
client -> packet.hops = 0;
|
||||
client -> packet.xid = client -> xid;
|
||||
client -> packet.secs = 0; /* Filled in by send_request. */
|
||||
@ -473,10 +406,11 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||
client -> packet.flags = 0;
|
||||
else
|
||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||
diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
|
||||
--- dhcp-4.3.4/common/conflex.c.options 2016-04-29 11:59:50.448590077 +0200
|
||||
+++ dhcp-4.3.4/common/conflex.c 2016-04-29 12:13:23.637342420 +0200
|
||||
@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
|
||||
diff --git a/common/conflex.c b/common/conflex.c
|
||||
index fe994ac..bdb4a52 100644
|
||||
--- a/common/conflex.c
|
||||
+++ b/common/conflex.c
|
||||
@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv) {
|
||||
if (!strcasecmp(atom+1, "ig-endian")) {
|
||||
return TOKEN_BIG_ENDIAN;
|
||||
}
|
||||
@ -485,10 +419,11 @@ diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
|
||||
break;
|
||||
case 'c':
|
||||
if (!strcasecmp(atom + 1, "ase"))
|
||||
diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
|
||||
--- dhcp-4.3.4/includes/dhcpd.h.options 2016-04-29 11:59:50.448590077 +0200
|
||||
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:14:05.361329401 +0200
|
||||
@@ -1246,6 +1246,9 @@ struct client_config {
|
||||
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||
index eab09a6..cfdac23 100644
|
||||
--- a/includes/dhcpd.h
|
||||
+++ b/includes/dhcpd.h
|
||||
@@ -1251,6 +1251,9 @@ struct client_config {
|
||||
|
||||
int lease_id_format; /* format for IDs in lease file,
|
||||
TOKEN_OCTAL or TOKEN_HEX */
|
||||
@ -498,9 +433,10 @@ diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
|
||||
};
|
||||
|
||||
/* Per-interface state used in the dhcp client... */
|
||||
diff -up dhcp-4.3.4/includes/dhctoken.h.options dhcp-4.3.4/includes/dhctoken.h
|
||||
--- dhcp-4.3.4/includes/dhctoken.h.options 2016-04-29 11:59:50.449590076 +0200
|
||||
+++ dhcp-4.3.4/includes/dhctoken.h 2016-04-29 12:15:03.073300846 +0200
|
||||
diff --git a/includes/dhctoken.h b/includes/dhctoken.h
|
||||
index 15bbd1c..b312e7a 100644
|
||||
--- a/includes/dhctoken.h
|
||||
+++ b/includes/dhctoken.h
|
||||
@@ -373,7 +373,8 @@ enum dhcp_token {
|
||||
TOKEN_BIG_ENDIAN = 675,
|
||||
LEASE_ID_FORMAT = 676,
|
||||
|
@ -51,7 +51,7 @@ diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
|
||||
- log_error ("than a configuration issue please read the section on submitting");
|
||||
- log_error ("bugs on either our web page at www.isc.org or in the README file");
|
||||
- log_error ("before submitting a bug. These pages explain the proper");
|
||||
- log_error ("process and the information we find helpful for debugging..");
|
||||
- log_error ("process and the information we find helpful for debugging.");
|
||||
+ log_error ("This version of ISC DHCP is based on the release available");
|
||||
+ log_error ("on ftp.isc.org. Features have been added and other changes");
|
||||
+ log_error ("have been made to the base software release in order to make");
|
||||
|
@ -1,429 +0,0 @@
|
||||
diff -up dhcp-4.3.5b1/common/discover.c.getifaddrs dhcp-4.3.5b1/common/discover.c
|
||||
--- dhcp-4.3.5b1/common/discover.c.getifaddrs 2016-09-12 17:10:39.585374741 +0200
|
||||
+++ dhcp-4.3.5b1/common/discover.c 2016-09-12 17:15:56.160628636 +0200
|
||||
@@ -373,392 +373,13 @@ end_iface_scan(struct iface_conf_list *i
|
||||
ifaces->sock = -1;
|
||||
}
|
||||
|
||||
-#elif __linux /* !HAVE_SIOCGLIFCONF */
|
||||
-/*
|
||||
- * Linux support
|
||||
- * -------------
|
||||
- *
|
||||
- * In Linux, we use the /proc pseudo-filesystem to get information
|
||||
- * about interfaces, along with selected ioctl() calls.
|
||||
- *
|
||||
- * Linux low level access is documented in the netdevice man page.
|
||||
- */
|
||||
-
|
||||
-/*
|
||||
- * Structure holding state about the scan.
|
||||
- */
|
||||
-struct iface_conf_list {
|
||||
- int sock; /* file descriptor used to get information */
|
||||
- FILE *fp; /* input from /proc/net/dev */
|
||||
-#ifdef DHCPv6
|
||||
- FILE *fp6; /* input from /proc/net/if_inet6 */
|
||||
-#endif
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
- * Structure used to return information about a specific interface.
|
||||
- */
|
||||
-struct iface_info {
|
||||
- char name[IFNAMSIZ]; /* name of the interface, e.g. "eth0" */
|
||||
- struct sockaddr_storage addr; /* address information */
|
||||
- isc_uint64_t flags; /* interface flags, e.g. IFF_LOOPBACK */
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
- * Start a scan of interfaces.
|
||||
- *
|
||||
- * The iface_conf_list structure maintains state for this process.
|
||||
- */
|
||||
-int
|
||||
-begin_iface_scan(struct iface_conf_list *ifaces) {
|
||||
- char buf[IF_LINE_LENGTH];
|
||||
- int len;
|
||||
- int i;
|
||||
-
|
||||
- ifaces->fp = fopen("/proc/net/dev", "r");
|
||||
- if (ifaces->fp == NULL) {
|
||||
- log_error("Error opening '/proc/net/dev' to list interfaces");
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * The first 2 lines are header information, so read and ignore them.
|
||||
- */
|
||||
- for (i=0; i<2; i++) {
|
||||
- if (fgets(buf, sizeof(buf), ifaces->fp) == NULL) {
|
||||
- log_error("Error reading headers from '/proc/net/dev'");
|
||||
- fclose(ifaces->fp);
|
||||
- ifaces->fp = NULL;
|
||||
- return 0;
|
||||
- }
|
||||
- len = strlen(buf);
|
||||
- if ((len <= 0) || (buf[len-1] != '\n')) {
|
||||
- log_error("Bad header line in '/proc/net/dev'");
|
||||
- fclose(ifaces->fp);
|
||||
- ifaces->fp = NULL;
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ifaces->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
- if (ifaces->sock < 0) {
|
||||
- log_error("Error creating socket to list interfaces; %m");
|
||||
- fclose(ifaces->fp);
|
||||
- ifaces->fp = NULL;
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
-#ifdef DHCPv6
|
||||
- if (local_family == AF_INET6) {
|
||||
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
|
||||
- if (ifaces->fp6 == NULL) {
|
||||
- log_error("Error opening '/proc/net/if_inet6' to "
|
||||
- "list IPv6 interfaces; %m");
|
||||
- close(ifaces->sock);
|
||||
- ifaces->sock = -1;
|
||||
- fclose(ifaces->fp);
|
||||
- ifaces->fp = NULL;
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * Read our IPv4 interfaces from /proc/net/dev.
|
||||
- *
|
||||
- * The file looks something like this:
|
||||
- *
|
||||
- * Inter-| Receive ...
|
||||
- * face |bytes packets errs drop fifo frame ...
|
||||
- * lo: 1580562 4207 0 0 0 0 ...
|
||||
- * eth0: 0 0 0 0 0 0 ...
|
||||
- * eth1:1801552440 37895 0 14 0 ...
|
||||
- *
|
||||
- * We only care about the interface name, which is at the start of
|
||||
- * each line.
|
||||
- *
|
||||
- * We use an ioctl() to get the address and flags for each interface.
|
||||
- */
|
||||
-static int
|
||||
-next_iface4(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
- char buf[IF_LINE_LENGTH];
|
||||
- int len;
|
||||
- char *p;
|
||||
- char *name;
|
||||
- struct ifreq tmp;
|
||||
-
|
||||
- /*
|
||||
- * Loop exits when we find an interface that has an address, or
|
||||
- * when we run out of interfaces.
|
||||
- */
|
||||
- for (;;) {
|
||||
- do {
|
||||
- /*
|
||||
- * Read the next line in the file.
|
||||
- */
|
||||
- if (fgets(buf, sizeof(buf), ifaces->fp) == NULL) {
|
||||
- if (ferror(ifaces->fp)) {
|
||||
- *err = 1;
|
||||
- log_error("Error reading interface "
|
||||
- "information");
|
||||
- } else {
|
||||
- *err = 0;
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Make sure the line is a nice,
|
||||
- * newline-terminated line.
|
||||
- */
|
||||
- len = strlen(buf);
|
||||
- if ((len <= 0) || (buf[len-1] != '\n')) {
|
||||
- log_error("Bad line reading interface "
|
||||
- "information");
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Figure out our name.
|
||||
- */
|
||||
- p = strrchr(buf, ':');
|
||||
- if (p == NULL) {
|
||||
- log_error("Bad line reading interface "
|
||||
- "information (no colon)");
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
- *p = '\0';
|
||||
- name = buf;
|
||||
- while (isspace(*name)) {
|
||||
- name++;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Copy our name into our interface structure.
|
||||
- */
|
||||
- len = p - name;
|
||||
- if (len >= sizeof(info->name)) {
|
||||
- *err = 1;
|
||||
- log_error("Interface name '%s' too long", name);
|
||||
- return 0;
|
||||
- }
|
||||
- strncpy(info->name, name, sizeof(info->name) - 1);
|
||||
-
|
||||
-#ifdef ALIAS_NAMED_PERMUTED
|
||||
- /* interface aliases look like "eth0:1" or "wlan1:3" */
|
||||
- s = strchr(info->name, ':');
|
||||
- if (s != NULL) {
|
||||
- *s = '\0';
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#ifdef SKIP_DUMMY_INTERFACES
|
||||
- } while (strncmp(info->name, "dummy", 5) == 0);
|
||||
-#else
|
||||
- } while (0);
|
||||
-#endif
|
||||
-
|
||||
- memset(&tmp, 0, sizeof(tmp));
|
||||
- strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
|
||||
- if (ioctl(ifaces->sock, SIOCGIFADDR, &tmp) < 0) {
|
||||
- if (errno == EADDRNOTAVAIL) {
|
||||
- continue;
|
||||
- }
|
||||
- log_error("Error getting interface address "
|
||||
- "for '%s'; %m", name);
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
- memcpy(&info->addr, &tmp.ifr_addr, sizeof(tmp.ifr_addr));
|
||||
-
|
||||
- memset(&tmp, 0, sizeof(tmp));
|
||||
- strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
|
||||
- if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
|
||||
- log_error("Error getting interface flags for '%s'; %m",
|
||||
- name);
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
- info->flags = tmp.ifr_flags;
|
||||
-
|
||||
- *err = 0;
|
||||
- return 1;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-#ifdef DHCPv6
|
||||
-/*
|
||||
- * Read our IPv6 interfaces from /proc/net/if_inet6.
|
||||
- *
|
||||
- * The file looks something like this:
|
||||
- *
|
||||
- * fe80000000000000025056fffec00008 05 40 20 80 vmnet8
|
||||
- * 00000000000000000000000000000001 01 80 10 80 lo
|
||||
- * fe80000000000000025056fffec00001 06 40 20 80 vmnet1
|
||||
- * 200108881936000202166ffffe497d9b 03 40 00 00 eth1
|
||||
- * fe8000000000000002166ffffe497d9b 03 40 20 80 eth1
|
||||
- *
|
||||
- * We get IPv6 address from the start, the interface name from the end,
|
||||
- * and ioctl() to get flags.
|
||||
- */
|
||||
-static int
|
||||
-next_iface6(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
- char buf[IF_LINE_LENGTH];
|
||||
- int len;
|
||||
- char *p;
|
||||
- char *name;
|
||||
- int i;
|
||||
- struct sockaddr_in6 addr;
|
||||
- struct ifreq tmp;
|
||||
-
|
||||
- do {
|
||||
- /*
|
||||
- * Read the next line in the file.
|
||||
- */
|
||||
- if (fgets(buf, sizeof(buf), ifaces->fp6) == NULL) {
|
||||
- if (ferror(ifaces->fp6)) {
|
||||
- *err = 1;
|
||||
- log_error("Error reading IPv6 "
|
||||
- "interface information");
|
||||
- } else {
|
||||
- *err = 0;
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Make sure the line is a nice, newline-terminated line.
|
||||
- */
|
||||
- len = strlen(buf);
|
||||
- if ((len <= 0) || (buf[len-1] != '\n')) {
|
||||
- log_error("Bad line reading IPv6 "
|
||||
- "interface information");
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Figure out our name.
|
||||
- */
|
||||
- buf[--len] = '\0';
|
||||
- p = strrchr(buf, ' ');
|
||||
- if (p == NULL) {
|
||||
- log_error("Bad line reading IPv6 interface "
|
||||
- "information (no space)");
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
- name = p+1;
|
||||
-
|
||||
- /*
|
||||
- * Copy our name into our interface structure.
|
||||
- */
|
||||
- len = strlen(name);
|
||||
- if (len >= sizeof(info->name)) {
|
||||
- *err = 1;
|
||||
- log_error("IPv6 interface name '%s' too long", name);
|
||||
- return 0;
|
||||
- }
|
||||
- strncpy(info->name, name, sizeof(info->name) - 1);
|
||||
-
|
||||
-#ifdef SKIP_DUMMY_INTERFACES
|
||||
- } while (strncmp(info->name, "dummy", 5) == 0);
|
||||
-#else
|
||||
- } while (0);
|
||||
-#endif
|
||||
-
|
||||
- /*
|
||||
- * Double-check we start with the IPv6 address.
|
||||
- */
|
||||
- for (i=0; i<32; i++) {
|
||||
- if (!isxdigit(buf[i]) || isupper(buf[i])) {
|
||||
- *err = 1;
|
||||
- log_error("Bad line reading IPv6 interface address "
|
||||
- "for '%s'", name);
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Load our socket structure.
|
||||
- */
|
||||
- memset(&addr, 0, sizeof(addr));
|
||||
- addr.sin6_family = AF_INET6;
|
||||
- for (i=0; i<16; i++) {
|
||||
- unsigned char byte;
|
||||
- static const char hex[] = "0123456789abcdef";
|
||||
- byte = ((index(hex, buf[i * 2]) - hex) << 4) |
|
||||
- (index(hex, buf[i * 2 + 1]) - hex);
|
||||
- addr.sin6_addr.s6_addr[i] = byte;
|
||||
- }
|
||||
- memcpy(&info->addr, &addr, sizeof(addr));
|
||||
-
|
||||
- /*
|
||||
- * Get our flags.
|
||||
- */
|
||||
- memset(&tmp, 0, sizeof(tmp));
|
||||
- strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
|
||||
- if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
|
||||
- log_error("Error getting interface flags for '%s'; %m", name);
|
||||
- *err = 1;
|
||||
- return 0;
|
||||
- }
|
||||
- info->flags = tmp.ifr_flags;
|
||||
-
|
||||
- *err = 0;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* DHCPv6 */
|
||||
-
|
||||
-/*
|
||||
- * Retrieve the next interface.
|
||||
- *
|
||||
- * Returns information in the info structure.
|
||||
- * Sets err to 1 if there is an error, otherwise 0.
|
||||
- */
|
||||
-int
|
||||
-next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
- memset(info, 0, sizeof(struct iface_info));
|
||||
- if (next_iface4(info, err, ifaces)) {
|
||||
- return 1;
|
||||
- }
|
||||
-#ifdef DHCPv6
|
||||
- if (!(*err)) {
|
||||
- if (local_family == AF_INET6)
|
||||
- return next_iface6(info, err, ifaces);
|
||||
- }
|
||||
-#endif
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * End scan of interfaces.
|
||||
- */
|
||||
-void
|
||||
-end_iface_scan(struct iface_conf_list *ifaces) {
|
||||
- fclose(ifaces->fp);
|
||||
- ifaces->fp = NULL;
|
||||
- close(ifaces->sock);
|
||||
- ifaces->sock = -1;
|
||||
-#ifdef DHCPv6
|
||||
- if (local_family == AF_INET6) {
|
||||
- fclose(ifaces->fp6);
|
||||
- ifaces->fp6 = NULL;
|
||||
- }
|
||||
-#endif
|
||||
-}
|
||||
#else
|
||||
|
||||
/*
|
||||
* BSD support
|
||||
* -----------
|
||||
*
|
||||
- * FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs()
|
||||
+ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
|
||||
* function.
|
||||
*
|
||||
* The getifaddrs() man page describes the use.
|
||||
@@ -806,6 +427,8 @@ begin_iface_scan(struct iface_conf_list
|
||||
*/
|
||||
int
|
||||
next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
|
||||
+ size_t sa_len = 0;
|
||||
+
|
||||
if (ifaces->next == NULL) {
|
||||
*err = 0;
|
||||
return 0;
|
||||
@@ -818,8 +441,20 @@ next_iface(struct iface_info *info, int
|
||||
}
|
||||
memset(info, 0, sizeof(struct iface_info));
|
||||
strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
|
||||
- memcpy(&info->addr, ifaces->next->ifa_addr,
|
||||
- ifaces->next->ifa_addr->sa_len);
|
||||
+
|
||||
+ memset(&info->addr, 0 , sizeof(info->addr));
|
||||
+
|
||||
+ if (ifaces->next->ifa_addr != NULL) {
|
||||
+#ifdef HAVE_SA_LEN
|
||||
+ sa_len = ifaces->next->ifa_addr->sa_len;
|
||||
+#else
|
||||
+ if (ifaces->next->ifa_addr->sa_family == AF_INET)
|
||||
+ sa_len = sizeof(struct sockaddr_in);
|
||||
+ else if (ifaces->next->ifa_addr->sa_family == AF_INET6)
|
||||
+ sa_len = sizeof(struct sockaddr_in6);
|
||||
+#endif
|
||||
+ memcpy(&info->addr, ifaces->next->ifa_addr, sa_len);
|
||||
+ }
|
||||
info->flags = ifaces->next->ifa_flags;
|
||||
ifaces->next = ifaces->next->ifa_next;
|
||||
*err = 0;
|
@ -1,72 +0,0 @@
|
||||
diff -up dhcp-4.3.0a1/client/dhclient.c.gpxe-cid dhcp-4.3.0a1/client/dhclient.c
|
||||
--- dhcp-4.3.0a1/client/dhclient.c.gpxe-cid 2013-12-20 13:28:45.105048317 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-20 13:28:45.109048261 +0100
|
||||
@@ -58,6 +58,13 @@ const char *path_dhclient_pid = NULL;
|
||||
static char path_dhclient_script_array[] = _PATH_DHCLIENT_SCRIPT;
|
||||
char *path_dhclient_script = path_dhclient_script_array;
|
||||
|
||||
+/* Default Prefix */
|
||||
+static unsigned char default_prefix[12] = {
|
||||
+ 0xff, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x02, 0x00,
|
||||
+ 0x00, 0x02, 0xc9, 0x00
|
||||
+};
|
||||
+
|
||||
/* False (default) => we write and use a pid file */
|
||||
isc_boolean_t no_pid_file = ISC_FALSE;
|
||||
|
||||
@@ -1253,6 +1260,12 @@ int find_subnet (struct subnet **sp,
|
||||
static void setup_ib_interface(struct interface_info *ip)
|
||||
{
|
||||
struct group *g;
|
||||
+ struct hardware *hw = &ip->hw_address;
|
||||
+ char client_id[64];
|
||||
+ char *arg_conf = NULL;
|
||||
+ int arg_conf_len = 0;
|
||||
+ isc_result_t status;
|
||||
+ struct parse *cfile = (struct parse *)0;
|
||||
|
||||
/* Set the broadcast flag */
|
||||
ip->client->config->bootp_broadcast_always = 1;
|
||||
@@ -1269,8 +1282,39 @@ static void setup_ib_interface(struct in
|
||||
}
|
||||
}
|
||||
|
||||
- /* No client ID specified */
|
||||
- log_fatal("dhcp-client-identifier must be specified for InfiniBand");
|
||||
+ /*
|
||||
+ * No client ID specified, make up one based on a default
|
||||
+ * "prefix" and the port GUID.
|
||||
+ *
|
||||
+ * NOTE: This is compatible with what gpxe does.
|
||||
+ */
|
||||
+ sprintf(client_id, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
|
||||
+ default_prefix[0], default_prefix[1], default_prefix[2],
|
||||
+ default_prefix[3], default_prefix[4], default_prefix[5],
|
||||
+ default_prefix[6], default_prefix[7], default_prefix[8],
|
||||
+ default_prefix[9], default_prefix[10], default_prefix[11],
|
||||
+ hw->hbuf[1], hw->hbuf[2], hw->hbuf[3], hw->hbuf[4],
|
||||
+ hw->hbuf[5], hw->hbuf[6], hw->hbuf[7], hw->hbuf[8]);
|
||||
+
|
||||
+ arg_conf_len = asprintf(&arg_conf,
|
||||
+ "send dhcp-client-identifier %s;",
|
||||
+ client_id);
|
||||
+
|
||||
+ if ((arg_conf == 0) || (arg_conf_len <= 0))
|
||||
+ log_fatal("Unable to send option dhcp-client-identifier");
|
||||
+
|
||||
+ status = new_parse(&cfile, -1, arg_conf, arg_conf_len,
|
||||
+ "Automatic Infiniband client identifier", 0);
|
||||
+
|
||||
+ if ((status != ISC_R_SUCCESS) || (cfile->warnings_occurred))
|
||||
+ log_fatal("Failed to parse Infiniband client identifier");
|
||||
+
|
||||
+ parse_client_statement(cfile, NULL, ip->client->config);
|
||||
+
|
||||
+ if (cfile->warnings_occurred)
|
||||
+ log_fatal("Failed to parse Infiniband client identifier");
|
||||
+
|
||||
+ end_parse(&cfile);
|
||||
}
|
||||
|
||||
/* Individual States:
|
@ -1,25 +0,0 @@
|
||||
diff -up dhcp-4.3.0a1/common/dispatch.c.interval dhcp-4.3.0a1/common/dispatch.c
|
||||
--- dhcp-4.3.0a1/common/dispatch.c.interval 2013-12-20 13:51:14.385260622 +0100
|
||||
+++ dhcp-4.3.0a1/common/dispatch.c 2013-12-20 13:51:14.493259116 +0100
|
||||
@@ -343,7 +343,20 @@ void add_timeout (when, where, what, ref
|
||||
q->next = timeouts;
|
||||
timeouts = q;
|
||||
|
||||
- isc_interval_set(&interval, sec & DHCP_SEC_MAX, usec * 1000);
|
||||
+ /* isc_time_nowplusinterval() is not safe with 64-bit time_t and will
|
||||
+ * return an error for sufficiently large intervals. We have to limit
|
||||
+ * the interval to INT_MAX or less to ensure the interval doesn't
|
||||
+ * overflow 32 bits, since the returned isc_time_t fields are
|
||||
+ * 32-bit unsigned ints.
|
||||
+ *
|
||||
+ * HACK: The 9 is a magic number of seconds, since some time may have
|
||||
+ * gone by since the last call to gettimeofday() and the one in
|
||||
+ * isc_time_nowplusinterval().
|
||||
+ */
|
||||
+ if (sec > TIME_MAX)
|
||||
+ sec = TIME_MAX - 9;
|
||||
+
|
||||
+ isc_interval_set(&interval, sec, usec * 1000);
|
||||
status = isc_time_nowplusinterval(&expires, &interval);
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
/*
|
@ -1,825 +0,0 @@
|
||||
diff -up dhcp-4.3.3b1/configure.ac.systemtap dhcp-4.3.3b1/configure.ac
|
||||
--- dhcp-4.3.3b1/configure.ac.systemtap 2015-08-10 11:46:08.876892296 +0200
|
||||
+++ dhcp-4.3.3b1/configure.ac 2015-08-10 11:46:08.913892156 +0200
|
||||
@@ -574,6 +574,35 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
+AC_MSG_CHECKING([whether to include systemtap tracing support])
|
||||
+AC_ARG_ENABLE([systemtap],
|
||||
+ [AS_HELP_STRING([--enable-systemtap],
|
||||
+ [Enable inclusion of systemtap trace support])],
|
||||
+ [ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no'])
|
||||
+AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes])
|
||||
+AC_MSG_RESULT(${ENABLE_SYSTEMTAP})
|
||||
+
|
||||
+if test "x${ENABLE_SYSTEMTAP}" = xyes; then
|
||||
+ # Additional configuration for --enable-systemtap is HERE
|
||||
+ AC_CHECK_PROGS(DTRACE, dtrace)
|
||||
+ if test -z "$DTRACE"; then
|
||||
+ AC_MSG_ERROR([dtrace not found])
|
||||
+ fi
|
||||
+ AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
|
||||
+ [SDT_H_FOUND='no';
|
||||
+ AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
|
||||
+ AC_DEFINE([HAVE_SYSTEMTAP], [1], [Define to 1 if using SystemTap probes.])
|
||||
+ AC_ARG_WITH([tapset-install-dir],
|
||||
+ [AS_HELP_STRING([--with-tapset-install-dir],
|
||||
+ [The absolute path where the tapset dir will be installed])],
|
||||
+ [if test "x${withval}" = x; then
|
||||
+ ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"
|
||||
+ else
|
||||
+ ABS_TAPSET_DIR="${withval}"
|
||||
+ fi], [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"])
|
||||
+ AC_SUBST(ABS_TAPSET_DIR)
|
||||
+fi
|
||||
+
|
||||
# Solaris needs some libraries for functions
|
||||
AC_SEARCH_LIBS(socket, [socket])
|
||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
||||
@@ -778,6 +807,7 @@ AC_CONFIG_FILES([
|
||||
tests/unittest.sh
|
||||
server/tests/Makefile
|
||||
doc/devel/doxyfile
|
||||
+ tapset/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
diff -up dhcp-4.3.3b1/Makefile.am.systemtap dhcp-4.3.3b1/Makefile.am
|
||||
--- dhcp-4.3.3b1/Makefile.am.systemtap 2015-08-10 11:46:08.827892482 +0200
|
||||
+++ dhcp-4.3.3b1/Makefile.am 2015-08-10 11:46:08.914892153 +0200
|
||||
@@ -33,5 +33,8 @@ endif
|
||||
|
||||
SUBDIRS += includes tests common omapip client dhcpctl relay server
|
||||
|
||||
+SUBDIRS += tapset
|
||||
+#DIST_SUBDIRS = $(SUBDIRS)
|
||||
+
|
||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||
|
||||
diff -up dhcp-4.3.3b1/server/dhcp.c.systemtap dhcp-4.3.3b1/server/dhcp.c
|
||||
--- dhcp-4.3.3b1/server/dhcp.c.systemtap 2015-08-10 11:46:08.905892186 +0200
|
||||
+++ dhcp-4.3.3b1/server/dhcp.c 2015-08-10 11:47:15.969638417 +0200
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <limits.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
+#include "trace.h"
|
||||
+
|
||||
static void maybe_return_agent_options(struct packet *packet,
|
||||
struct option_state *options);
|
||||
static int reuse_lease (struct packet* packet, struct lease* new_lease,
|
||||
@@ -311,6 +313,8 @@ void dhcpdiscover (packet, ms_nulltp)
|
||||
dhcp_failover_state_t *peer;
|
||||
#endif
|
||||
|
||||
+ TRACE(DHCPD_DISCOVER_START());
|
||||
+
|
||||
find_lease (&lease, packet, packet -> shared_network,
|
||||
0, &peer_has_leases, (struct lease *)0, MDL);
|
||||
|
||||
@@ -433,6 +437,8 @@ void dhcpdiscover (packet, ms_nulltp)
|
||||
out:
|
||||
if (lease)
|
||||
lease_dereference (&lease, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_DISCOVER_DONE());
|
||||
}
|
||||
|
||||
void dhcprequest (packet, ms_nulltp, ip_lease)
|
||||
@@ -455,6 +461,8 @@ void dhcprequest (packet, ms_nulltp, ip_
|
||||
#endif
|
||||
int have_requested_addr = 0;
|
||||
|
||||
+ TRACE(DHCPD_REQUEST_START());
|
||||
+
|
||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
||||
DHO_DHCP_REQUESTED_ADDRESS);
|
||||
memset (&data, 0, sizeof data);
|
||||
@@ -734,6 +742,9 @@ void dhcprequest (packet, ms_nulltp, ip_
|
||||
log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
|
||||
|
||||
out:
|
||||
+
|
||||
+ TRACE(DHCPD_REQUEST_DONE());
|
||||
+
|
||||
if (subnet)
|
||||
subnet_dereference (&subnet, MDL);
|
||||
if (lease)
|
||||
@@ -752,6 +763,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||
const char *s;
|
||||
char msgbuf [1024], cstr[16]; /* XXX */
|
||||
|
||||
+ TRACE(DHCPD_RELEASE_START());
|
||||
|
||||
/* DHCPRELEASE must not specify address in requested-address
|
||||
option, but old protocol specs weren't explicit about this,
|
||||
@@ -872,6 +884,8 @@ void dhcprelease (packet, ms_nulltp)
|
||||
#endif
|
||||
if (lease)
|
||||
lease_dereference (&lease, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_RELEASE_DONE());
|
||||
}
|
||||
|
||||
void dhcpdecline (packet, ms_nulltp)
|
||||
@@ -889,6 +903,8 @@ void dhcpdecline (packet, ms_nulltp)
|
||||
struct option_cache *oc;
|
||||
struct data_string data;
|
||||
|
||||
+ TRACE(DHCPD_DECLINE_START());
|
||||
+
|
||||
/* DHCPDECLINE must specify address. */
|
||||
if (!(oc = lookup_option (&dhcp_universe, packet -> options,
|
||||
DHO_DHCP_REQUESTED_ADDRESS)))
|
||||
@@ -995,6 +1011,8 @@ void dhcpdecline (packet, ms_nulltp)
|
||||
option_state_dereference (&options, MDL);
|
||||
if (lease)
|
||||
lease_dereference (&lease, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_DECLINE_DONE());
|
||||
}
|
||||
|
||||
void dhcpinform (packet, ms_nulltp)
|
||||
@@ -1022,6 +1040,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
int h_w_fixed_addr = 0;
|
||||
#endif
|
||||
|
||||
+ 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. */
|
||||
@@ -1592,6 +1612,8 @@ void dhcpinform (packet, ms_nulltp)
|
||||
|
||||
if (subnet)
|
||||
subnet_dereference (&subnet, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_INFORM_DONE());
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1622,6 +1644,8 @@ void nak_lease (packet, cip, network_gro
|
||||
struct option_cache *oc = (struct option_cache *)0;
|
||||
struct option_state *eval_options = NULL;
|
||||
|
||||
+ TRACE(DHCPD_NAK_LEASE_START());
|
||||
+
|
||||
option_state_allocate (&options, MDL);
|
||||
memset (&outgoing, 0, sizeof outgoing);
|
||||
memset (&raw, 0, sizeof raw);
|
||||
@@ -1795,7 +1819,8 @@ void nak_lease (packet, cip, network_gro
|
||||
"interface.", MDL, outgoing.packet_length,
|
||||
packet->interface->name);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ TRACE(DHCPD_NAK_LEASE_DONE());
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -2000,6 +2025,8 @@ void ack_lease (packet, lease, offer, wh
|
||||
if (lease -> state)
|
||||
return;
|
||||
|
||||
+ TRACE(DHCPD_ACK_LEASE_START());
|
||||
+
|
||||
/* Save original cltt for comparison later. */
|
||||
lease_cltt = lease->cltt;
|
||||
|
||||
@@ -3392,6 +3419,7 @@ void ack_lease (packet, lease, offer, wh
|
||||
#endif
|
||||
dhcp_reply(lease);
|
||||
}
|
||||
+ TRACE(DHCPD_ACK_LEASE_DONE());
|
||||
}
|
||||
|
||||
#if defined(DELAYED_ACK)
|
||||
@@ -3570,6 +3598,8 @@ void dhcp_reply (lease)
|
||||
if (!state)
|
||||
log_fatal ("dhcp_reply was supplied lease with no state!");
|
||||
|
||||
+ TRACE(DHCPD_REPLY_START());
|
||||
+
|
||||
/* Compose a response for the client... */
|
||||
memset (&raw, 0, sizeof raw);
|
||||
memset (&d1, 0, sizeof d1);
|
||||
@@ -3791,6 +3821,8 @@ void dhcp_reply (lease)
|
||||
|
||||
free_lease_state (state, MDL);
|
||||
lease -> state = (struct lease_state *)0;
|
||||
+
|
||||
+ TRACE(DHCPD_REPLY_DONE());
|
||||
}
|
||||
|
||||
int find_lease (struct lease **lp,
|
||||
@@ -3813,6 +3845,8 @@ int find_lease (struct lease **lp,
|
||||
struct data_string client_identifier;
|
||||
struct hardware h;
|
||||
|
||||
+ TRACE(DHCPD_FIND_LEASE_START());
|
||||
+
|
||||
#if defined(FAILOVER_PROTOCOL)
|
||||
/* Quick check to see if the peer has leases. */
|
||||
if (peer_has_leases) {
|
||||
@@ -4535,6 +4569,9 @@ int find_lease (struct lease **lp,
|
||||
#if defined (DEBUG_FIND_LEASE)
|
||||
log_info ("Not returning a lease.");
|
||||
#endif
|
||||
+
|
||||
+ TRACE(DHCPD_FIND_LEASE_DONE());
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -up dhcp-4.3.3b1/server/dhcpd.c.systemtap dhcp-4.3.3b1/server/dhcpd.c
|
||||
--- dhcp-4.3.3b1/server/dhcpd.c.systemtap 2015-08-10 11:46:08.863892345 +0200
|
||||
+++ dhcp-4.3.3b1/server/dhcpd.c 2015-08-10 11:46:08.915892149 +0200
|
||||
@@ -56,6 +56,8 @@ uid_t set_uid = 0;
|
||||
gid_t set_gid = 0;
|
||||
#endif /* PARANOIA */
|
||||
|
||||
+#include "trace.h"
|
||||
+
|
||||
#ifndef UNIT_TEST
|
||||
static void usage(void);
|
||||
#endif
|
||||
@@ -816,6 +818,8 @@ main(int argc, char **argv) {
|
||||
/* Log that we are about to start working */
|
||||
log_info("Server starting service.");
|
||||
|
||||
+ TRACE(DHCPD_MAIN());
|
||||
+
|
||||
/*
|
||||
* Receive packets and dispatch them...
|
||||
* dispatch() will never return.
|
||||
diff -up dhcp-4.3.3b1/server/dhcpv6.c.systemtap dhcp-4.3.3b1/server/dhcpv6.c
|
||||
--- dhcp-4.3.3b1/server/dhcpv6.c.systemtap 2015-08-10 11:46:08.896892221 +0200
|
||||
+++ dhcp-4.3.3b1/server/dhcpv6.c 2015-08-10 11:51:44.835621025 +0200
|
||||
@@ -17,6 +17,7 @@
|
||||
/*! \file server/dhcpv6.c */
|
||||
|
||||
#include "dhcpd.h"
|
||||
+#include "trace.h"
|
||||
|
||||
#ifdef DHCPv6
|
||||
|
||||
@@ -4972,6 +4973,8 @@ static void
|
||||
dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_SOLICIT_START());
|
||||
+
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -4985,6 +4988,8 @@ dhcpv6_solicit(struct data_string *reply
|
||||
* Clean up.
|
||||
*/
|
||||
data_string_forget(&client_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_SOLICIT_DONE());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4998,6 +5003,8 @@ dhcpv6_request(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_REQUEST_START());
|
||||
+
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -5022,6 +5029,8 @@ dhcpv6_request(struct data_string *reply
|
||||
*/
|
||||
data_string_forget(&client_id, MDL);
|
||||
data_string_forget(&server_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_REQUEST_DONE());
|
||||
}
|
||||
|
||||
/* Find a DHCPv6 packet's shared network from hints in the packet.
|
||||
@@ -5134,6 +5143,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));
|
||||
|
||||
+ TRACE(DHCPD_SIX_CONFIRM_START());
|
||||
+
|
||||
/*
|
||||
* Basic client message validation.
|
||||
*/
|
||||
@@ -5320,6 +5331,8 @@ exit:
|
||||
option_state_dereference(&cli_enc_opt_state, MDL);
|
||||
if (opt_state != NULL)
|
||||
option_state_dereference(&opt_state, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_CONFIRM_DONE());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5334,6 +5347,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_RENEW_START());
|
||||
+
|
||||
/*
|
||||
* Validate the request.
|
||||
*/
|
||||
@@ -5358,6 +5373,8 @@ dhcpv6_renew(struct data_string *reply,
|
||||
*/
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_RENEW_DONE());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5371,6 +5388,8 @@ static void
|
||||
dhcpv6_rebind(struct data_string *reply, struct packet *packet) {
|
||||
struct data_string client_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_REBIND_START());
|
||||
+
|
||||
if (!valid_client_msg(packet, &client_id)) {
|
||||
return;
|
||||
}
|
||||
@@ -5378,6 +5397,8 @@ dhcpv6_rebind(struct data_string *reply,
|
||||
lease_to_client(reply, packet, &client_id, NULL);
|
||||
|
||||
data_string_forget(&client_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_REBIND_DONE());
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5779,6 +5800,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_DECLINE_START());
|
||||
+
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -5808,6 +5831,8 @@ dhcpv6_decline(struct data_string *reply
|
||||
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_DECLINE_DONE());
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -6256,6 +6281,8 @@ dhcpv6_release(struct data_string *reply
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_RELEASE_START());
|
||||
+
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -6286,6 +6313,8 @@ dhcpv6_release(struct data_string *reply
|
||||
|
||||
data_string_forget(&server_id, MDL);
|
||||
data_string_forget(&client_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_RELEASE_DONE());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6298,6 +6327,8 @@ dhcpv6_information_request(struct data_s
|
||||
struct data_string client_id;
|
||||
struct data_string server_id;
|
||||
|
||||
+ TRACE(DHCPD_SIX_INFORMATION_REQUEST_START());
|
||||
+
|
||||
/*
|
||||
* Validate our input.
|
||||
*/
|
||||
@@ -6329,6 +6360,8 @@ dhcpv6_information_request(struct data_s
|
||||
data_string_forget(&client_id, MDL);
|
||||
}
|
||||
data_string_forget(&server_id, MDL);
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_INFORMATION_REQUEST_DONE());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6357,6 +6390,8 @@ dhcpv6_relay_forw(struct data_string *re
|
||||
struct dhcpv6_relay_packet *reply;
|
||||
int reply_ofs;
|
||||
|
||||
+ TRACE(DHCPD_SIX_RELAY_FORW_START());
|
||||
+
|
||||
/*
|
||||
* Initialize variables for early exit.
|
||||
*/
|
||||
@@ -6616,6 +6651,8 @@ exit:
|
||||
if (enc_packet != NULL) {
|
||||
packet_dereference(&enc_packet, MDL);
|
||||
}
|
||||
+
|
||||
+ TRACE(DHCPD_SIX_RELAY_FORW_DONE());
|
||||
}
|
||||
|
||||
static void
|
||||
diff -up dhcp-4.3.3b1/server/failover.c.systemtap dhcp-4.3.3b1/server/failover.c
|
||||
--- dhcp-4.3.3b1/server/failover.c.systemtap 2015-07-30 15:17:16.000000000 +0200
|
||||
+++ dhcp-4.3.3b1/server/failover.c 2015-08-10 11:46:08.919892134 +0200
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "dhcpd.h"
|
||||
#include <omapip/omapip_p.h>
|
||||
|
||||
+#include "trace.h"
|
||||
+
|
||||
#if defined (FAILOVER_PROTOCOL)
|
||||
dhcp_failover_state_t *failover_states;
|
||||
static isc_result_t do_a_failover_option (omapi_object_t *,
|
||||
@@ -1767,6 +1769,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
struct lease *l;
|
||||
struct timeval tv;
|
||||
|
||||
+ TRACE(DHCPD_FAILOVER_SET_STATE_START(state->me.state, new_state));
|
||||
+
|
||||
/* 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.
|
||||
@@ -1986,6 +1990,8 @@ isc_result_t dhcp_failover_set_state (dh
|
||||
break;
|
||||
}
|
||||
|
||||
+ TRACE(DHCPD_FAILOVER_SET_STATE_DONE());
|
||||
+
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -2499,6 +2505,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
if (state -> me.state != normal)
|
||||
return 0;
|
||||
|
||||
+ TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_START());
|
||||
+
|
||||
state->last_balance = cur_time;
|
||||
|
||||
for (s = shared_networks ; s ; s = s->next) {
|
||||
@@ -2660,6 +2668,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
|
||||
if (leases_queued)
|
||||
commit_leases();
|
||||
|
||||
+ TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_DONE());
|
||||
+
|
||||
return leases_queued;
|
||||
}
|
||||
|
||||
diff -up dhcp-4.3.3b1/server/Makefile.am.systemtap dhcp-4.3.3b1/server/Makefile.am
|
||||
--- dhcp-4.3.3b1/server/Makefile.am.systemtap 2015-08-10 11:46:08.831892467 +0200
|
||||
+++ dhcp-4.3.3b1/server/Makefile.am 2015-08-10 11:52:34.278433933 +0200
|
||||
@@ -10,7 +10,8 @@ dist_sysconf_DATA = dhcpd.conf.example
|
||||
sbin_PROGRAMS = dhcpd
|
||||
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||
omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
|
||||
- dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
||||
+ dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c \
|
||||
+ probes.d trace.h
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dhcpctl/libdhcpctl.la \
|
||||
@@ -20,3 +21,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+BUILT_SOURCES = probes.h
|
||||
+probes.h: probes.d
|
||||
+ $(DTRACE) -C -h -s $< -o $@
|
||||
+
|
||||
+probes.o: probes.d
|
||||
+ $(DTRACE) -C -G -s $< -o $@
|
||||
+
|
||||
+dhcpd_LDADD += probes.o
|
||||
+endif
|
||||
diff -up dhcp-4.3.3b1/server/probes.d.systemtap dhcp-4.3.3b1/server/probes.d
|
||||
--- dhcp-4.3.3b1/server/probes.d.systemtap 2015-08-10 11:46:08.920892130 +0200
|
||||
+++ dhcp-4.3.3b1/server/probes.d 2015-08-10 11:46:08.920892130 +0200
|
||||
@@ -0,0 +1,43 @@
|
||||
+provider dhcpd {
|
||||
+ probe main();
|
||||
+ probe discover_start();
|
||||
+ probe discover_done();
|
||||
+ probe request_start();
|
||||
+ probe request_done();
|
||||
+ probe release_start();
|
||||
+ probe release_done();
|
||||
+ probe decline_start();
|
||||
+ probe decline_done();
|
||||
+ probe inform_start();
|
||||
+ probe inform_done();
|
||||
+ probe nak_lease_start();
|
||||
+ probe nak_lease_done();
|
||||
+ probe ack_lease_start();
|
||||
+ probe ack_lease_done();
|
||||
+ probe reply_start();
|
||||
+ probe reply_done();
|
||||
+ probe find_lease_start();
|
||||
+ probe find_lease_done();
|
||||
+ probe six_solicit_start();
|
||||
+ probe six_solicit_done();
|
||||
+ probe six_request_start();
|
||||
+ probe six_request_done();
|
||||
+ probe six_confirm_start();
|
||||
+ probe six_confirm_done();
|
||||
+ probe six_renew_start();
|
||||
+ probe six_renew_done();
|
||||
+ probe six_rebind_start();
|
||||
+ probe six_rebind_done();
|
||||
+ probe six_decline_start();
|
||||
+ probe six_decline_done();
|
||||
+ probe six_release_start();
|
||||
+ probe six_release_done();
|
||||
+ probe six_information_request_start();
|
||||
+ probe six_information_request_done();
|
||||
+ probe six_relay_forw_start();
|
||||
+ probe six_relay_forw_done();
|
||||
+ probe failover_pool_dobalance_start();
|
||||
+ probe failover_pool_dobalance_done();
|
||||
+ probe failover_set_state_start(int, int);
|
||||
+ probe failover_set_state_done();
|
||||
+};
|
||||
diff -up dhcp-4.3.3b1/server/tests/Makefile.am.systemtap dhcp-4.3.3b1/server/tests/Makefile.am
|
||||
--- dhcp-4.3.3b1/server/tests/Makefile.am.systemtap 2015-08-10 11:46:08.831892467 +0200
|
||||
+++ dhcp-4.3.3b1/server/tests/Makefile.am 2015-08-10 11:46:08.920892130 +0200
|
||||
@@ -21,6 +21,10 @@ DHCPLIBS = $(top_builddir)/common/libdhc
|
||||
$(top_builddir)/dhcpctl/libdhcpctl.la \
|
||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+DHCPLIBS += ../probes.o
|
||||
+endif
|
||||
+
|
||||
ATF_TESTS =
|
||||
if HAVE_ATF
|
||||
|
||||
diff -up dhcp-4.3.3b1/server/trace.h.systemtap dhcp-4.3.3b1/server/trace.h
|
||||
--- dhcp-4.3.3b1/server/trace.h.systemtap 2015-08-10 11:46:08.921892126 +0200
|
||||
+++ dhcp-4.3.3b1/server/trace.h 2015-08-10 11:46:08.921892126 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+// trace.h
|
||||
+
|
||||
+#include "config.h"
|
||||
+#ifdef HAVE_SYSTEMTAP
|
||||
+// include the generated probes header and put markers in code
|
||||
+#include "probes.h"
|
||||
+#define TRACE(probe) probe
|
||||
+#else
|
||||
+// Wrap the probe to allow it to be removed when no systemtap available
|
||||
+#define TRACE(probe)
|
||||
+#endif
|
||||
diff -up dhcp-4.3.3b1/tapset/dhcpd.stp.systemtap dhcp-4.3.3b1/tapset/dhcpd.stp
|
||||
--- dhcp-4.3.3b1/tapset/dhcpd.stp.systemtap 2015-08-10 11:46:08.921892126 +0200
|
||||
+++ dhcp-4.3.3b1/tapset/dhcpd.stp 2015-08-10 11:46:08.921892126 +0200
|
||||
@@ -0,0 +1,212 @@
|
||||
+/* dhcpd tapset
|
||||
+ Copyright (C) 2011, Red Hat Inc.
|
||||
+ */
|
||||
+
|
||||
+probe dhcpd_main = process("dhcpd").mark("main")
|
||||
+{
|
||||
+ probestr = sprintf("%s(locals: %s)", $$name, $$locals);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_discover_start = process("dhcpd").mark("discover_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_discover_done = process("dhcpd").mark("discover_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_request_start = process("dhcpd").mark("request_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_request_done = process("dhcpd").mark("request_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_release_start = process("dhcpd").mark("release_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_release_done = process("dhcpd").mark("release_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_decline_start = process("dhcpd").mark("decline_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_decline_done = process("dhcpd").mark("decline_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_inform_start = process("dhcpd").mark("inform_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_inform_done = process("dhcpd").mark("inform_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_nak_lease_start = process("dhcpd").mark("nak_lease_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_nak_lease_done = process("dhcpd").mark("nak_lease_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_ack_lease_start = process("dhcpd").mark("ack_lease_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_ack_lease_done = process("dhcpd").mark("ack_lease_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_reply_start = process("dhcpd").mark("reply_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_reply_done = process("dhcpd").mark("reply_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_find_lease_start = process("dhcpd").mark("find_lease_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_find_lease_done = process("dhcpd").mark("find_lease_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_solicit_start = process("dhcpd").mark("six_solicit_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_solicit_done = process("dhcpd").mark("six_solicit_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_request_start = process("dhcpd").mark("six_request_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_request_done = process("dhcpd").mark("six_request_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_confirm_start = process("dhcpd").mark("six_confirm_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_confirm_done = process("dhcpd").mark("six_confirm_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_renew_start = process("dhcpd").mark("six_renew_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_renew_done = process("dhcpd").mark("six_renew_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_rebind_start = process("dhcpd").mark("six_rebind_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_rebind_done = process("dhcpd").mark("six_rebind_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_decline_start = process("dhcpd").mark("six_decline_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_decline_done = process("dhcpd").mark("six_decline_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_release_start = process("dhcpd").mark("six_release_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_release_done = process("dhcpd").mark("six_release_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_information_request_start = process("dhcpd").mark("six_information_request_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_information_request_done = process("dhcpd").mark("six_information_request_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_relay_forw_start = process("dhcpd").mark("six_relay_forw_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_six_relay_forw_done = process("dhcpd").mark("six_relay_forw_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_failover_pool_dobalance_start = process("dhcpd").mark("failover_pool_dobalance_start")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_failover_pool_dobalance_done = process("dhcpd").mark("failover_pool_dobalance_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+probe dhcpd_failover_set_state_start = process("dhcpd").mark("failover_set_state_start")
|
||||
+{
|
||||
+ state = $arg1;
|
||||
+ new_state = $arg2;
|
||||
+ probestr = sprintf("%s(state=%d, new_state=%d)", $$name, state, new_state);
|
||||
+}
|
||||
+
|
||||
+probe dhcpd_failover_set_state_done = process("dhcpd").mark("failover_set_state_done")
|
||||
+{
|
||||
+ probestr = sprintf("%s", $$name);
|
||||
+}
|
||||
diff -up dhcp-4.3.3b1/tapset/Makefile.am.systemtap dhcp-4.3.3b1/tapset/Makefile.am
|
||||
--- dhcp-4.3.3b1/tapset/Makefile.am.systemtap 2015-08-10 11:46:08.921892126 +0200
|
||||
+++ dhcp-4.3.3b1/tapset/Makefile.am 2015-08-10 11:46:08.921892126 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+# Makefile.am for dhcp/tapset
|
||||
+# Jiri Popelka
|
||||
+
|
||||
+.PHONY: clean-local install-data-hook uninstall-local
|
||||
+
|
||||
+#
|
||||
+EXTRA_DIST = dhcpd.stp
|
||||
+TAPSET_FILES = $(EXTRA_DIST)
|
||||
+TAPSET_INSTALL_DIR = $(DESTDIR)@ABS_TAPSET_DIR@
|
||||
+
|
||||
+if ENABLE_SYSTEMTAP
|
||||
+all-local: $(TAPSET_FILES)
|
||||
+
|
||||
+clean-local:
|
||||
+
|
||||
+install-data-hook:
|
||||
+ $(MKDIR_P) $(TAPSET_INSTALL_DIR)
|
||||
+ $(INSTALL_DATA) $(TAPSET_FILES) $(TAPSET_INSTALL_DIR)
|
||||
+
|
||||
+uninstall-local:
|
||||
+ @list='$(TAPSET_FILES)'; for p in $$list; do \
|
||||
+ echo " rm -f '$(TAPSET_INSTALL_DIR)/$$p'"; \
|
||||
+ rm -f "$(TAPSET_INSTALL_DIR)/$$p"; \
|
||||
+ done
|
||||
+endif
|
||||
+
|
27
dhcp.spec
27
dhcp.spec
@ -12,14 +12,15 @@
|
||||
#%%global patchver P1
|
||||
|
||||
#%%global VERSION %%{version}-%%{patchver}
|
||||
#%%global VERSION %%{version}%%{prever}
|
||||
%global VERSION %{version}
|
||||
#%global VERSION %%{version}%%{prever}
|
||||
#%global VERSION %{version}
|
||||
|
||||
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.3.5
|
||||
Release: 10%{?dist}
|
||||
Version: 4.3.6
|
||||
%global VERSION %%{version}%%{prever}
|
||||
Release: 1%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
@ -67,18 +68,14 @@ Patch25: dhcp-improved-xid.patch
|
||||
Patch26: dhcp-duidv4.patch
|
||||
Patch27: dhcp-duid_uuid.patch
|
||||
#Patch28: dhcp-systemtap.patch
|
||||
Patch29: dhcp-getifaddrs.patch
|
||||
|
||||
Patch31: dhcp-client-request-release-bind-iface.patch
|
||||
Patch32: dhcp-interval.patch
|
||||
Patch33: dhcp-no-subnet-error2info.patch
|
||||
Patch34: dhcp-sd_notify.patch
|
||||
|
||||
Patch36: dhcp-option97-pxe-client-id.patch
|
||||
Patch37: dhcp-stateless-DUID-LLT.patch
|
||||
Patch38: dhcp-dhclient-preinit6s.patch
|
||||
Patch39: dhcp-dhclient-ddns_lazy.patch
|
||||
|
||||
|
||||
|
||||
BuildRequires: autoconf
|
||||
@ -316,18 +313,10 @@ rm bind/bind.tar.gz
|
||||
# http://sourceware.org/systemtap/wiki/SystemTap
|
||||
#%%patch28 -p1 -b .systemtap
|
||||
|
||||
# Use getifaddrs() to scan for interfaces on Linux (#449946)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28761])
|
||||
%patch29 -p1 -b .getifaddrs
|
||||
|
||||
|
||||
# send unicast request/release via correct interface (#800561, #1177351)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544])
|
||||
%patch31 -p1 -b .bind-iface
|
||||
|
||||
# isc_time_nowplusinterval() is not safe with 64-bit time_t (#662254, #789601)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28038])
|
||||
%patch32 -p1 -b .interval
|
||||
|
||||
# 'No subnet declaration for <iface>' should be info, not error.
|
||||
%patch33 -p1 -b .error2info
|
||||
@ -346,9 +335,6 @@ rm bind/bind.tar.gz
|
||||
# dhclient: make sure link-local address is ready in stateless mode (#1263466)
|
||||
%patch38 -p1 -b .preinit6s
|
||||
|
||||
# [ISC-BUGS] #33377.
|
||||
%patch39 -p1 -b .ddnsport
|
||||
|
||||
# DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=656610
|
||||
sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' includes/site.h
|
||||
@ -675,6 +661,9 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jul 14 2017 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-1
|
||||
- New version 4.3.6
|
||||
|
||||
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 12:4.3.5-10
|
||||
- Rebuild due to bug in RPM (RHBZ #1468476)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
2b5e5b2fa31c2e27e487039d86f83d3f dhcp-4.3.5.tar.gz
|
||||
SHA512 (dhcp-4.3.6b1.tar.gz) = 45a79f9152c6855c9a699341f7a31e2e54dedc90ed461362c7be2674b5235ac2b264fb776da0f988ac9cb463307f02479ea02c68b88c31b63031ad782e5ba77c
|
||||
|
11
tap_all.stp
11
tap_all.stp
@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Probe all probes listed in the /usr/share/systemtap/tapset/dhcpd.stp tapset
|
||||
* and print out data each time a probe fires.
|
||||
*
|
||||
* This could be run with a specific instance of dhcpd like:
|
||||
* $ stap tap_all.stp -c 'dhcpd -d eth0'
|
||||
*/
|
||||
|
||||
probe dhcpd* {
|
||||
printf("%s\n", probestr);
|
||||
}
|
Loading…
Reference in New Issue
Block a user