]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Pull up changes in Patchlevel 19
authorTed Lemon <source@isc.org>
Fri, 26 Mar 1999 19:19:46 +0000 (19:19 +0000)
committerTed Lemon <source@isc.org>
Fri, 26 Mar 1999 19:19:46 +0000 (19:19 +0000)
14 files changed:
Makefile.conf
README
RELNOTES
client/clparse.c
client/dhclient.c
common/discover.c
common/lpf.c
common/packet.c
common/upf.c
configure
includes/cf/aix.h [new file with mode: 0644]
includes/osdep.h
server/confpars.c
server/dhcpd.conf.5

index 361165f6a0e9af053bec2f04f7de3099a80cd6f0..29345cae6079ba9c42a80389642b7a8875f2e836 100644 (file)
@@ -45,7 +45,19 @@ VARDB = /var/db
 # removes the comment characters from the appropriate set of
 # assignments, and writes the output to Makefile.
 
-## NEXTSTEP 3.x,4.x
+## AIX 4.1.5.0
+##--aix--
+#CF = cf/aix.h
+#CC=cc -Daix
+#INSTALL=/usr/ucb/install
+#MANINSTALL=/usr/ucb/install
+#ADMMANEXT = .8
+#FFMANEXT = .5
+#VARRUN = /etc
+#VARDB = /etc
+##--aix--
+
+ NEXTSTEP 3.x,4.x
 ##--nextstep--
 #LIBS =
 #CF = cf/nextstep.h
@@ -115,7 +127,6 @@ VARDB = /var/db
 #CF = cf/alphaosf.h
 #ADMMANEXT = .8
 #FFMANEXT = .5
-#VARRUN = /etc
 #VARDB = /etc
 ##--alphaosf--
 
diff --git a/README b/README
index 275d5d1637c1dedce7de805eecede87d05081431..81c2beb89588e0fdd15bc0fbddd834df9fd28eae 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
                     Internet Software Consortium
           Dynamic Host Configuration Protocol Distribution
                      Version 3, Alpha Snapshot
-                           March 15, 1998
+                           March 26, 1998
 
 This is an alpha test snapshot of Version 3 of the Internet Software
 Consortium DHCP Distribution.  In version 3, this distribution
@@ -10,6 +10,51 @@ This alpha is believed to be relatively stable, but it is definitely
 not something you should be running in a production environment where
 stability is your highest priority.
 
+                           DOCUMENTATION
+
+Documentation for this software includes this README file, the
+RELNOTES file, and the manual pages, which are in the server, common,
+client and relay subdirectories.  Internet standards relating to the
+DHCP protocol are stored in the doc subdirectory.  You will have the
+best luck reading the manual pages if you build this software and then
+install it, although you can read them directly out of the
+distribution if you need to.
+
+DHCP server documentation is in the dhcpd man page.  Information about
+the DHCP server lease database is in the dhcpd.leases man page.
+Server configuration documentation is in the dhcpd.conf man page as
+well as the dhcp-options man page.   A sample DHCP server
+configuration is in the file server/dhcpd.conf.
+
+DHCP Client documentation is in the dhclient man page.  DHCP client
+configuration documentation is in the dhclient.conf man page and the
+dhcp-options man page.  The DHCP client configuration script is
+documented in the dhclient-script man page.   The format of the DHCP
+client lease database is documented in the dhclient.leases man page.
+
+DHCP relay agent documentation is in the dhcrelay man page.
+
+To read installed manual pages, use the man command.  Type "man page"
+where page is the name of the manual page.
+
+If you want to read manual pages that aren't installed, you can type
+``nroff -man page |more'' where page is the filename of the
+unformatted manual page.  The filename of an unformatted manual page
+is the name of the manual page, followed by '.', followed by some
+number - 5 for documentation about files, and 8 for documentation
+about programs.
+
+If you do not have the nroff command, you can type ``more catpage''
+where catpage is the filename of the catted man page.  Catted man
+pages names are the name of the manual page followed by ".cat"
+followed by 5 or 8, as with unformatted manual pages.
+
+Please note that until you install the manual pages, the pathnames of
+files to which they refer will not be correct for your operating
+system.
+
+                           RELEASE STATUS
+
 In this release, the server and relay agent currently work well on
 NetBSD, Linux, FreeBSD, BSD/OS, Ultrix, Digital Alpha OSF/1, and SunOS
 4.1.4.  They can also be run usefully on Solaris as long as only one
