From: Ted Lemon Date: Fri, 26 Mar 1999 19:19:46 +0000 (+0000) Subject: Pull up changes in Patchlevel 19 X-Git-Tag: V3-ALPHA-19990326~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d1b06e071253c6850a1d27ca9b7857620ccc5a5;p=thirdparty%2Fdhcp.git Pull up changes in Patchlevel 19 --- diff --git a/Makefile.conf b/Makefile.conf index 361165f6a..29345cae6 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -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 275d5d163..81c2beb89 100644 --- 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 diff --git a/RELNOTES b/RELNOTES index ac983eead..a45deafb6 100644 --- 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 diff --git a/client/clparse.c b/client/clparse.c index 908fb4773..857d39394 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -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) diff --git a/client/dhclient.c b/client/dhclient.c index 2704c874b..6e41b4d7f 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -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 diff --git a/common/discover.c b/common/discover.c index 16899386c..af3aae3eb 100644 --- a/common/discover.c +++ b/common/discover.c @@ -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); diff --git a/common/lpf.c b/common/lpf.c index b43db1b64..76d38560d 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -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"); diff --git a/common/packet.c b/common/packet.c index c96b65739..66a137121 100644 --- a/common/packet.c +++ b/common/packet.c @@ -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); diff --git a/common/upf.c b/common/upf.c index 65d2d554f..a55099112 100644 --- a/common/upf.c +++ b/common/upf.c @@ -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" diff --git a/configure b/configure index e1c69f80e..c3936444d 100755 --- 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 index 000000000..8a1b4d51f --- /dev/null +++ b/includes/cf/aix.h @@ -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 + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +extern int h_errno; + +#include +#include +#include + +#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 +#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 + +#define TIME time_t +#define GET_TIME(x) time ((x)) + +#define random rand + +#define USE_SOCKETS 1 +#define HAVE_SA_LEN 1 +#undef FDDI diff --git a/includes/osdep.h b/includes/osdep.h index e95602d13..9d94efe43 100644 --- a/includes/osdep.h +++ b/includes/osdep.h @@ -62,6 +62,10 @@ # endif #endif +#ifdef aix +# include "cf/aix.h" +#endif + #ifdef bsdi # include "cf/bsdos.h" #endif @@ -230,6 +234,26 @@ # 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 diff --git a/server/confpars.c b/server/confpars.c index f07e7427f..468d130d2 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -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) diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 index 707d4e9dd..dca7b6145 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -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