Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/dhcp Pull up revision 1.9 (requested by mellon):



details:   https://anonhg.NetBSD.org/src/rev/1aa7867d87ff
branches:  netbsd-1-5
changeset: 491112:1aa7867d87ff
user:      he <he%NetBSD.org@localhost>
date:      Wed Apr 04 20:56:40 2001 +0000

description:
Pull up revision 1.9 (requested by mellon):
  Update DHCP software to ISC version 3, Beta 2, Patchlevel 23.

diffstat:

 usr.sbin/dhcp/relay/dhcrelay.c |  24 +++++++++-----
 usr.sbin/dhcp/server/dhcpd.8   |  68 +++++++++++++++++++++++++++++++++--------
 2 files changed, 70 insertions(+), 22 deletions(-)

diffs (155 lines):

diff -r b0f29a7366db -r 1aa7867d87ff usr.sbin/dhcp/relay/dhcrelay.c
--- a/usr.sbin/dhcp/relay/dhcrelay.c    Wed Apr 04 20:56:37 2001 +0000
+++ b/usr.sbin/dhcp/relay/dhcrelay.c    Wed Apr 04 20:56:40 2001 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcrelay.c,v 1.4.2.2 2000/10/18 04:11:35 tv Exp $ Copyright (c) 1997-2000 Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.4.2.3 2001/04/04 20:56:40 he Exp $ Copyright (c) 1997-2000 Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -135,6 +135,15 @@
        setlogmask (LOG_UPTO (LOG_INFO));
 #endif 
 
+       /* Set up the OMAPI. */
+       status = omapi_init ();
+       if (status != ISC_R_SUCCESS)
+               log_fatal ("Can't initialize OMAPI: %s",
+                          isc_result_totext (status));
+
+       /* Set up the OMAPI wrappers for the interface object. */
+       interface_setup ();
+
        for (i = 1; i < argc; i++) {
                if (!strcmp (argv [i], "-p")) {
                        if (++i == argc)
@@ -190,6 +199,9 @@
                        drop_agent_mismatches = 1;
                } else if (argv [i][0] == '-') {
                    usage ();
+               } else if (!strcmp (argv [i], "--version")) {
+                       log_info ("isc-dhcrelay-%s", DHCP_VERSION);
+                       exit (0);
                } else {
                        struct hostent *he;
                        struct in_addr ia, *iap = (struct in_addr *)0;
@@ -260,12 +272,6 @@
        /* Get the current time... */
        GET_TIME (&cur_time);
 
-       /* Set up the OMAPI. */
-       status = omapi_init ();
-       if (status != ISC_R_SUCCESS)
-               log_fatal ("Can't initialize OMAPI: %s",
-                          isc_result_totext (status));
-
        /* Discover all the network interfaces. */
        discover_interfaces (DISCOVER_RELAY);
 
@@ -813,8 +819,8 @@
        /* Relay option's total length shouldn't ever get to be more than
           257 bytes. */
        if (sp - op > 257)
-               log_fatal ("total agent option length exceeds 257 (%d) on %s\n",
-                      sp - op, ip -> name);
+           log_fatal ("total agent option length exceeds 257 (%ld) on %s\n",
+                      (long)(sp - op), ip -> name);
 
        /* Calculate length of RAI option. */
        op [1] = sp - op - 2;
diff -r b0f29a7366db -r 1aa7867d87ff usr.sbin/dhcp/server/dhcpd.8
--- a/usr.sbin/dhcp/server/dhcpd.8      Wed Apr 04 20:56:37 2001 +0000
+++ b/usr.sbin/dhcp/server/dhcpd.8      Wed Apr 04 20:56:40 2001 +0000
@@ -1,20 +1,39 @@
 .\"    dhcpd.8
 .\"
-.\" Copyright (c) 1996-1999 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) 1996-2001 Internet Software Consortium.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 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.
 .\"
-.\"             http://www.isc.org/isc-license-1.0.html. 
+.\" 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.
 .\"
-.\" 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.
+.\" This software has been written for the Internet Software Consortium
+.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
+.\" To learn more about the 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''.
 .TH dhcpd 8
 .SH NAME
 dhcpd - Dynamic Host Configuration Protocol Server
@@ -47,6 +66,14 @@
 .I lease-file
 ]
 [
+.B -tf
+.I trace-output-file
+]
+[
+.B -play
+.I trace-playback-file
+]
+[
 .I if0
 [
 .I ...ifN
@@ -190,6 +217,21 @@
 The
 .B -T
 flag can be used to test the lease database file in a similar way.
+.PP
+The \fB-tf\fR and \fB-play\fR options allow you to specify a file into
+which the entire startup state of the server and all the transactions
+it processes are either logged or played back from.  This can be
+useful in submitting bug reports - if you are getting a core dump
+every so often, you can start the server with the \fB-tf\fR option and
+then, when the server dumps core, the trace file will contain all the
+transactions that led up to it dumping core, so that the problem can
+be easily debugged with \fB-play\fR.
+.PP
+The \fB-play\fR option must be specified with an alternate lease file,
+using the \fB-lf\fR switch, so that the DHCP server doesn't wipe out
+your existing lease file with its test data.  The DHCP server will
+refuse to operate in playback mode unless you specify an alternate
+lease file.
 .SH CONFIGURATION
 The syntax of the dhcpd.conf(5) file is discussed seperately.   This
 section should be used as an overview of the configuration process,



Home | Main Index | Thread Index | Old Index