@@ -46,9 +91,9 @@ information.   On Digital Unix, type ``man pfilt''.
 To build the DHCP Distribution, unpack the compressed tar file using
 the tar utility and the gzip command - type something like:
 
-       zcat dhcp-3.0-alpha-19990315.tar.gz |tar xvf -
+       zcat dhcp-3.0-alpha-19990326.tar.gz |tar xvf -
 
-Now, cd to the dhcp-3.0-alpha-19990315 subdirectory that you've just
+Now, cd to the dhcp-3.0-alpha-19990326 subdirectory that you've just
 created and configure the source tree by typing:
 
                ./configure
index ac983eeadfd8485294b7767f16f935b4c351d003..a45deafb64704d4a4a7a021979a8675a4856d916 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,7 +1,7 @@
                     Internet Software Consortium
           Dynamic Host Configuration Protocol Distribution
                      Version 3, Alpha Snapshot
-                         March 15, 1999
+                         March 26, 1999
 
                            Release Notes
 
@@ -55,6 +55,58 @@ pretty decent chance it will do something other than what you expect
 when you try to use it.  Pointing out inconsistencies between the
 documentation and the source code will always be appreciated.
 
+                    Changes since March 15, 1999
+
+- Support added for AIX 4.1.5.0 (and hopefully other versions).
+
+- Use /var/run instead of /etc on Digital Unix.
+
+- Change DHCP client exponential backoff code to back off more slowly,
+  so that it is more robust in lossy environments, at the expense of
+  being a bit less polite to the server.
+
+- Don't request a specific lease interval in the client unless the
+  user says to do so.
+
+- Don't print DHCPXXX in wrong xxx messages unless DEBUG is defined.
+
+- Fix handling of secs field.
+
+- Fix handling of append statement.
+
+- Fix documentation for append and prepend statements.
+
+- Fix server support for parameter request list and maximum message
+  size.
+
+- Parameterize more hardware types in discover_interfaces.   Check for
+  IFF_BROADCAST instead of !IFF_POINTOPOINT
+
+- Print kernel configuration warning message if we get EINVAL when
+  opening or configuring the Linux packet filter.
+
+- Fix a bug in UDP checksum code (thanks to John Nemeth for figuring
+  this out) and re-enable UDP checksumming.   This allows the client
+  to work with some buggy DHCP servers that can't handle zero
+  checksums in the UDP header - in particular, the one John's cable
+  modem ISP is using.
+
+- Don't report packet header checksum errors unless we see a lot of
+  them.   It's perfectly normal for some number of checksum errors to
+  occur.
+
+- Refer to the dhcpd.leases man page when printing an error message
+  prior to exiting because there's no lease database.
+
+- Add information to the README telling the reader how to get to the
+  manual pages.
+
+- Fix the server packet transmission code to unicast when it can.
+
+- Fix a typo in the dhcpd.conf manual page.
+
+
+
                      CHANGES SINCE VERSION 2.0
 
 - Support for conditional behaviour - i.e., what the client sends can
index 908fb4773cd1395905dd3265f7d3d5776b3f4699..857d39394e994582a19f3bbfeff4eddfd08cd7fa 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: clparse.c,v 1.29 1999/03/25 21:45:55 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: clparse.c,v 1.30 1999/03/26 19:19:43 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -71,12 +71,11 @@ int read_client_conf ()
        top_level_config.select_interval = 0;
        top_level_config.reboot_timeout = 10;
        top_level_config.retry_interval = 300;
-       top_level_config.backoff_cutoff = 120;
-       top_level_config.initial_interval = 10;
+       top_level_config.backoff_cutoff = 15;
+       top_level_config.initial_interval = 3;
        top_level_config.bootp_policy = P_ACCEPT;
        top_level_config.script_name = "/etc/dhclient-script";
        top_level_config.requested_options = default_requested_options;
