diff -rNc2 dhcp-1.0.0/README dhcp-1.0pl1/README *** dhcp-1.0.0/README Sat Dec 6 03:59:59 1997 --- dhcp-1.0pl1/README Thu Dec 11 12:55:44 1997 *************** *** 113,116 **** --- 113,129 ---- DHCP_ENABLE[0]=0 + The above hack supposedly does not work on HP-UX version 9.x. + However, another hack which supposedly _does_ work on 9.x is to add + the following entry to your /etc/hosts or DNS database: + + 255.255.255.255 all-ones + + Then modify the broadcast as follows (change to suit your + configuration, of course): + + ifconfig lan0 [your ip addr] netmask [your netmask] broadcast all-ones + + I would appreciate any reports as to how well this works for you. + ULTRIX diff -rNc2 dhcp-1.0.0/RELNOTES dhcp-1.0pl1/RELNOTES *** dhcp-1.0.0/RELNOTES Sat Dec 6 03:59:41 1997 --- dhcp-1.0pl1/RELNOTES Sun May 17 23:02:18 1998 *************** *** 1,11 **** Internet Software Consortium Dynamic Host Configuration Protocol Server ! Version 1.0, Patchlevel 0 ! December 6, 1997 Release Notes ! This is version 1.0 of the Internet Software Consortium DHCP Server ! The previous version was Beta Release 5, Patchlevel 17. CHANGES IN VERSION 1.0 --- 1,25 ---- Internet Software Consortium Dynamic Host Configuration Protocol Server ! Version 1.0, Patchlevel 1 ! May 17, 1998 Release Notes ! This is version 1.0 Patchlevel 1 of the Internet Software Consortium ! DHCP Server The previous version was Version 1.0. ! ! CHANGES FROM VERSION 1.0 BETA 1 PATCHLEVEL 0 ! ! - Fix two potential buffer overflow problems. ! ! - Clarify socket API error message on multiple interfaces. ! ! - Fix broken comparison that was setting IP source address to zero. ! ! - Only return 64 bytes of options to BOOTP clients, as specified in ! BOOTP protocol. ! ! - Documentation fixes. ! CHANGES IN VERSION 1.0 diff -rNc2 dhcp-1.0.0/bootp.c dhcp-1.0pl1/bootp.c *** dhcp-1.0.0/bootp.c Sat Mar 29 00:05:31 1997 --- dhcp-1.0pl1/bootp.c Thu Dec 11 12:56:28 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: bootp.c,v 1.20.2.1 1997/03/29 08:05:31 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: bootp.c,v 1.20.2.2 1997/12/11 20:56:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 194,198 **** pack options into the filename and server name buffers. */ ! cons_options (packet, &outgoing, options, 0, 0); if (outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; --- 194,198 ---- pack options into the filename and server name buffers. */ ! cons_options (packet, &outgoing, options, 0, 0, 1); if (outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; diff -rNc2 dhcp-1.0.0/dhcp.c dhcp-1.0pl1/dhcp.c *** dhcp-1.0.0/dhcp.c Tue Dec 2 01:32:12 1997 --- dhcp-1.0pl1/dhcp.c Thu Dec 11 12:57:55 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.34.2.6 1997/12/02 09:32:12 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.34.2.7 1997/12/11 20:57:55 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 412,416 **** /* Set up the option buffer... */ ! cons_options (packet, &outgoing, options, 0, 0); /* memset (&raw.ciaddr, 0, sizeof raw.ciaddr);*/ --- 412,416 ---- /* Set up the option buffer... */ ! cons_options (packet, &outgoing, options, 0, 0, 0); /* memset (&raw.ciaddr, 0, sizeof raw.ciaddr);*/ *************** *** 503,506 **** --- 503,507 ---- int bufs = 0; + int nulltp; struct packet outgoing; struct dhcp_packet raw; *************** *** 862,868 **** packet -> options [DHO_HOST_NAME].data [packet -> options [DHO_HOST_NAME].len - 1] == '\0') ! cons_options (packet, &outgoing, options, bufs, 1); else ! cons_options (packet, &outgoing, options, bufs, 0); if (!offer && outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; --- 863,871 ---- packet -> options [DHO_HOST_NAME].data [packet -> options [DHO_HOST_NAME].len - 1] == '\0') ! nulltp = 1; else ! nulltp = 0; ! ! cons_options (packet, &outgoing, options, bufs, nulltp, offer ? 1 : 0); if (!offer && outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; diff -rNc2 dhcp-1.0.0/dhcp.h dhcp-1.0pl1/dhcp.h *** dhcp-1.0.0/dhcp.h Fri Nov 8 12:06:29 1996 --- dhcp-1.0pl1/dhcp.h Thu Dec 11 12:58:54 1997 *************** *** 52,55 **** --- 52,56 ---- #define DHCP_OPTION_LEN (DHCP_MTU_MAX - DHCP_FIXED_LEN) + #define BOOTP_OPTION_LEN 64 #define BOOTP_MIN_LEN 300 diff -rNc2 dhcp-1.0.0/dhcpd.c dhcp-1.0pl1/dhcpd.c *** dhcp-1.0.0/dhcpd.c Sat Mar 29 00:11:03 1997 --- dhcp-1.0pl1/dhcpd.c Sat Mar 29 00:11:03 1997 *************** *** 49,53 **** "Copyright 1995, 1996 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCPD $Name: V1-0-0 $"; #include "dhcpd.h" --- 49,53 ---- "Copyright 1995, 1996 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCPD $Name: V1-0-1 $"; #include "dhcpd.h" diff -rNc2 dhcp-1.0.0/dhcpd.conf.5 dhcp-1.0pl1/dhcpd.conf.5 *** dhcp-1.0.0/dhcpd.conf.5 Sat Nov 29 00:03:48 1997 --- dhcp-1.0pl1/dhcpd.conf.5 Thu Dec 11 12:59:59 1997 *************** *** 473,481 **** only the .B ethernet - type is recognized, although support for - .B token-ring and .B fddi ! hardware types would also be desirable. The .I hardware-address --- 473,481 ---- only the .B ethernet and + .B token-ring + types are recognized, although support for a .B fddi ! hardware type (among others) would also be desirable. The .I hardware-address diff -rNc2 dhcp-1.0.0/dhcpd.h dhcp-1.0pl1/dhcpd.h *** dhcp-1.0.0/dhcpd.h Sat Mar 29 00:31:08 1997 --- dhcp-1.0pl1/dhcpd.h Thu Dec 11 13:01:13 1997 *************** *** 260,264 **** void parse_option_buffer PROTO ((struct packet *, unsigned char *, int)); void cons_options PROTO ((struct packet *, struct packet *, ! struct tree_cache **, int, int)); int store_options PROTO ((unsigned char *, int, struct tree_cache **, unsigned char *, int, int, int, int)); --- 260,264 ---- void parse_option_buffer PROTO ((struct packet *, unsigned char *, int)); void cons_options PROTO ((struct packet *, struct packet *, ! struct tree_cache **, int, int, int)); int store_options PROTO ((unsigned char *, int, struct tree_cache **, unsigned char *, int, int, int, int)); diff -rNc2 dhcp-1.0.0/options.c dhcp-1.0pl1/options.c *** dhcp-1.0.0/options.c Tue Sep 10 22:52:18 1996 --- dhcp-1.0pl1/options.c Sun May 17 22:21:36 1998 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: options.c,v 1.19 1996/09/11 05:52:18 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: options.c,v 1.19.2.2 1998/05/18 05:21:36 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 156,160 **** of vendor options using the same routine. */ ! void cons_options (inpacket, outpacket, options, overload, terminate) struct packet *inpacket; struct packet *outpacket; --- 156,160 ---- of vendor options using the same routine. */ ! void cons_options (inpacket, outpacket, options, overload, terminate, bootpp) struct packet *inpacket; struct packet *outpacket; *************** *** 162,165 **** --- 162,166 ---- int overload; /* Overload flags that may be set. */ int terminate; + int bootpp; { unsigned char priority_list [300]; *************** *** 183,187 **** if (main_buffer_size < (576 - DHCP_FIXED_LEN)) main_buffer_size = 576 - DHCP_FIXED_LEN; ! } else main_buffer_size = 576 - DHCP_FIXED_LEN; --- 184,192 ---- if (main_buffer_size < (576 - DHCP_FIXED_LEN)) main_buffer_size = 576 - DHCP_FIXED_LEN; ! if (main_buffer_size > sizeof buffer) ! main_buffer_size = sizeof buffer; ! } else if (bootpp) ! main_buffer_size = BOOTP_OPTION_LEN; ! else main_buffer_size = 576 - DHCP_FIXED_LEN; *************** *** 199,210 **** if (inpacket && inpacket -> options [DHO_DHCP_PARAMETER_REQUEST_LIST].data) { memcpy (&priority_list [priority_len], inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].data, ! inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].len); ! priority_len += ! inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].len; } else { memcpy (&priority_list [priority_len], --- 204,216 ---- if (inpacket && inpacket -> options [DHO_DHCP_PARAMETER_REQUEST_LIST].data) { + int prlen = (inpacket -> + options [DHO_DHCP_PARAMETER_REQUEST_LIST].len); + if (prlen + priority_len > sizeof priority_list) + prlen = (sizeof priority_list) - priority_len; + memcpy (&priority_list [priority_len], inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].data, prlen); ! priority_len += prlen; } else { memcpy (&priority_list [priority_len], diff -rNc2 dhcp-1.0.0/socket.c dhcp-1.0pl1/socket.c *** dhcp-1.0.0/socket.c Sat Mar 29 00:16:38 1997 --- dhcp-1.0pl1/socket.c Sun May 17 22:44:32 1998 *************** *** 4,8 **** /* ! * Copyright (c) 1995, 1996 The Internet Software Consortium. * All rights reserved. * --- 4,8 ---- /* ! * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. * All rights reserved. * *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: socket.c,v 1.16.2.1 1997/03/29 08:16:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: socket.c,v 1.16.2.2 1998/05/18 05:44:32 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 67,76 **** /* Make sure only one interface is registered. */ if (once) ! error ("The standard socket API can only support %s%s%s%s%s", ! "hosts with a single network interface. If you must ", ! "run dhcpd on a host with multiple interfaces, ", ! "you must compile in BPF or NIT support. If neither ", ! "option is supported on your system, please let us ", ! "know."); /* Technically, we need to know what interface every packet --- 67,72 ---- /* Make sure only one interface is registered. */ if (once) ! error ("The standard socket API can only support %s", ! "hosts with a single network interface."); /* Technically, we need to know what interface every packet *************** *** 172,176 **** (struct sockaddr *)to, sizeof *to); #ifdef IGNORE_HOSTUNREACH ! } while (to -> sin_addr.s_addr = htonl (INADDR_BROADCAST) && result < 0 && (errno == EHOSTUNREACH || --- 168,172 ---- (struct sockaddr *)to, sizeof *to); #ifdef IGNORE_HOSTUNREACH ! } while (to -> sin_addr.s_addr == htonl (INADDR_BROADCAST) && result < 0 && (errno == EHOSTUNREACH ||