diff -rNc2 dhcp-2.0b1pl11/README dhcp-2.0b1pl12/README *** dhcp-2.0b1pl11/README Mon Feb 8 21:01:01 1999 --- dhcp-2.0b1pl12/README Sat Feb 13 11:25:08 1999 *************** *** 1,6 **** Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 11 ! February 8, 1998 This is the first Beta release of Version 2 of the Internet Software --- 1,6 ---- Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 12 ! February 13, 1998 This is the first Beta release of Version 2 of the Internet Software *************** *** 48,54 **** the tar utility and the gzip command - type something like: ! zcat dhcp-2.0b1pl11.tar.gz |tar xvf - ! Now, cd to the dhcp-2.0b1pl11 subdirectory that you've just created and configure the source tree by typing: --- 48,54 ---- the tar utility and the gzip command - type something like: ! zcat dhcp-2.0b1pl12.tar.gz |tar xvf - ! Now, cd to the dhcp-2.0b1pl12 subdirectory that you've just created and configure the source tree by typing: diff -rNc2 dhcp-2.0b1pl11/RELNOTES dhcp-2.0b1pl12/RELNOTES *** dhcp-2.0b1pl11/RELNOTES Mon Feb 8 21:00:46 1999 --- dhcp-2.0b1pl12/RELNOTES Sat Feb 13 11:38:14 1999 *************** *** 1,6 **** Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 10 ! February 8, 1998 Release Notes --- 1,6 ---- Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 12 ! February 13, 1998 Release Notes *************** *** 53,56 **** --- 53,75 ---- the near future, and is intended for sites that are in a position to experiment, or for sites that desperately need the new features. + + CHANGES FROM VERSION 2.0 BETA 1 PATCHLEVEL 11 + + - Use DLPI only on sparcs running Solaris, since it seems not to work + on i386 boxes running Solaris for reasons yet to be determined. + + - In the client, close standard I/O descriptors when forking a daemon. + + - Don't let large lease lengths wrap lease expiry times - just use + what fits into a TIME value. + + - Fix a bug in the SIOCGIFCONF interface scanning code. + + - Fix a core dump in the interface scanner that crops up on Linux when + an interface is specified on the command line. + + - Don't use %D in strftime because egcs complains about it. + + - Print the error message if SO_BINDTODEVICE fails. CHANGES FROM VERSION 2.0 BETA 1 PATCHLEVEL 10 diff -rNc2 dhcp-2.0b1pl11/client/dhclient.c dhcp-2.0b1pl12/client/dhclient.c *** dhcp-2.0b1pl11/client/dhclient.c Mon Feb 8 20:59:50 1999 --- dhcp-2.0b1pl12/client/dhclient.c Sat Feb 13 11:25:09 1999 *************** *** 57,61 **** #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.44.2.14 1999/02/09 04:59:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 57,61 ---- #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.44.2.16 1999/02/13 19:25:09 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 93,97 **** "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Client V2.0b1pl11"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 93,97 ---- "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Client V2.0b1pl12"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; *************** *** 499,502 **** --- 499,506 ---- getULong (ip -> client -> new -> options [DHO_DHCP_LEASE_TIME].data); + /* A number that looks negative here is really just very large, + because the lease expiry offset is unsigned. */ + if (ip -> client -> new -> expiry < 0) + ip -> client -> new -> expiry = TIME_MAX; /* Take the server-provided renewal time if there is one; *************** *** 522,527 **** --- 526,538 ---- ip -> client -> new -> expiry += cur_time; + /* Lease lengths can never be negative. */ + if (ip -> client -> new -> expiry < cur_time) + ip -> client -> new -> expiry = TIME_MAX; ip -> client -> new -> renewal += cur_time; + if (ip -> client -> new -> renewal < cur_time) + ip -> client -> new -> renewal = TIME_MAX; ip -> client -> new -> rebind += cur_time; + if (ip -> client -> new -> rebind < cur_time) + ip -> client -> new -> rebind = TIME_MAX; bind_lease (ip); *************** *** 2096,2099 **** --- 2107,2115 ---- /* Become session leader and get pid... */ pid = setsid (); + + /* Close standard I/O descriptors. */ + close(0); + close(1); + close(2); write_client_pid_file (); diff -rNc2 dhcp-2.0b1pl11/common/dispatch.c dhcp-2.0b1pl12/common/dispatch.c *** dhcp-2.0b1pl11/common/dispatch.c Fri Feb 5 12:23:50 1999 --- dhcp-2.0b1pl12/common/dispatch.c Sat Feb 13 11:17:03 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dispatch.c,v 1.47.2.9 1999/02/05 20:23:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: dispatch.c,v 1.47.2.10 1999/02/13 19:17:03 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 80,83 **** --- 80,84 ---- struct sockaddr_in foo; int ir; + struct ifreq *tif; #ifdef ALIAS_NAMES_PERMUTED char *s; *************** *** 111,115 **** struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i); #ifdef HAVE_SA_LEN ! if (ifp -> ifr_addr.sa_len) i += (sizeof ifp -> ifr_name) + ifp -> ifr_addr.sa_len; else --- 112,116 ---- struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i); #ifdef HAVE_SA_LEN ! if (ifp -> ifr_addr.sa_len > sizeof (struct sockaddr)) i += (sizeof ifp -> ifr_name) + ifp -> ifr_addr.sa_len; else *************** *** 195,199 **** which we found it. */ if (!tmp -> ifp) { - struct ifreq *tif; #ifdef HAVE_SA_LEN int len = ((sizeof ifp -> ifr_name) + --- 196,199 ---- *************** *** 277,281 **** FILE *proc_dev; char buffer [256]; - struct ifreq *tif; int skip = 2; --- 277,280 ---- *************** *** 307,329 **** break; ! /* If we found one, and it already has an ifreq ! structure, nothing more to do.. */ ! if (tmp && tmp -> ifp) continue; - /* Make up an ifreq structure. */ - tif = (struct ifreq *)malloc (sizeof (struct ifreq)); - if (!tif) - error ("no space to remember ifp."); - memset (tif, 0, sizeof (struct ifreq)); - strcpy (tif -> ifr_name, name); - - /* Now, if we just needed the ifreq structure, hook - it in and move on. */ - if (tmp) { - tmp -> ifp = tif; - continue; - } - /* Otherwise, allocate one. */ tmp = ((struct interface_info *) --- 306,313 ---- break; ! /* If we found one, nothing more to do.. */ ! if (tmp) continue; /* Otherwise, allocate one. */ tmp = ((struct interface_info *) *************** *** 335,339 **** strcpy (tmp -> name, name); - tmp -> ifp = tif; tmp -> flags = ir; tmp -> next = interfaces; --- 319,322 ---- *************** *** 352,355 **** --- 335,348 ---- int b, sk; + if (!tmp -> ifp) { + /* Make up an ifreq structure. */ + tif = (struct ifreq *)malloc (sizeof (struct ifreq)); + if (!tif) + error ("no space to remember ifp."); + memset (tif, 0, sizeof (struct ifreq)); + strcpy (tif -> ifr_name, tmp -> name); + tmp -> ifp = tif; + } + /* Read the hardware address from this interface. */ ifr = *tmp -> ifp; diff -rNc2 dhcp-2.0b1pl11/common/print.c dhcp-2.0b1pl12/common/print.c *** dhcp-2.0b1pl11/common/print.c Tue Nov 24 14:39:35 1998 --- dhcp-2.0b1pl12/common/print.c Sat Feb 13 11:19:03 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: print.c,v 1.16.2.2 1998/11/24 22:39:35 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: print.c,v 1.16.2.3 1999/02/13 19:19:03 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 81,93 **** t = gmtime (&lease -> starts); ! strftime (tbuf, sizeof tbuf, "%D %H:%M:%S", t); debug (" start %s", tbuf); t = gmtime (&lease -> ends); ! strftime (tbuf, sizeof tbuf, "%D %H:%M:%S", t); debug (" end %s", tbuf); t = gmtime (&lease -> timestamp); ! strftime (tbuf, sizeof tbuf, "%D %H:%M:%S", t); debug (" stamp %s", tbuf); --- 81,93 ---- t = gmtime (&lease -> starts); ! strftime (tbuf, sizeof tbuf, "%Y/%m/%d %H:%M:%S", t); debug (" start %s", tbuf); t = gmtime (&lease -> ends); ! strftime (tbuf, sizeof tbuf, "%Y/%m/%d %H:%M:%S", t); debug (" end %s", tbuf); t = gmtime (&lease -> timestamp); ! strftime (tbuf, sizeof tbuf, "%Y/%m/%d %H:%M:%S", t); debug (" stamp %s", tbuf); diff -rNc2 dhcp-2.0b1pl11/common/socket.c dhcp-2.0b1pl12/common/socket.c *** dhcp-2.0b1pl11/common/socket.c Wed Feb 3 11:46:04 1999 --- dhcp-2.0b1pl12/common/socket.c Sat Feb 13 11:20:07 1999 *************** *** 51,55 **** #ifndef lint static char copyright[] = ! "$Id: socket.c,v 1.26.2.6 1999/02/03 19:46:04 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 51,55 ---- #ifndef lint static char copyright[] = ! "$Id: socket.c,v 1.26.2.7 1999/02/13 19:20:07 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 142,146 **** setsockopt (sock, SOL_SOCKET, SO_BINDTODEVICE, (char *)(info -> ifp), sizeof *(info -> ifp)) < 0) { ! error("setting SO_BINDTODEVICE"); } #endif --- 142,146 ---- setsockopt (sock, SOL_SOCKET, SO_BINDTODEVICE, (char *)(info -> ifp), sizeof *(info -> ifp)) < 0) { ! error("setsockopt: SO_BINDTODEVICE: %m"); } #endif diff -rNc2 dhcp-2.0b1pl11/includes/cf/sunos5-5.h dhcp-2.0b1pl12/includes/cf/sunos5-5.h *** dhcp-2.0b1pl11/includes/cf/sunos5-5.h Tue Dec 22 14:49:13 1998 --- dhcp-2.0b1pl12/includes/cf/sunos5-5.h Sat Feb 13 11:36:40 1999 *************** *** 118,128 **** #define NEED_INET_ATON - /* By default, use BSD Socket API for receiving and sending packets. - This actually works pretty well on Solaris, which doesn't censor - the all-ones broadcast address. */ #if defined (USE_DEFAULT_NETWORK) ! # define USE_DLPI ! /* # define USE_DLPI_RAW */ ! # define USE_DLPI_PFMOD #endif --- 118,135 ---- #define NEED_INET_ATON #if defined (USE_DEFAULT_NETWORK) ! # if defined (__sparc) ! /* On sparc systems, use the DLPI API, which allows multiple interfaces ! to be supported. DLPI is currently buggy on non-sparc machines. ! It's unclear whether this is an O.S. bug or an endianness bug in ! the DLPI code. */ ! # define USE_DLPI ! # define USE_DLPI_PFMOD ! # else ! /* On non-sparc systems, use BSD Socket API for receiving and sending ! packets. This actually works pretty well on Solaris, which doesn't ! censor the all-ones broadcast address. */ ! # define USE_SOCKETS ! # endif /* defined (__sparc) */ #endif diff -rNc2 dhcp-2.0b1pl11/includes/osdep.h dhcp-2.0b1pl12/includes/osdep.h *** dhcp-2.0b1pl11/includes/osdep.h Tue Dec 22 14:47:41 1998 --- dhcp-2.0b1pl12/includes/osdep.h Sat Feb 13 11:21:03 1999 *************** *** 124,127 **** --- 124,131 ---- #endif + #if !defined (TIME_MAX) + # define TIME_MAX 2147483647 + #endif + /* Porting:: diff -rNc2 dhcp-2.0b1pl11/relay/dhcrelay.c dhcp-2.0b1pl12/relay/dhcrelay.c *** dhcp-2.0b1pl11/relay/dhcrelay.c Mon Feb 8 20:59:52 1999 --- dhcp-2.0b1pl12/relay/dhcrelay.c Sat Feb 13 11:25:10 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright [] = ! "$Id: dhcrelay.c,v 1.9.2.11 1999/02/09 04:59:52 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char ocopyright [] = ! "$Id: dhcrelay.c,v 1.9.2.12 1999/02/13 19:25:10 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 77,81 **** "Copyright 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Relay Agent V2.0b1pl11"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 77,81 ---- "Copyright 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Relay Agent V2.0b1pl12"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; diff -rNc2 dhcp-2.0b1pl11/server/dhcpd.c dhcp-2.0b1pl12/server/dhcpd.c *** dhcp-2.0b1pl11/server/dhcpd.c Mon Feb 8 20:59:50 1999 --- dhcp-2.0b1pl12/server/dhcpd.c Sat Feb 13 11:25:08 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.45.2.10 1999/02/09 04:59:50 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; #endif --- 43,47 ---- #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.45.2.11 1999/02/13 19:25:08 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; #endif *************** *** 49,53 **** "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Server V2.0b1pl11 "; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 49,53 ---- "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Server V2.0b1pl12 "; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n";