-       top_level_config.requested_lease = 7200;
 
        top_level_config.on_receipt = new_group ("read_client_conf");
        if (!top_level_config.on_receipt)
index 2704c874baffc86e3e529198c604cb391ef30093..6e41b4d7f6ea89fd23e40a9f86f221eff45848bc 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.63 1999/03/25 21:51:29 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.64 1999/03/26 19:19:43 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -475,7 +475,9 @@ void dhcpack (packet)
             packet -> raw -> hlen) ||
            (memcmp (packet -> interface -> hw_address.haddr,
                     packet -> raw -> chaddr, packet -> raw -> hlen))) {
+#if defined (DEBUG)
                log_debug ("DHCPACK in wrong transaction.");
+#endif
                return;
        }
 
@@ -483,7 +485,9 @@ void dhcpack (packet)
            client -> state != S_REQUESTING &&
            client -> state != S_RENEWING &&
            client -> state != S_REBINDING) {
+#if defined (DEBUG)
                log_debug ("DHCPACK in wrong state.");
+#endif
                return;
        }
 
@@ -786,7 +790,9 @@ void dhcpoffer (packet)
             packet -> raw -> hlen) ||
            (memcmp (packet -> interface -> hw_address.haddr,
                     packet -> raw -> chaddr, packet -> raw -> hlen))) {
+#if defined (DEBUG)
                log_debug ("%s in wrong transaction.", name);
+#endif
                return;
        }
 
@@ -966,7 +972,9 @@ void dhcpnak (packet)
             packet -> raw -> hlen) ||
            (memcmp (packet -> interface -> hw_address.haddr,
                     packet -> raw -> chaddr, packet -> raw -> hlen))) {
+#if defined (DEBUG)
                log_debug ("DHCPNAK in wrong transaction.");
+#endif
                return;
        }
 
@@ -974,14 +982,18 @@ void dhcpnak (packet)
            client -> state != S_REQUESTING &&
            client -> state != S_RENEWING &&
            client -> state != S_REBINDING) {
+#if defined (DEBUG)
                log_debug ("DHCPNAK in wrong state.");
+#endif
                return;
        }
 
        log_info ("DHCPNAK from %s", piaddr (packet -> client_addr));
 
        if (!client -> active) {
+#if defined (DEBUG)
                log_info ("DHCPNAK with no active lease.\n");
+#endif
                return;
        }
 
@@ -1466,29 +1478,6 @@ void make_client_options (client, lease, type, sid, rip, prl,
                }
        }
 
-       if (!(oc = lookup_option (options -> dhcp_hash,
-                                 DHO_DHCP_LEASE_TIME))) {
-               if (!buffer_allocate (&bp, sizeof (u_int32_t),
-                                     "make_client_options"))
-                       log_error ("can't make buffer for requested lease time.");
-               else {
-                       putULong (bp -> data,
-                                 client -> config -> requested_lease);
-                       if (!(make_const_option_cache
-                             (&oc, &bp, (u_int8_t *)0, sizeof (u_int32_t),
-                              &dhcp_options [DHO_DHCP_LEASE_TIME],
-                              "make_client_options")))
-                               log_error ("can't make option cache");
-                       else {
-                               save_option (options -> dhcp_hash, oc);
-                               option_cache_dereference
-                                       (&oc, "make_client_options");
-                       }
-               }
-       }               
-       /* oc = (struct option_cache *)0; (we'd need this if we were
-                                          going to use oc again */
-
        /* Run statements that need to be run on transmission. */
        if (client -> config -> on_transmission)
                execute_statements_in_scope
index 16899386c1b765a3cc6fcb993af2cb9cdddb7625..af3aae3eba7bf0a54aedbc6548eb07aa239cce60 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: discover.c,v 1.7 1999/03/25 21:57:30 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: discover.c,v 1.8 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -121,11 +121,7 @@ void discover_interfaces (state)
                /* Skip loopback, point-to-point and down interfaces,
                   except don't skip down interfaces if we're trying to
                   get a list of configurable interfaces. */
