mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
- Update net/isc-dhcp3-* to 3.0.4
* fixes to the failover protocol * manpage updates * DDNS fixes * commandline parsing fixes - Remove USE_REINPLACE PR: ports/96916 Submitted by: maintainer
This commit is contained in:
parent
d8a5d88fda
commit
a1dec1380f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=161641
25 changed files with 206 additions and 284 deletions
10
UPDATING
10
UPDATING
|
@ -6,6 +6,16 @@ You should get into the habit of checking this file for changes each
|
|||
time you update your ports collection, before attempting any port
|
||||
upgrades.
|
||||
|
||||
200605R0728:
|
||||
AFFECTS: users of net/isc-dhcp3-server with failover setup
|
||||
AUTHOR: Joerg.Pulz@frm2.tum.de
|
||||
|
||||
Beginning with isc-dhcp3-server-3.0.4 a new field is added to the
|
||||
lease state structures found in the dhcpd.leases file.
|
||||
Please refer to ${PREFIX}/share/doc/isc-dhcp3-server/RELNOTES for
|
||||
further informations about this change and how you can update your
|
||||
dhcpd.leases file.
|
||||
|
||||
20060506:
|
||||
AFFECTS: users of PHP
|
||||
AUTHOR: ale@FreeBSD.org
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#
|
||||
|
||||
PORTNAME= dhcp
|
||||
PORTVERSION= 3.0.3
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 3.0.4
|
||||
#PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
|
||||
|
@ -19,7 +19,6 @@ DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
|
|||
MAINTAINER= Joerg.Pulz@frm2.tum.de
|
||||
COMMENT?= The ISC Dynamic Host Configuration Protocol server
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
|
||||
SUBSYS?= server
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
MD5 (dhcp-3.0.3.tar.gz) = f91416a0b8ed3fd0601688cf0b7df58f
|
||||
SHA256 (dhcp-3.0.3.tar.gz) = c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe
|
||||
SIZE (dhcp-3.0.3.tar.gz) = 870240
|
||||
MD5 (dhcp-3.0.3-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.3-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.3-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.3-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.3-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.3-dlq-patch) = 7655
|
||||
MD5 (dhcp-3.0.4.tar.gz) = 004ef935fd54b8046b16bdde31a9e151
|
||||
SHA256 (dhcp-3.0.4.tar.gz) = 89171155b7a9225f5eb81c83ff63f071168b87eacab05fb859b8397d36809bf7
|
||||
SIZE (dhcp-3.0.4.tar.gz) = 883245
|
||||
MD5 (dhcp-3.0.4-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.4-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.4-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.4-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.4-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.4-dlq-patch) = 7655
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- client/clparse.c.orig Mon Feb 10 01:39:57 2003
|
||||
+++ client/clparse.c Wed Mar 3 01:35:39 2004
|
||||
@@ -785,7 +785,7 @@
|
||||
if (status != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't record interface %s: %s",
|
||||
name, isc_result_totext (status));
|
||||
- strcpy (ip -> name, name);
|
||||
--- client/clparse.c.orig Sat May 6 17:42:49 2006
|
||||
+++ client/clparse.c Sat May 6 17:43:12 2006
|
||||
@@ -777,7 +777,7 @@
|
||||
interface_dereference(&ip, MDL);
|
||||
return 0;
|
||||
}
|
||||
- strcpy(ip->name, name);
|
||||
+ strlcpy (ip -> name, name, IFNAMSIZ);
|
||||
|
||||
if (dummy_interfaces) {
|
||||
interface_reference (&ip -> next,
|
||||
dummy_interfaces, MDL);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- client/dhclient.8.orig Sun Nov 17 03:25:43 2002
|
||||
+++ client/dhclient.8 Wed Mar 3 02:06:52 2004
|
||||
@@ -18,6 +18,10 @@
|
||||
--- client/dhclient.8.orig Wed Sep 14 18:03:33 2005
|
||||
+++ client/dhclient.8 Sat May 6 17:30:28 2006
|
||||
@@ -23,6 +23,10 @@
|
||||
.\"
|
||||
.\" from Id: dhclient.8,v 1.12.2.8 2004/06/10 17:59:12 dhankins Exp
|
||||
.\" $Id: dhclient.8,v 1.12.2.11 2005/09/14 16:03:33 dhankins Exp $
|
||||
.\"
|
||||
+.\" Portions copyright (c) 2000 David E. O'Brien.
|
||||
+.\" All rights reserved.
|
||||
|
@ -11,7 +11,7 @@
|
|||
.TH dhclient 8
|
||||
.SH NAME
|
||||
dhclient - Dynamic Host Configuration Protocol Client
|
||||
@@ -28,12 +32,18 @@
|
||||
@@ -33,6 +37,9 @@
|
||||
.I port
|
||||
]
|
||||
[
|
||||
|
@ -21,6 +21,7 @@
|
|||
.B -d
|
||||
]
|
||||
[
|
||||
@@ -43,6 +50,9 @@
|
||||
.B -q
|
||||
]
|
||||
[
|
||||
|
@ -30,7 +31,7 @@
|
|||
.B -1
|
||||
]
|
||||
[
|
||||
@@ -64,6 +74,10 @@
|
||||
@@ -73,6 +83,10 @@
|
||||
relay
|
||||
]
|
||||
[
|
||||
|
@ -41,7 +42,7 @@
|
|||
.B -n
|
||||
]
|
||||
[
|
||||
@@ -148,6 +162,15 @@
|
||||
@@ -157,6 +171,15 @@
|
||||
configuration file or on the command line, and will ignore all other
|
||||
interfaces.
|
||||
.PP
|
||||
|
@ -57,7 +58,7 @@
|
|||
If the DHCP client should listen and transmit on a port other than the
|
||||
standard (port 68), the
|
||||
.B -p
|
||||
@@ -171,6 +194,12 @@
|
||||
@@ -180,6 +203,12 @@
|
||||
flag, followed by the IP address to send. This is only useful for testing,
|
||||
and should not be expected to work in any consistent or useful way.
|
||||
.PP
|
||||
|
@ -70,7 +71,7 @@
|
|||
The DHCP client will normally run in the foreground until it has
|
||||
configured an interface, and then will revert to running in the
|
||||
background. To run force dhclient to always run as a foreground
|
||||
@@ -188,6 +217,10 @@
|
||||
@@ -206,6 +235,10 @@
|
||||
.B -q
|
||||
flag prevents any messages other than errors from being printed to the
|
||||
standard error descriptor.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- client/dhclient.c.orig Wed Nov 24 18:39:14 2004
|
||||
+++ client/dhclient.c Tue Mar 8 14:06:59 2005
|
||||
--- client/dhclient.c.orig Thu Apr 27 23:38:29 2006
|
||||
+++ client/dhclient.c Sat May 6 17:34:55 2006
|
||||
@@ -38,6 +38,13 @@
|
||||
#include "dhcpd.h"
|
||||
#include "version.h"
|
||||
|
@ -58,11 +58,11 @@
|
|||
/* do not exit if there are no broadcast interfaces. */
|
||||
persist = 1;
|
||||
@@ -215,7 +241,16 @@
|
||||
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||
log_fatal ("%s: interface name too long (max %ld)",
|
||||
argv [i], (long)strlen (argv [i]));
|
||||
- strcpy (tmp -> name, argv [i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
if (strlen(argv[i]) >= sizeof(tmp->name))
|
||||
log_fatal("%s: interface name too long (is %ld)",
|
||||
argv [i], (long)strlen(argv[i]));
|
||||
- strcpy(tmp->name, argv[i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
+#if __FreeBSD_version > 502010
|
||||
+ set_ieee80211 (tmp);
|
||||
+#endif
|
||||
|
@ -119,7 +119,7 @@
|
|||
"[-pf pid-file] [-e VAR=val]");
|
||||
log_fatal (" [-sf script-file] [interface]");
|
||||
}
|
||||
@@ -881,6 +931,15 @@
|
||||
@@ -879,6 +929,15 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
|
@ -135,7 +135,7 @@
|
|||
/* Replace the old active lease with the new one. */
|
||||
if (client -> active)
|
||||
destroy_client_lease (client -> active);
|
||||
@@ -895,6 +954,12 @@
|
||||
@@ -893,6 +952,12 @@
|
||||
piaddr (client -> active -> address),
|
||||
(long)(client -> active -> renewal - cur_time));
|
||||
client -> state = S_BOUND;
|
||||
|
@ -148,7 +148,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
if (client -> config -> do_forward_update) {
|
||||
@@ -1359,6 +1424,11 @@
|
||||
@@ -1357,6 +1422,11 @@
|
||||
int interval;
|
||||
int increase = 1;
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
|||
/* Figure out how long it's been since we started transmitting. */
|
||||
interval = cur_time - client -> first_sending;
|
||||
|
||||
@@ -1464,6 +1534,9 @@
|
||||
@@ -1457,6 +1527,9 @@
|
||||
struct client_lease *loop;
|
||||
struct client_lease *lp;
|
||||
|
||||
|
@ -170,7 +170,7 @@
|
|||
loop = lp = client -> active;
|
||||
|
||||
log_info ("No DHCPOFFERS received.");
|
||||
@@ -1496,6 +1569,10 @@
|
||||
@@ -1489,6 +1562,10 @@
|
||||
log_info ("bound: renewal in %ld %s.",
|
||||
(long)(client -> active -> renewal -
|
||||
cur_time), "seconds");
|
||||
|
@ -181,7 +181,7 @@
|
|||
add_timeout (client -> active -> renewal,
|
||||
state_bound, client, 0, 0);
|
||||
} else {
|
||||
@@ -1503,6 +1580,11 @@
|
||||
@@ -1496,6 +1573,11 @@
|
||||
log_info ("bound: immediate renewal.");
|
||||
state_bound (client);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
return;
|
||||
@@ -1548,6 +1630,12 @@
|
||||
@@ -1541,6 +1623,12 @@
|
||||
}
|
||||
|
||||
log_info ("No working leases in persistent database - sleeping.");
|
||||
|
@ -206,7 +206,7 @@
|
|||
script_init (client, "FAIL", (struct string_list *)0);
|
||||
if (client -> alias)
|
||||
script_write_params (client, "alias_", client -> alias);
|
||||
@@ -1689,6 +1777,18 @@
|
||||
@@ -1682,6 +1770,18 @@
|
||||
client -> packet.secs = htons (65535);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
log_info ("DHCPREQUEST on %s to %s port %d",
|
||||
client -> name ? client -> name : client -> interface -> name,
|
||||
inet_ntoa (destination.sin_addr),
|
||||
@@ -1710,6 +1810,16 @@
|
||||
@@ -1703,6 +1803,16 @@
|
||||
from, &destination,
|
||||
(struct hardware *)0);
|
||||
|
||||
|
@ -242,7 +242,7 @@
|
|||
add_timeout (cur_time + client -> interval,
|
||||
send_request, client, 0, 0);
|
||||
}
|
||||
@@ -2607,6 +2717,13 @@
|
||||
@@ -2600,6 +2710,13 @@
|
||||
wstatus = 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -256,7 +256,7 @@
|
|||
execve (scriptName, argv, envp);
|
||||
log_error ("execve (%s, ...): %m", scriptName);
|
||||
exit (0);
|
||||
@@ -2793,8 +2910,10 @@
|
||||
@@ -2786,8 +2903,10 @@
|
||||
case S_STOPPED:
|
||||
break;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -3022,7 +3141,9 @@
|
||||
@@ -3015,7 +3134,9 @@
|
||||
break;
|
||||
|
||||
case server_awaken:
|
||||
|
@ -277,7 +277,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
@@ -3160,3 +3281,265 @@
|
||||
@@ -3153,3 +3274,265 @@
|
||||
data_string_forget (&ddns_dhcid, MDL);
|
||||
return rcode;
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
--- common/parse.c.orig 2 Sep 2003 11:01:23 -0000
|
||||
+++ common/parse.c 22 Feb 2004 10:44:52 -0000
|
||||
@@ -414,6 +414,7 @@
|
||||
{
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
+ int32_t num;
|
||||
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
@@ -421,9 +422,9 @@
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
|
||||
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
|
||||
/* Unswap the number - convert_num returns stuff in NBO. */
|
||||
- *timep = ntohl (*timep); /* XXX */
|
||||
+ *timep = ntohl (num);
|
||||
|
||||
parse_semi (cfile);
|
||||
}
|
|
@ -7,8 +7,8 @@
|
|||
#
|
||||
|
||||
PORTNAME= dhcp
|
||||
PORTVERSION= 3.0.3
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 3.0.4
|
||||
#PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
|
||||
|
@ -19,7 +19,6 @@ DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
|
|||
MAINTAINER= Joerg.Pulz@frm2.tum.de
|
||||
COMMENT?= The ISC Dynamic Host Configuration Protocol server
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
|
||||
SUBSYS?= server
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
MD5 (dhcp-3.0.3.tar.gz) = f91416a0b8ed3fd0601688cf0b7df58f
|
||||
SHA256 (dhcp-3.0.3.tar.gz) = c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe
|
||||
SIZE (dhcp-3.0.3.tar.gz) = 870240
|
||||
MD5 (dhcp-3.0.3-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.3-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.3-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.3-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.3-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.3-dlq-patch) = 7655
|
||||
MD5 (dhcp-3.0.4.tar.gz) = 004ef935fd54b8046b16bdde31a9e151
|
||||
SHA256 (dhcp-3.0.4.tar.gz) = 89171155b7a9225f5eb81c83ff63f071168b87eacab05fb859b8397d36809bf7
|
||||
SIZE (dhcp-3.0.4.tar.gz) = 883245
|
||||
MD5 (dhcp-3.0.4-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.4-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.4-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.4-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.4-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.4-dlq-patch) = 7655
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- client/clparse.c.orig Mon Feb 10 01:39:57 2003
|
||||
+++ client/clparse.c Wed Mar 3 01:35:39 2004
|
||||
@@ -785,7 +785,7 @@
|
||||
if (status != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't record interface %s: %s",
|
||||
name, isc_result_totext (status));
|
||||
- strcpy (ip -> name, name);
|
||||
--- client/clparse.c.orig Sat May 6 17:42:49 2006
|
||||
+++ client/clparse.c Sat May 6 17:43:12 2006
|
||||
@@ -777,7 +777,7 @@
|
||||
interface_dereference(&ip, MDL);
|
||||
return 0;
|
||||
}
|
||||
- strcpy(ip->name, name);
|
||||
+ strlcpy (ip -> name, name, IFNAMSIZ);
|
||||
|
||||
if (dummy_interfaces) {
|
||||
interface_reference (&ip -> next,
|
||||
dummy_interfaces, MDL);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- client/dhclient.8.orig Sun Nov 17 03:25:43 2002
|
||||
+++ client/dhclient.8 Wed Mar 3 02:06:52 2004
|
||||
@@ -18,6 +18,10 @@
|
||||
--- client/dhclient.8.orig Wed Sep 14 18:03:33 2005
|
||||
+++ client/dhclient.8 Sat May 6 17:30:28 2006
|
||||
@@ -23,6 +23,10 @@
|
||||
.\"
|
||||
.\" from Id: dhclient.8,v 1.12.2.8 2004/06/10 17:59:12 dhankins Exp
|
||||
.\" $Id: dhclient.8,v 1.12.2.11 2005/09/14 16:03:33 dhankins Exp $
|
||||
.\"
|
||||
+.\" Portions copyright (c) 2000 David E. O'Brien.
|
||||
+.\" All rights reserved.
|
||||
|
@ -11,7 +11,7 @@
|
|||
.TH dhclient 8
|
||||
.SH NAME
|
||||
dhclient - Dynamic Host Configuration Protocol Client
|
||||
@@ -28,12 +32,18 @@
|
||||
@@ -33,6 +37,9 @@
|
||||
.I port
|
||||
]
|
||||
[
|
||||
|
@ -21,6 +21,7 @@
|
|||
.B -d
|
||||
]
|
||||
[
|
||||
@@ -43,6 +50,9 @@
|
||||
.B -q
|
||||
]
|
||||
[
|
||||
|
@ -30,7 +31,7 @@
|
|||
.B -1
|
||||
]
|
||||
[
|
||||
@@ -64,6 +74,10 @@
|
||||
@@ -73,6 +83,10 @@
|
||||
relay
|
||||
]
|
||||
[
|
||||
|
@ -41,7 +42,7 @@
|
|||
.B -n
|
||||
]
|
||||
[
|
||||
@@ -148,6 +162,15 @@
|
||||
@@ -157,6 +171,15 @@
|
||||
configuration file or on the command line, and will ignore all other
|
||||
interfaces.
|
||||
.PP
|
||||
|
@ -57,7 +58,7 @@
|
|||
If the DHCP client should listen and transmit on a port other than the
|
||||
standard (port 68), the
|
||||
.B -p
|
||||
@@ -171,6 +194,12 @@
|
||||
@@ -180,6 +203,12 @@
|
||||
flag, followed by the IP address to send. This is only useful for testing,
|
||||
and should not be expected to work in any consistent or useful way.
|
||||
.PP
|
||||
|
@ -70,7 +71,7 @@
|
|||
The DHCP client will normally run in the foreground until it has
|
||||
configured an interface, and then will revert to running in the
|
||||
background. To run force dhclient to always run as a foreground
|
||||
@@ -188,6 +217,10 @@
|
||||
@@ -206,6 +235,10 @@
|
||||
.B -q
|
||||
flag prevents any messages other than errors from being printed to the
|
||||
standard error descriptor.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- client/dhclient.c.orig Wed Nov 24 18:39:14 2004
|
||||
+++ client/dhclient.c Tue Mar 8 14:06:59 2005
|
||||
--- client/dhclient.c.orig Thu Apr 27 23:38:29 2006
|
||||
+++ client/dhclient.c Sat May 6 17:34:55 2006
|
||||
@@ -38,6 +38,13 @@
|
||||
#include "dhcpd.h"
|
||||
#include "version.h"
|
||||
|
@ -58,11 +58,11 @@
|
|||
/* do not exit if there are no broadcast interfaces. */
|
||||
persist = 1;
|
||||
@@ -215,7 +241,16 @@
|
||||
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||
log_fatal ("%s: interface name too long (max %ld)",
|
||||
argv [i], (long)strlen (argv [i]));
|
||||
- strcpy (tmp -> name, argv [i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
if (strlen(argv[i]) >= sizeof(tmp->name))
|
||||
log_fatal("%s: interface name too long (is %ld)",
|
||||
argv [i], (long)strlen(argv[i]));
|
||||
- strcpy(tmp->name, argv[i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
+#if __FreeBSD_version > 502010
|
||||
+ set_ieee80211 (tmp);
|
||||
+#endif
|
||||
|
@ -119,7 +119,7 @@
|
|||
"[-pf pid-file] [-e VAR=val]");
|
||||
log_fatal (" [-sf script-file] [interface]");
|
||||
}
|
||||
@@ -881,6 +931,15 @@
|
||||
@@ -879,6 +929,15 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
|
@ -135,7 +135,7 @@
|
|||
/* Replace the old active lease with the new one. */
|
||||
if (client -> active)
|
||||
destroy_client_lease (client -> active);
|
||||
@@ -895,6 +954,12 @@
|
||||
@@ -893,6 +952,12 @@
|
||||
piaddr (client -> active -> address),
|
||||
(long)(client -> active -> renewal - cur_time));
|
||||
client -> state = S_BOUND;
|
||||
|
@ -148,7 +148,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
if (client -> config -> do_forward_update) {
|
||||
@@ -1359,6 +1424,11 @@
|
||||
@@ -1357,6 +1422,11 @@
|
||||
int interval;
|
||||
int increase = 1;
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
|||
/* Figure out how long it's been since we started transmitting. */
|
||||
interval = cur_time - client -> first_sending;
|
||||
|
||||
@@ -1464,6 +1534,9 @@
|
||||
@@ -1457,6 +1527,9 @@
|
||||
struct client_lease *loop;
|
||||
struct client_lease *lp;
|
||||
|
||||
|
@ -170,7 +170,7 @@
|
|||
loop = lp = client -> active;
|
||||
|
||||
log_info ("No DHCPOFFERS received.");
|
||||
@@ -1496,6 +1569,10 @@
|
||||
@@ -1489,6 +1562,10 @@
|
||||
log_info ("bound: renewal in %ld %s.",
|
||||
(long)(client -> active -> renewal -
|
||||
cur_time), "seconds");
|
||||
|
@ -181,7 +181,7 @@
|
|||
add_timeout (client -> active -> renewal,
|
||||
state_bound, client, 0, 0);
|
||||
} else {
|
||||
@@ -1503,6 +1580,11 @@
|
||||
@@ -1496,6 +1573,11 @@
|
||||
log_info ("bound: immediate renewal.");
|
||||
state_bound (client);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
return;
|
||||
@@ -1548,6 +1630,12 @@
|
||||
@@ -1541,6 +1623,12 @@
|
||||
}
|
||||
|
||||
log_info ("No working leases in persistent database - sleeping.");
|
||||
|
@ -206,7 +206,7 @@
|
|||
script_init (client, "FAIL", (struct string_list *)0);
|
||||
if (client -> alias)
|
||||
script_write_params (client, "alias_", client -> alias);
|
||||
@@ -1689,6 +1777,18 @@
|
||||
@@ -1682,6 +1770,18 @@
|
||||
client -> packet.secs = htons (65535);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
log_info ("DHCPREQUEST on %s to %s port %d",
|
||||
client -> name ? client -> name : client -> interface -> name,
|
||||
inet_ntoa (destination.sin_addr),
|
||||
@@ -1710,6 +1810,16 @@
|
||||
@@ -1703,6 +1803,16 @@
|
||||
from, &destination,
|
||||
(struct hardware *)0);
|
||||
|
||||
|
@ -242,7 +242,7 @@
|
|||
add_timeout (cur_time + client -> interval,
|
||||
send_request, client, 0, 0);
|
||||
}
|
||||
@@ -2607,6 +2717,13 @@
|
||||
@@ -2600,6 +2710,13 @@
|
||||
wstatus = 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -256,7 +256,7 @@
|
|||
execve (scriptName, argv, envp);
|
||||
log_error ("execve (%s, ...): %m", scriptName);
|
||||
exit (0);
|
||||
@@ -2793,8 +2910,10 @@
|
||||
@@ -2786,8 +2903,10 @@
|
||||
case S_STOPPED:
|
||||
break;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -3022,7 +3141,9 @@
|
||||
@@ -3015,7 +3134,9 @@
|
||||
break;
|
||||
|
||||
case server_awaken:
|
||||
|
@ -277,7 +277,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
@@ -3160,3 +3281,265 @@
|
||||
@@ -3153,3 +3274,265 @@
|
||||
data_string_forget (&ddns_dhcid, MDL);
|
||||
return rcode;
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
--- common/parse.c.orig 2 Sep 2003 11:01:23 -0000
|
||||
+++ common/parse.c 22 Feb 2004 10:44:52 -0000
|
||||
@@ -414,6 +414,7 @@
|
||||
{
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
+ int32_t num;
|
||||
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
@@ -421,9 +422,9 @@
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
|
||||
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
|
||||
/* Unswap the number - convert_num returns stuff in NBO. */
|
||||
- *timep = ntohl (*timep); /* XXX */
|
||||
+ *timep = ntohl (num);
|
||||
|
||||
parse_semi (cfile);
|
||||
}
|
|
@ -7,8 +7,8 @@
|
|||
#
|
||||
|
||||
PORTNAME= dhcp
|
||||
PORTVERSION= 3.0.3
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 3.0.4
|
||||
#PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
|
||||
|
@ -19,7 +19,6 @@ DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
|
|||
MAINTAINER= Joerg.Pulz@frm2.tum.de
|
||||
COMMENT?= The ISC Dynamic Host Configuration Protocol server
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
|
||||
SUBSYS?= server
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
MD5 (dhcp-3.0.3.tar.gz) = f91416a0b8ed3fd0601688cf0b7df58f
|
||||
SHA256 (dhcp-3.0.3.tar.gz) = c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe
|
||||
SIZE (dhcp-3.0.3.tar.gz) = 870240
|
||||
MD5 (dhcp-3.0.3-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.3-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.3-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.3-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.3-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.3-dlq-patch) = 7655
|
||||
MD5 (dhcp-3.0.4.tar.gz) = 004ef935fd54b8046b16bdde31a9e151
|
||||
SHA256 (dhcp-3.0.4.tar.gz) = 89171155b7a9225f5eb81c83ff63f071168b87eacab05fb859b8397d36809bf7
|
||||
SIZE (dhcp-3.0.4.tar.gz) = 883245
|
||||
MD5 (dhcp-3.0.4-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.4-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.4-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.4-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.4-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.4-dlq-patch) = 7655
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- client/clparse.c.orig Mon Feb 10 01:39:57 2003
|
||||
+++ client/clparse.c Wed Mar 3 01:35:39 2004
|
||||
@@ -785,7 +785,7 @@
|
||||
if (status != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't record interface %s: %s",
|
||||
name, isc_result_totext (status));
|
||||
- strcpy (ip -> name, name);
|
||||
--- client/clparse.c.orig Sat May 6 17:42:49 2006
|
||||
+++ client/clparse.c Sat May 6 17:43:12 2006
|
||||
@@ -777,7 +777,7 @@
|
||||
interface_dereference(&ip, MDL);
|
||||
return 0;
|
||||
}
|
||||
- strcpy(ip->name, name);
|
||||
+ strlcpy (ip -> name, name, IFNAMSIZ);
|
||||
|
||||
if (dummy_interfaces) {
|
||||
interface_reference (&ip -> next,
|
||||
dummy_interfaces, MDL);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- client/dhclient.8.orig Sun Nov 17 03:25:43 2002
|
||||
+++ client/dhclient.8 Wed Mar 3 02:06:52 2004
|
||||
@@ -18,6 +18,10 @@
|
||||
--- client/dhclient.8.orig Wed Sep 14 18:03:33 2005
|
||||
+++ client/dhclient.8 Sat May 6 17:30:28 2006
|
||||
@@ -23,6 +23,10 @@
|
||||
.\"
|
||||
.\" from Id: dhclient.8,v 1.12.2.8 2004/06/10 17:59:12 dhankins Exp
|
||||
.\" $Id: dhclient.8,v 1.12.2.11 2005/09/14 16:03:33 dhankins Exp $
|
||||
.\"
|
||||
+.\" Portions copyright (c) 2000 David E. O'Brien.
|
||||
+.\" All rights reserved.
|
||||
|
@ -11,7 +11,7 @@
|
|||
.TH dhclient 8
|
||||
.SH NAME
|
||||
dhclient - Dynamic Host Configuration Protocol Client
|
||||
@@ -28,12 +32,18 @@
|
||||
@@ -33,6 +37,9 @@
|
||||
.I port
|
||||
]
|
||||
[
|
||||
|
@ -21,6 +21,7 @@
|
|||
.B -d
|
||||
]
|
||||
[
|
||||
@@ -43,6 +50,9 @@
|
||||
.B -q
|
||||
]
|
||||
[
|
||||
|
@ -30,7 +31,7 @@
|
|||
.B -1
|
||||
]
|
||||
[
|
||||
@@ -64,6 +74,10 @@
|
||||
@@ -73,6 +83,10 @@
|
||||
relay
|
||||
]
|
||||
[
|
||||
|
@ -41,7 +42,7 @@
|
|||
.B -n
|
||||
]
|
||||
[
|
||||
@@ -148,6 +162,15 @@
|
||||
@@ -157,6 +171,15 @@
|
||||
configuration file or on the command line, and will ignore all other
|
||||
interfaces.
|
||||
.PP
|
||||
|
@ -57,7 +58,7 @@
|
|||
If the DHCP client should listen and transmit on a port other than the
|
||||
standard (port 68), the
|
||||
.B -p
|
||||
@@ -171,6 +194,12 @@
|
||||
@@ -180,6 +203,12 @@
|
||||
flag, followed by the IP address to send. This is only useful for testing,
|
||||
and should not be expected to work in any consistent or useful way.
|
||||
.PP
|
||||
|
@ -70,7 +71,7 @@
|
|||
The DHCP client will normally run in the foreground until it has
|
||||
configured an interface, and then will revert to running in the
|
||||
background. To run force dhclient to always run as a foreground
|
||||
@@ -188,6 +217,10 @@
|
||||
@@ -206,6 +235,10 @@
|
||||
.B -q
|
||||
flag prevents any messages other than errors from being printed to the
|
||||
standard error descriptor.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- client/dhclient.c.orig Wed Nov 24 18:39:14 2004
|
||||
+++ client/dhclient.c Tue Mar 8 14:06:59 2005
|
||||
--- client/dhclient.c.orig Thu Apr 27 23:38:29 2006
|
||||
+++ client/dhclient.c Sat May 6 17:34:55 2006
|
||||
@@ -38,6 +38,13 @@
|
||||
#include "dhcpd.h"
|
||||
#include "version.h"
|
||||
|
@ -58,11 +58,11 @@
|
|||
/* do not exit if there are no broadcast interfaces. */
|
||||
persist = 1;
|
||||
@@ -215,7 +241,16 @@
|
||||
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||
log_fatal ("%s: interface name too long (max %ld)",
|
||||
argv [i], (long)strlen (argv [i]));
|
||||
- strcpy (tmp -> name, argv [i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
if (strlen(argv[i]) >= sizeof(tmp->name))
|
||||
log_fatal("%s: interface name too long (is %ld)",
|
||||
argv [i], (long)strlen(argv[i]));
|
||||
- strcpy(tmp->name, argv[i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
+#if __FreeBSD_version > 502010
|
||||
+ set_ieee80211 (tmp);
|
||||
+#endif
|
||||
|
@ -119,7 +119,7 @@
|
|||
"[-pf pid-file] [-e VAR=val]");
|
||||
log_fatal (" [-sf script-file] [interface]");
|
||||
}
|
||||
@@ -881,6 +931,15 @@
|
||||
@@ -879,6 +929,15 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
|
@ -135,7 +135,7 @@
|
|||
/* Replace the old active lease with the new one. */
|
||||
if (client -> active)
|
||||
destroy_client_lease (client -> active);
|
||||
@@ -895,6 +954,12 @@
|
||||
@@ -893,6 +952,12 @@
|
||||
piaddr (client -> active -> address),
|
||||
(long)(client -> active -> renewal - cur_time));
|
||||
client -> state = S_BOUND;
|
||||
|
@ -148,7 +148,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
if (client -> config -> do_forward_update) {
|
||||
@@ -1359,6 +1424,11 @@
|
||||
@@ -1357,6 +1422,11 @@
|
||||
int interval;
|
||||
int increase = 1;
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
|||
/* Figure out how long it's been since we started transmitting. */
|
||||
interval = cur_time - client -> first_sending;
|
||||
|
||||
@@ -1464,6 +1534,9 @@
|
||||
@@ -1457,6 +1527,9 @@
|
||||
struct client_lease *loop;
|
||||
struct client_lease *lp;
|
||||
|
||||
|
@ -170,7 +170,7 @@
|
|||
loop = lp = client -> active;
|
||||
|
||||
log_info ("No DHCPOFFERS received.");
|
||||
@@ -1496,6 +1569,10 @@
|
||||
@@ -1489,6 +1562,10 @@
|
||||
log_info ("bound: renewal in %ld %s.",
|
||||
(long)(client -> active -> renewal -
|
||||
cur_time), "seconds");
|
||||
|
@ -181,7 +181,7 @@
|
|||
add_timeout (client -> active -> renewal,
|
||||
state_bound, client, 0, 0);
|
||||
} else {
|
||||
@@ -1503,6 +1580,11 @@
|
||||
@@ -1496,6 +1573,11 @@
|
||||
log_info ("bound: immediate renewal.");
|
||||
state_bound (client);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
return;
|
||||
@@ -1548,6 +1630,12 @@
|
||||
@@ -1541,6 +1623,12 @@
|
||||
}
|
||||
|
||||
log_info ("No working leases in persistent database - sleeping.");
|
||||
|
@ -206,7 +206,7 @@
|
|||
script_init (client, "FAIL", (struct string_list *)0);
|
||||
if (client -> alias)
|
||||
script_write_params (client, "alias_", client -> alias);
|
||||
@@ -1689,6 +1777,18 @@
|
||||
@@ -1682,6 +1770,18 @@
|
||||
client -> packet.secs = htons (65535);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
log_info ("DHCPREQUEST on %s to %s port %d",
|
||||
client -> name ? client -> name : client -> interface -> name,
|
||||
inet_ntoa (destination.sin_addr),
|
||||
@@ -1710,6 +1810,16 @@
|
||||
@@ -1703,6 +1803,16 @@
|
||||
from, &destination,
|
||||
(struct hardware *)0);
|
||||
|
||||
|
@ -242,7 +242,7 @@
|
|||
add_timeout (cur_time + client -> interval,
|
||||
send_request, client, 0, 0);
|
||||
}
|
||||
@@ -2607,6 +2717,13 @@
|
||||
@@ -2600,6 +2710,13 @@
|
||||
wstatus = 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -256,7 +256,7 @@
|
|||
execve (scriptName, argv, envp);
|
||||
log_error ("execve (%s, ...): %m", scriptName);
|
||||
exit (0);
|
||||
@@ -2793,8 +2910,10 @@
|
||||
@@ -2786,8 +2903,10 @@
|
||||
case S_STOPPED:
|
||||
break;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -3022,7 +3141,9 @@
|
||||
@@ -3015,7 +3134,9 @@
|
||||
break;
|
||||
|
||||
case server_awaken:
|
||||
|
@ -277,7 +277,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
@@ -3160,3 +3281,265 @@
|
||||
@@ -3153,3 +3274,265 @@
|
||||
data_string_forget (&ddns_dhcid, MDL);
|
||||
return rcode;
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
--- common/parse.c.orig 2 Sep 2003 11:01:23 -0000
|
||||
+++ common/parse.c 22 Feb 2004 10:44:52 -0000
|
||||
@@ -414,6 +414,7 @@
|
||||
{
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
+ int32_t num;
|
||||
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
@@ -421,9 +422,9 @@
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
|
||||
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
|
||||
/* Unswap the number - convert_num returns stuff in NBO. */
|
||||
- *timep = ntohl (*timep); /* XXX */
|
||||
+ *timep = ntohl (num);
|
||||
|
||||
parse_semi (cfile);
|
||||
}
|
|
@ -7,8 +7,8 @@
|
|||
#
|
||||
|
||||
PORTNAME= dhcp
|
||||
PORTVERSION= 3.0.3
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 3.0.4
|
||||
#PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
|
||||
|
@ -19,7 +19,6 @@ DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
|
|||
MAINTAINER= Joerg.Pulz@frm2.tum.de
|
||||
COMMENT?= The ISC Dynamic Host Configuration Protocol server
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
|
||||
SUBSYS?= server
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
MD5 (dhcp-3.0.3.tar.gz) = f91416a0b8ed3fd0601688cf0b7df58f
|
||||
SHA256 (dhcp-3.0.3.tar.gz) = c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe
|
||||
SIZE (dhcp-3.0.3.tar.gz) = 870240
|
||||
MD5 (dhcp-3.0.3-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.3-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.3-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.3-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.3-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.3-dlq-patch) = 7655
|
||||
MD5 (dhcp-3.0.4.tar.gz) = 004ef935fd54b8046b16bdde31a9e151
|
||||
SHA256 (dhcp-3.0.4.tar.gz) = 89171155b7a9225f5eb81c83ff63f071168b87eacab05fb859b8397d36809bf7
|
||||
SIZE (dhcp-3.0.4.tar.gz) = 883245
|
||||
MD5 (dhcp-3.0.4-ldap-patch) = ad88faab5a2d134d7e96e9a984d6535b
|
||||
SHA256 (dhcp-3.0.4-ldap-patch) = e90aecfd57f4a60fb7775b72a73e637c8b481fea5c34956bf95bd0b39b1441be
|
||||
SIZE (dhcp-3.0.4-ldap-patch) = 154663
|
||||
MD5 (dhcp-3.0.4-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
|
||||
SHA256 (dhcp-3.0.4-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
|
||||
SIZE (dhcp-3.0.4-dlq-patch) = 7655
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- client/clparse.c.orig Mon Feb 10 01:39:57 2003
|
||||
+++ client/clparse.c Wed Mar 3 01:35:39 2004
|
||||
@@ -785,7 +785,7 @@
|
||||
if (status != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't record interface %s: %s",
|
||||
name, isc_result_totext (status));
|
||||
- strcpy (ip -> name, name);
|
||||
--- client/clparse.c.orig Sat May 6 17:42:49 2006
|
||||
+++ client/clparse.c Sat May 6 17:43:12 2006
|
||||
@@ -777,7 +777,7 @@
|
||||
interface_dereference(&ip, MDL);
|
||||
return 0;
|
||||
}
|
||||
- strcpy(ip->name, name);
|
||||
+ strlcpy (ip -> name, name, IFNAMSIZ);
|
||||
|
||||
if (dummy_interfaces) {
|
||||
interface_reference (&ip -> next,
|
||||
dummy_interfaces, MDL);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- client/dhclient.8.orig Sun Nov 17 03:25:43 2002
|
||||
+++ client/dhclient.8 Wed Mar 3 02:06:52 2004
|
||||
@@ -18,6 +18,10 @@
|
||||
--- client/dhclient.8.orig Wed Sep 14 18:03:33 2005
|
||||
+++ client/dhclient.8 Sat May 6 17:30:28 2006
|
||||
@@ -23,6 +23,10 @@
|
||||
.\"
|
||||
.\" from Id: dhclient.8,v 1.12.2.8 2004/06/10 17:59:12 dhankins Exp
|
||||
.\" $Id: dhclient.8,v 1.12.2.11 2005/09/14 16:03:33 dhankins Exp $
|
||||
.\"
|
||||
+.\" Portions copyright (c) 2000 David E. O'Brien.
|
||||
+.\" All rights reserved.
|
||||
|
@ -11,7 +11,7 @@
|
|||
.TH dhclient 8
|
||||
.SH NAME
|
||||
dhclient - Dynamic Host Configuration Protocol Client
|
||||
@@ -28,12 +32,18 @@
|
||||
@@ -33,6 +37,9 @@
|
||||
.I port
|
||||
]
|
||||
[
|
||||
|
@ -21,6 +21,7 @@
|
|||
.B -d
|
||||
]
|
||||
[
|
||||
@@ -43,6 +50,9 @@
|
||||
.B -q
|
||||
]
|
||||
[
|
||||
|
@ -30,7 +31,7 @@
|
|||
.B -1
|
||||
]
|
||||
[
|
||||
@@ -64,6 +74,10 @@
|
||||
@@ -73,6 +83,10 @@
|
||||
relay
|
||||
]
|
||||
[
|
||||
|
@ -41,7 +42,7 @@
|
|||
.B -n
|
||||
]
|
||||
[
|
||||
@@ -148,6 +162,15 @@
|
||||
@@ -157,6 +171,15 @@
|
||||
configuration file or on the command line, and will ignore all other
|
||||
interfaces.
|
||||
.PP
|
||||
|
@ -57,7 +58,7 @@
|
|||
If the DHCP client should listen and transmit on a port other than the
|
||||
standard (port 68), the
|
||||
.B -p
|
||||
@@ -171,6 +194,12 @@
|
||||
@@ -180,6 +203,12 @@
|
||||
flag, followed by the IP address to send. This is only useful for testing,
|
||||
and should not be expected to work in any consistent or useful way.
|
||||
.PP
|
||||
|
@ -70,7 +71,7 @@
|
|||
The DHCP client will normally run in the foreground until it has
|
||||
configured an interface, and then will revert to running in the
|
||||
background. To run force dhclient to always run as a foreground
|
||||
@@ -188,6 +217,10 @@
|
||||
@@ -206,6 +235,10 @@
|
||||
.B -q
|
||||
flag prevents any messages other than errors from being printed to the
|
||||
standard error descriptor.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- client/dhclient.c.orig Wed Nov 24 18:39:14 2004
|
||||
+++ client/dhclient.c Tue Mar 8 14:06:59 2005
|
||||
--- client/dhclient.c.orig Thu Apr 27 23:38:29 2006
|
||||
+++ client/dhclient.c Sat May 6 17:34:55 2006
|
||||
@@ -38,6 +38,13 @@
|
||||
#include "dhcpd.h"
|
||||
#include "version.h"
|
||||
|
@ -58,11 +58,11 @@
|
|||
/* do not exit if there are no broadcast interfaces. */
|
||||
persist = 1;
|
||||
@@ -215,7 +241,16 @@
|
||||
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||
log_fatal ("%s: interface name too long (max %ld)",
|
||||
argv [i], (long)strlen (argv [i]));
|
||||
- strcpy (tmp -> name, argv [i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
if (strlen(argv[i]) >= sizeof(tmp->name))
|
||||
log_fatal("%s: interface name too long (is %ld)",
|
||||
argv [i], (long)strlen(argv[i]));
|
||||
- strcpy(tmp->name, argv[i]);
|
||||
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
|
||||
+#if __FreeBSD_version > 502010
|
||||
+ set_ieee80211 (tmp);
|
||||
+#endif
|
||||
|
@ -119,7 +119,7 @@
|
|||
"[-pf pid-file] [-e VAR=val]");
|
||||
log_fatal (" [-sf script-file] [interface]");
|
||||
}
|
||||
@@ -881,6 +931,15 @@
|
||||
@@ -879,6 +929,15 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
|
@ -135,7 +135,7 @@
|
|||
/* Replace the old active lease with the new one. */
|
||||
if (client -> active)
|
||||
destroy_client_lease (client -> active);
|
||||
@@ -895,6 +954,12 @@
|
||||
@@ -893,6 +952,12 @@
|
||||
piaddr (client -> active -> address),
|
||||
(long)(client -> active -> renewal - cur_time));
|
||||
client -> state = S_BOUND;
|
||||
|
@ -148,7 +148,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
if (client -> config -> do_forward_update) {
|
||||
@@ -1359,6 +1424,11 @@
|
||||
@@ -1357,6 +1422,11 @@
|
||||
int interval;
|
||||
int increase = 1;
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
|||
/* Figure out how long it's been since we started transmitting. */
|
||||
interval = cur_time - client -> first_sending;
|
||||
|
||||
@@ -1464,6 +1534,9 @@
|
||||
@@ -1457,6 +1527,9 @@
|
||||
struct client_lease *loop;
|
||||
struct client_lease *lp;
|
||||
|
||||
|
@ -170,7 +170,7 @@
|
|||
loop = lp = client -> active;
|
||||
|
||||
log_info ("No DHCPOFFERS received.");
|
||||
@@ -1496,6 +1569,10 @@
|
||||
@@ -1489,6 +1562,10 @@
|
||||
log_info ("bound: renewal in %ld %s.",
|
||||
(long)(client -> active -> renewal -
|
||||
cur_time), "seconds");
|
||||
|
@ -181,7 +181,7 @@
|
|||
add_timeout (client -> active -> renewal,
|
||||
state_bound, client, 0, 0);
|
||||
} else {
|
||||
@@ -1503,6 +1580,11 @@
|
||||
@@ -1496,6 +1573,11 @@
|
||||
log_info ("bound: immediate renewal.");
|
||||
state_bound (client);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@
|
|||
reinitialize_interfaces ();
|
||||
go_daemon ();
|
||||
return;
|
||||
@@ -1548,6 +1630,12 @@
|
||||
@@ -1541,6 +1623,12 @@
|
||||
}
|
||||
|
||||
log_info ("No working leases in persistent database - sleeping.");
|
||||
|
@ -206,7 +206,7 @@
|
|||
script_init (client, "FAIL", (struct string_list *)0);
|
||||
if (client -> alias)
|
||||
script_write_params (client, "alias_", client -> alias);
|
||||
@@ -1689,6 +1777,18 @@
|
||||
@@ -1682,6 +1770,18 @@
|
||||
client -> packet.secs = htons (65535);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@
|
|||
log_info ("DHCPREQUEST on %s to %s port %d",
|
||||
client -> name ? client -> name : client -> interface -> name,
|
||||
inet_ntoa (destination.sin_addr),
|
||||
@@ -1710,6 +1810,16 @@
|
||||
@@ -1703,6 +1803,16 @@
|
||||
from, &destination,
|
||||
(struct hardware *)0);
|
||||
|
||||
|
@ -242,7 +242,7 @@
|
|||
add_timeout (cur_time + client -> interval,
|
||||
send_request, client, 0, 0);
|
||||
}
|
||||
@@ -2607,6 +2717,13 @@
|
||||
@@ -2600,6 +2710,13 @@
|
||||
wstatus = 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -256,7 +256,7 @@
|
|||
execve (scriptName, argv, envp);
|
||||
log_error ("execve (%s, ...): %m", scriptName);
|
||||
exit (0);
|
||||
@@ -2793,8 +2910,10 @@
|
||||
@@ -2786,8 +2903,10 @@
|
||||
case S_STOPPED:
|
||||
break;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -3022,7 +3141,9 @@
|
||||
@@ -3015,7 +3134,9 @@
|
||||
break;
|
||||
|
||||
case server_awaken:
|
||||
|
@ -277,7 +277,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
@@ -3160,3 +3281,265 @@
|
||||
@@ -3153,3 +3274,265 @@
|
||||
data_string_forget (&ddns_dhcid, MDL);
|
||||
return rcode;
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
--- common/parse.c.orig 2 Sep 2003 11:01:23 -0000
|
||||
+++ common/parse.c 22 Feb 2004 10:44:52 -0000
|
||||
@@ -414,6 +414,7 @@
|
||||
{
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
+ int32_t num;
|
||||
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
@@ -421,9 +422,9 @@
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
|
||||
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
|
||||
/* Unswap the number - convert_num returns stuff in NBO. */
|
||||
- *timep = ntohl (*timep); /* XXX */
|
||||
+ *timep = ntohl (num);
|
||||
|
||||
parse_semi (cfile);
|
||||
}
|
Loading…
Add table
Reference in a new issue