aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/client
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2004-06-26 10:34:24 +0000
committerMartin Blapp <mbr@FreeBSD.org>2004-06-26 10:34:24 +0000
commita838a2f0bb98e3688c176887d3eff90d1e3c6354 (patch)
tree40e3f7a1fd568e909f483804a6cc93f08d2a10d0 /contrib/isc-dhcp/client
parent92633f6fc8cacd902d4017e2c2f2739879691b00 (diff)
downloadsrc-a838a2f0bb98e3688c176887d3eff90d1e3c6354.tar.gz
src-a838a2f0bb98e3688c176887d3eff90d1e3c6354.zip
Import ISC DHCP 3.0.1 RC14 client.
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=131136
Diffstat (limited to 'contrib/isc-dhcp/client')
-rw-r--r--contrib/isc-dhcp/client/Makefile.dist30
-rw-r--r--contrib/isc-dhcp/client/clparse.c61
-rw-r--r--contrib/isc-dhcp/client/dhclient-script.857
-rw-r--r--contrib/isc-dhcp/client/dhclient.839
-rw-r--r--contrib/isc-dhcp/client/dhclient.c80
-rw-r--r--contrib/isc-dhcp/client/dhclient.conf.560
-rw-r--r--contrib/isc-dhcp/client/dhclient.leases.558
-rwxr-xr-xcontrib/isc-dhcp/client/scripts/freebsd4
8 files changed, 184 insertions, 205 deletions
diff --git a/contrib/isc-dhcp/client/Makefile.dist b/contrib/isc-dhcp/client/Makefile.dist
index d997dcf61132..c12396329511 100644
--- a/contrib/isc-dhcp/client/Makefile.dist
+++ b/contrib/isc-dhcp/client/Makefile.dist
@@ -1,21 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-2002 Internet Software Consortium.
-# Use is subject to license terms which appear in the file named
-# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
-# file, or you are not sure the one you have is correct, you may
-# obtain an applicable copy of the license at:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# This file is part of the ISC DHCP distribution. The documentation
-# associated with this file is listed in the file DOCUMENTATION,
-# included in the top-level directory of this release.
-#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
dhclient.leases.cat5
diff --git a/contrib/isc-dhcp/client/clparse.c b/contrib/isc-dhcp/client/clparse.c
index c0c18662d4c4..e17b970e6933 100644
--- a/contrib/isc-dhcp/client/clparse.c
+++ b/contrib/isc-dhcp/client/clparse.c
@@ -3,39 +3,30 @@
Parser for dhclient config and lease files... */
/*
- * Copyright (c) 1996-2002 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.62.2.4 2003/02/10 00:39:57 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.62.2.6 2004/06/10 17:59:11 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -839,7 +830,7 @@ void parse_client_lease_statement (cfile, is_static)
struct parse *cfile;
int is_static;
{
- struct client_lease *lease, *lp, *pl;
+ struct client_lease *lease, *lp, *pl, *next;
struct interface_info *ip = (struct interface_info *)0;
int token;
const char *val;
@@ -899,17 +890,19 @@ void parse_client_lease_statement (cfile, is_static)
lease list looking for a lease with the same address, and
if we find it, toss it. */
pl = (struct client_lease *)0;
- for (lp = client -> leases; lp; lp = lp -> next) {
+ for (lp = client -> leases; lp; lp = next) {
+ next = lp -> next;
if (lp -> address.len == lease -> address.len &&
!memcmp (lp -> address.iabuf, lease -> address.iabuf,
lease -> address.len)) {
if (pl)
- pl -> next = lp -> next;
+ pl -> next = next;
else
- client -> leases = lp -> next;
+ client -> leases = next;
destroy_client_lease (lp);
break;
- }
+ } else
+ pl = lp;
}
/* If this is a preloaded lease, just put it on the list of recorded
diff --git a/contrib/isc-dhcp/client/dhclient-script.8 b/contrib/isc-dhcp/client/dhclient-script.8
index 04a51f1281df..d81cf41170d5 100644
--- a/contrib/isc-dhcp/client/dhclient-script.8
+++ b/contrib/isc-dhcp/client/dhclient-script.8
@@ -1,41 +1,34 @@
.\" dhclient-script.8
.\"
-.\" Copyright (c) 1996-2002 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhclient-script.8,v 1.8.2.4 2002/11/17 02:25:43 dhankins Exp $
+.\" $Id: dhclient-script.8,v 1.8.2.5 2004/06/10 17:59:12 dhankins Exp $
.\"
.TH dhclient-script 8
.SH NAME
@@ -200,8 +193,8 @@ $new_static_routes, but current scripts do not do this.
.SH FILES
Each operating system should generally have its own script file,
although the script files for similar operating systems may be similar
-or even identical. The script files included in the Internet
-Software Consortium DHCP distribution appear in the distribution tree
+or even identical. The script files included in Internet
+Systems Consortium DHCP distribution appear in the distribution tree
under client/scripts, and bear the names of the operating systems on
which they are intended to work.
.SH BUGS
@@ -218,9 +211,9 @@ dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
dhclient.leases(5).
.SH AUTHOR
.B dhclient-script(8)
-has been written for the Internet Software Consortium
+has been written for Internet Systems Consortium
by Ted Lemon in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+Enterprises. To learn more about Internet Systems Consortium,
see
.B http://www.isc.org.
To learn more about Vixie
diff --git a/contrib/isc-dhcp/client/dhclient.8 b/contrib/isc-dhcp/client/dhclient.8
index 642070008e15..fd98d07877ca 100644
--- a/contrib/isc-dhcp/client/dhclient.8
+++ b/contrib/isc-dhcp/client/dhclient.8
@@ -1,22 +1,27 @@
.\" dhclient.8
.\"
-.\" Copyright (c) 1996-2002 Internet Software Consortium.
-.\" Use is subject to license terms which appear in the file named
-.\" ISC-LICENSE that should have accompanied this file when you
-.\" received it. If a file named ISC-LICENSE did not accompany this
-.\" file, or you are not sure the one you have is correct, you may
-.\" obtain an applicable copy of the license at:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" http://www.isc.org/isc-license-1.0.html.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" This file is part of the ISC DHCP distribution. The documentation
-.\" associated with this file is listed in the file DOCUMENTATION,
-.\" included in the top-level directory of this release.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" Support and other services are available for ISC products - see
-.\" http://www.isc.org for more information.
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
-.\" $Id: dhclient.8,v 1.12.2.7 2002/11/17 02:25:43 dhankins Exp $
+.\" $Id: dhclient.8,v 1.12.2.8 2004/06/10 17:59:12 dhankins Exp $
.\"
.TH dhclient 8
.SH NAME
@@ -79,7 +84,7 @@ relay
]
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Client, dhclient, provides a
+The Internet Systems Consortium DHCP Client, dhclient, provides a
means for configuring one or more network interfaces using the Dynamic
Host Configuration Protocol, BOOTP protocol, or if these protocols
fail, by statically assigning an address.
@@ -289,9 +294,9 @@ dhcpd(8), dhcrelay(8), dhclient-script (8), dhclient.conf(5),
dhclient.leases(5).
.SH AUTHOR
.B dhclient(8)
-has been written for the Internet Software Consortium
+has been written for Internet Systems Consortium
by Ted Lemon in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+Enterprises. To learn more about Internet Systems Consortium,
see
.B http://www.isc.org
To learn more about Vixie
@@ -304,7 +309,7 @@ Stanford.
.PP
The current version owes much to Elliot's Linux enhancements, but
was substantially reorganized and partially rewritten by Ted Lemon
-so as to use the same networking framework that the Internet Software
+so as to use the same networking framework that the Internet Systems
Consortium DHCP server uses. Much system-specific configuration code
was moved into a shell script so that as support for more operating
systems is added, it will not be necessary to port and maintain
diff --git a/contrib/isc-dhcp/client/dhclient.c b/contrib/isc-dhcp/client/dhclient.c
index 817a9e258285..c4136cbed81e 100644
--- a/contrib/isc-dhcp/client/dhclient.c
+++ b/contrib/isc-dhcp/client/dhclient.c
@@ -3,35 +3,26 @@
DHCP Client. */
/*
- * Copyright (c) 1995-2002 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
* This code is based on the original client state machine that was
* written by Elliot Poger. The code has been extensively hacked on
@@ -41,7 +32,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.129.2.16 2003/04/26 21:51:39 dhankins Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.129.2.18 2004/06/10 17:59:12 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -71,9 +62,9 @@ struct in_addr giaddr;
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
-static char copyright[] = "Copyright 1995-2002 Internet Software Consortium.";
+static char copyright[] = "Copyright 2004 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Client";
+static char message [] = "Internet Systems Consortium DHCP Client";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
u_int16_t local_port=0;
@@ -793,11 +784,15 @@ void dhcpack (packet)
/* If it wasn't specified by the server, calculate it. */
if (!client -> new -> renewal)
- client -> new -> renewal =
- client -> new -> expiry / 2;
+ client -> new -> renewal = client -> new -> expiry / 2 + 1;
+
+ if (client -> new -> renewal <= 0)
+ client -> new -> renewal = TIME_MAX;
/* Now introduce some randomness to the renewal time: */
- client -> new -> renewal = (((client -> new -> renewal + 3) * 3 / 4) +
+ if (client -> new -> renewal <= TIME_MAX / 3 - 3)
+ client -> new -> renewal =
+ (((client -> new -> renewal + 3) * 3 / 4) +
(random () % /* XXX NUMS */
((client -> new -> renewal + 3) / 4)));
@@ -816,14 +811,25 @@ void dhcpack (packet)
} else
client -> new -> rebind = 0;
- if (!client -> new -> rebind)
- client -> new -> rebind =
- (client -> new -> expiry * 7) / 8; /* XXX NUMS */
+ if (client -> new -> rebind <= 0) {
+ if (client -> new -> expiry <= TIME_MAX / 7)
+ client -> new -> rebind =
+ client -> new -> expiry * 7 / 8;
+ else
+ client -> new -> rebind =
+ client -> new -> expiry / 8 * 7;
+ }
/* Make sure our randomness didn't run the renewal time past the
rebind time. */
- if (client -> new -> renewal > client -> new -> rebind)
- client -> new -> renewal = (client -> new -> rebind * 3) / 4;
+ if (client -> new -> renewal > client -> new -> rebind) {
+ if (client -> new -> rebind <= TIME_MAX / 3)
+ client -> new -> renewal =
+ client -> new -> rebind * 3 / 4;
+ else
+ client -> new -> renewal =
+ client -> new -> rebind / 4 * 3;
+ }
client -> new -> expiry += cur_time;
/* Lease lengths can never be negative. */
diff --git a/contrib/isc-dhcp/client/dhclient.conf.5 b/contrib/isc-dhcp/client/dhclient.conf.5
index 9b3b20003227..f058c58f9a00 100644
--- a/contrib/isc-dhcp/client/dhclient.conf.5
+++ b/contrib/isc-dhcp/client/dhclient.conf.5
@@ -1,49 +1,39 @@
-.\" dhclient.conf.5
+.\" $Id: dhclient.conf.5,v 1.12.2.10 2004/06/10 17:59:13 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2002 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Software Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Software Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
-.\"
-.\" $Id: dhclient.conf.5,v 1.12.2.9 2003/02/23 03:27:26 dhankins Exp $
-.\"
.TH dhclient.conf 5
.SH NAME
dhclient.conf - DHCP client configuration file
.SH DESCRIPTION
The dhclient.conf file contains configuration information for
.IR dhclient,
-the Internet Software Consortium DHCP Client.
+the Internet Systems Consortium DHCP Client.
.PP
The dhclient.conf file is a free-form ASCII text file. It is parsed by
the recursive-descent parser built into dhclient. The file may contain
@@ -495,7 +485,7 @@ second also a number between 0 and 59.
Some DHCP clients running TCP/IP roaming protocols may require that in
addition to the lease they may acquire via DHCP, their interface also
be configured with a predefined IP alias so that they can have a
-permanent IP address even while roaming. The Internet Software
+permanent IP address even while roaming. The Internet Systems
Consortium DHCP client doesn't support roaming with fixed addresses
directly, but in order to facilitate such experimentation, the dhcp
client can be set up to configure an IP alias using the
@@ -627,6 +617,6 @@ RFC2131.
.B dhclient(8)
was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
.B http://www.isc.org.
diff --git a/contrib/isc-dhcp/client/dhclient.leases.5 b/contrib/isc-dhcp/client/dhclient.leases.5
index 542654f60e48..204a80053416 100644
--- a/contrib/isc-dhcp/client/dhclient.leases.5
+++ b/contrib/isc-dhcp/client/dhclient.leases.5
@@ -1,48 +1,36 @@
-.\" dhclient.conf.5
+.\" $Id: dhclient.leases.5,v 1.2.4.4 2004/06/10 17:59:13 dhankins Exp $
.\"
-.\" Copyright (c) 1997-2002 The Internet Software Consortium.
-.\" All rights reserved.
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1997-2003 by Internet Software Consortium
.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie
-.\" Enterprises. To learn more about the Internet Software Consortium,
+.\" Enterprises. To learn more about Internet Systems Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
-.\"
-.\" $Id: dhclient.leases.5,v 1.2.4.3 2002/11/17 02:25:44 dhankins Exp $
-.\"
.TH dhclient.leases 5
.SH NAME
dhclient.leases - DHCP client lease database
.SH DESCRIPTION
-The Internet Software Consortium DHCP client keeps a persistent
+The Internet Systems Consortium DHCP client keeps a persistent
database of leases that it has acquired that are still valid. The
database is a free-form ASCII file containing one valid declaration
per lease. If more than one declaration appears for a given lease,
@@ -60,6 +48,6 @@ dhcpd.conf(5), RFC2132, RFC2131.
.B dhclient(8)
was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
.B http://www.isc.org.
diff --git a/contrib/isc-dhcp/client/scripts/freebsd b/contrib/isc-dhcp/client/scripts/freebsd
index 824efae1e68a..4c6ebfdd1777 100755
--- a/contrib/isc-dhcp/client/scripts/freebsd
+++ b/contrib/isc-dhcp/client/scripts/freebsd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: freebsd,v 1.13.2.5 2003/04/27 19:44:01 dhankins Exp $
+# $Id: freebsd,v 1.13.2.6 2003/09/12 19:31:03 dhankins Exp $
#
# $FreeBSD$
@@ -16,7 +16,7 @@ make_resolv_conf() {
( echo search $new_domain_name >/etc/resolv.conf )
exit_status=$?
else
- rm /etc/resolv.conf
+ ( rm /etc/resolv.conf )
exit_status=$?
fi
if [ $exit_status -ne 0 ]; then