-               if ((((ifr.ifr_flags & IFF_LOOPBACK) ||
-#ifdef HAVE_IFF_POINTOPOINT
-                     (ifr.ifr_flags & IFF_POINTOPOINT))
-                    && !tmp) ||
-#endif
+               if ((!(ifr.ifr_flags & IFF_BROADCAST) && !tmp) ||
                    (!(ifr.ifr_flags & IFF_UP) &&
                     state != DISCOVER_UNCONFIGURED))
                        continue;
@@ -342,6 +338,9 @@ void discover_interfaces (state)
                      case ARPHRD_TUNNEL:
                        /* ignore tunnel interfaces. */
 #endif
+#ifdef HAVE_ARPHRD_ROSE
+                     case ARPHRD_ROSE:
+#endif
 #ifdef HAVE_ARPHRD_LOOPBACK
                      case ARPHRD_LOOPBACK:
                        /* ignore loopback interface */
@@ -354,7 +353,7 @@ void discover_interfaces (state)
                        memcpy (tmp -> hw_address.haddr, sa.sa_data, 6);
                        break;
 
-#ifndef ARPHRD_IEEE802
+#ifndef HAVE_ARPHRD_IEEE802
 # define ARPHRD_IEEE802 HTYPE_IEEE802
 #endif
                      case ARPHRD_IEEE802:
@@ -363,7 +362,7 @@ void discover_interfaces (state)
                        memcpy (tmp -> hw_address.haddr, sa.sa_data, 6);
                        break;
 
-#ifndef ARPHRD_FDDI
+#ifndef HAVE_ARPHRD_FDDI
 # define ARPHRD_FDDI HTYPE_FDDI
 #endif
                      case ARPHRD_FDDI:
@@ -380,6 +379,22 @@ void discover_interfaces (state)
                        break;
 #endif
 
+#ifdef HAVE_ARPHRD_AX25
+                     case ARPHRD_AX25:
+                       tmp -> hw_address.hlen = 6;
+                       tmp -> hw_address.htype = ARPHRD_AX25;
+                       memcpy (tmp -> hw_address.haddr, sa.sa_data, 6);
+                       break;
+#endif
+
+#ifdef HAVE_ARPHRD_NETROM
+                     case ARPHRD_NETROM:
+                       tmp -> hw_address.hlen = 6;
+                       tmp -> hw_address.htype = ARPHRD_NETROM;
+                       memcpy (tmp -> hw_address.haddr, sa.sa_data, 6);
+                       break;
+#endif
+
                      default:
                        log_error ("%s: unknown hardware address type %d",
                                   ifr.ifr_name, sa.sa_family);
index b43db1b64397f274f90c7afad22243f8cb123bd8..76d38560d673ac51a777e1c85424db6f46a40f9c 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: lpf.c,v 1.8 1999/03/16 06:37:49 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: lpf.c,v 1.9 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -72,7 +72,7 @@ int if_register_lpf (info)
        if ((sock = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ALL))) < 0) {
                if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
                    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-                   errno == EAFNOSUPPORT)
+                   errno == EAFNOSUPPORT || errno == EINVAL)
                        log_fatal ("socket: %m - make sure %s %s!",
                               "CONFIG_PACKET and CONFIG_FILTER are defined",
                               "in your kernel configuration");
@@ -86,7 +86,7 @@ int if_register_lpf (info)
        if (bind (sock, &sa, sizeof sa)) {
                if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
                    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-                   errno == EAFNOSUPPORT)
+                   errno == EAFNOSUPPORT || errno = EINVAL)
                        log_fatal ("socket: %m - make sure %s %s!",
                               "CONFIG_PACKET and CONFIG_FILTER are defined",
                               "in your kernel configuration");
index c96b6573998aea1c3a5f90121ae6d29f7a8c2c4a..66a13712107da029ef5ebd1f6396b56b5f9e0bba 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: packet.c,v 1.22 1999/03/25 21:58:13 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: packet.c,v 1.23 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -174,17 +174,15 @@ void assemble_udp_ip_header (interface, buf, bufix,
        /* Compute UDP checksums, including the ``pseudo-header'', the UDP
           header and the data. */
 
-#if 0
        udp.uh_sum =
                wrapsum (checksum ((unsigned char *)&udp, sizeof udp,
                                   checksum (data, len, 
                                             checksum ((unsigned char *)
                                                       &ip.ip_src,
-                                                      sizeof ip.ip_src,
+                                                      2 * sizeof ip.ip_src,
                                                       IPPROTO_UDP +
                                                       (u_int32_t)
                                                       ntohs (udp.uh_ulen)))));
-#endif
 
        /* Copy the udp header into the buffer... */
        memcpy (&buf [*bufix], &udp, sizeof udp);
@@ -231,7 +229,6 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, len)
   struct udphdr *udp;
   u_int32_t ip_len = (buf [bufix] & 0xf) << 2;
   u_int32_t sum, usum;
-  static int packets_seen, packets_bad_checksum;
 
   ip = (struct ip *)(buf + bufix);
   udp = (struct udphdr *)(buf + bufix + ip_len);
@@ -248,6 +245,9 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, len)
 
   /* Check the IP header checksum - it should be zero. */
   if (wrapsum (checksum (buf + bufix, ip_len, 0))) {
+         static int packets_seen;
+         static int packets_bad_checksum;
+
          if (packets_seen &&
              (++packets_seen / ++packets_bad_checksum) < 2)
                  log_info ("Bad IP checksum: %x",
@@ -267,7 +267,6 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, len)
          len -= ip_len + sizeof *udp;
   }
 
-#if 0
   usum = udp -> uh_sum;
   udp -> uh_sum = 0;
 
@@ -275,16 +274,19 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, len)
                           checksum (data, len,
                                     checksum ((unsigned char *)
                                               &ip -> ip_src,
-                                              sizeof ip -> ip_src,
+                                              2 * sizeof ip -> ip_src,
                                               IPPROTO_UDP +
                                               (u_int32_t)
                                               ntohs (udp -> uh_ulen)))));
 
   if (usum && usum != sum) {
-         log_info ("Bad udp checksum: %x %x", usum, sum);
+         static int packets_seen;
+         static int packets_bad_checksum;
+         if (packets_seen &&
+             (++packets_seen / ++packets_bad_checksum) < 2)
+                 log_info ("Bad udp checksum: %x %x", usum, sum);
          return -1;
   }
-#endif
 
   /* Copy out the port... */
   memcpy (&from -> sin_port, &udp -> uh_sport, sizeof udp -> uh_sport);
index 65d2d554f97e65ab0d2d597afff2f42107de1b03..a550991125ec8d123e3aa87ad01ebc873bf529dd 100644 (file)
@@ -1,6 +1,6 @@
 /* upf.c
 
-   Ultrix PacketFilter interface code.
+   Ultrix PacketFilter interface code. */
 
 /*
  * Copyright (c) 1996-1999 Internet Software Consortium.
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: upf.c,v 1.10 1999/03/16 06:37:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: upf.c,v 1.11 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
index e1c69f80e1779506f8ced57056eea5ad4a2c8dd8..c3936444d45c4c200a67099f30329ab504957ba6 100755 (executable)
--- a/configure
+++ b/configure
@@ -7,6 +7,8 @@ machine=`uname -m`
 
 if [ "$sysname" = "" ]; then
   case $uname in
+    AIX)
+      sysname=aix;;
     Rhapsody)
       sysname=rhapsody;;
     ULTRIX)
@@ -58,6 +60,7 @@ if [ "$sysname" = "" ]; then
   echo "configuration that isn't supported or hasn't been tested."
   echo
   echo "Supported configurations are:"
+  echo "   aix         AIX 4.1.5.0"
   echo "   ultrix      ULTRIX 4.2A or higher"
   echo "   bsdos       BSDI BSD/OS 2.1"
   echo "   alphaosf    DEC Alpha OSF/1"
diff --git a/includes/cf/aix.h b/includes/cf/aix.h
new file mode 100644 (file)
index 0000000..8a1b4d5
--- /dev/null
@@ -0,0 +1,89 @@
+/* aix.h */
+/*
+ * Copyright (c) 1996 The Internet Software Consortium.  All rights reserved.
+ *
+ * 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.
+ *
+ * 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
+ * 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.
+ *
+ */
+
+#define int8_t         char
+#define int16_t                short
+#define int32_t                long
+
+#define u_int8_t       unsigned char
+#define u_int16_t      unsigned short 
+#define u_int32_t      unsigned long 
+
+#include <sys/types.h>
+
+#include <syslog.h>
+
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <limits.h>
+
+extern int h_errno;
+
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <net/if_dl.h>
+
+#ifndef _PATH_DHCPD_PID
+#define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
+#endif
+#ifndef _PATH_DHCLIENT_PID
+#define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
+#endif
+#ifndef _PATH_DHCRELAY_PID
+#define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
+#endif
+
+#include <varargs.h>
+#define VA_DOTDOTDOT va_alist
+#define VA_start(list, last) va_start (list)
+
+#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
+#define NO_SNPRINTF
+
+#define EOL '\n'
+#define VOIDPTR void *
+
+#include <time.h>
+
+#define TIME time_t
+#define GET_TIME(x)    time ((x))
+
+#define random rand
+
+#define USE_SOCKETS    1
+#define HAVE_SA_LEN    1
+#undef FDDI
index e95602d13f12132b62885661dbc2bbc8f0d03363..9d94efe432771b4999f2ffe7f43bc276f37bf843 100644 (file)
 # endif
 #endif
 
+#ifdef aix
+#  include "cf/aix.h"
+#endif
+
 #ifdef bsdi
 #  include "cf/bsdos.h"
 #endif
 # define HAVE_ARPHRD_LOOPBACK
 #endif
 
+#if defined (ARPHRD_ROSE) && !defined (HAVE_ARPHRD_ROSE)
+# define HAVE_ARPHRD_ROSE
+#endif
+
+#if defined (ARPHRD_IEEE802) && !defined (HAVE_ARPHRD_IEEE802)
+# define HAVE_ARPHRD_IEEE802
+#endif
+
+#if defined (ARPHRD_FDDI) && !defined (HAVE_ARPHRD_FDDI)
+# define HAVE_ARPHRD_FDDI
+#endif
+
+#if defined (ARPHRD_AX25) && !defined (HAVE_ARPHRD_AX25)
+# define HAVE_ARPHRD_AX25
+#endif
+
+#if defined (ARPHRD_NETROM) && !defined (HAVE_ARPHRD_NETROM)
+# define HAVE_ARPHRD_NETROM
+#endif
+
 #if defined (ARPHRD_METRICOM) && !defined (HAVE_ARPHRD_METRICOM)
 # define HAVE_ARPHRD_METRICOM
 #endif
index f07e7427ff0832e85e5997aab71ea7ce56c2a3dc..468d130d2ffad9c7b91696d7d04ec32817b733ea 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: confpars.c,v 1.66 1999/03/25 22:05:19 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: confpars.c,v 1.67 1999/03/26 19:19:45 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -86,10 +86,14 @@ void read_leases ()
           human has corrected the database problem, then we are left
           thinking that no leases have been assigned to anybody, which
           could create severe network chaos. */
-       if ((cfile = fopen (path_dhcpd_db, "r")) == NULL)
-               log_fatal ("Can't open lease database %s: %m -- %s",
-                      path_dhcpd_db,
-                      "check for failed database rewrite attempt!");
+       if ((cfile = fopen (path_dhcpd_db, "r")) == NULL) {
+               log_error ("Can't open lease database %s: %m -- %s",
+                          path_dhcpd_db,
+                          "check for failed database rewrite attempt!");
+               log_error ("Please read the dhcpd.leases manual page if you");
+               log_fatal ("don't know what to do about this.");
+       }
+
        do {
                token = next_token (&val, cfile);
                if (token == EOF)
index 707d4e9dd4c3940fb2ab3520da008adc91d5945c..dca7b614509d12770aadff6245bc9cfb86887538 100644 (file)
@@ -671,7 +671,7 @@ hardware type (and others) would also be desirable.
 The
 .I hardware-address
 should be a set of hexadecimal octets (numbers from 0 through ff)
-seperated by colons.   The \fIhardwarefR statement may also be used
+seperated by colons.   The \fIhardware\fR statement may also be used
 for DHCP clients.
 .PP
 .B The