diff -rNc2 dhcp-2.0b1pl18/Makefile.conf dhcp-2.0b1pl19/Makefile.conf *** dhcp-2.0b1pl18/Makefile.conf Sat Feb 27 13:41:10 1999 --- dhcp-2.0b1pl19/Makefile.conf Fri Mar 26 08:29:12 1999 *************** *** 59,62 **** --- 59,74 ---- # assignments, and writes the output to Makefile. + ## 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-- *************** *** 129,133 **** #ADMMANEXT = .8 #FFMANEXT = .5 - #VARRUN = /etc #VARDB = /etc ##--alphaosf-- --- 141,144 ---- diff -rNc2 dhcp-2.0b1pl18/README dhcp-2.0b1pl19/README *** dhcp-2.0b1pl18/README Fri Mar 5 08:13:53 1999 --- dhcp-2.0b1pl19/README Fri Mar 26 09:38:36 1999 *************** *** 1,6 **** Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 18 ! March 5, 1998 This is the first Beta release of Version 2 of the Internet Software --- 1,47 ---- Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 19 ! March 26, 1998 ! ! 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. 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.0b1pl18.tar.gz |tar xvf - ! Now, cd to the dhcp-2.0b1pl18 subdirectory that you've just created and configure the source tree by typing: --- 89,95 ---- the tar utility and the gzip command - type something like: ! zcat dhcp-2.0b1pl10.tar.gz |tar xvf - ! Now, cd to the dhcp-2.0b1pl19 subdirectory that you've just created and configure the source tree by typing: diff -rNc2 dhcp-2.0b1pl18/RELNOTES dhcp-2.0b1pl19/RELNOTES *** dhcp-2.0b1pl18/RELNOTES Fri Mar 5 08:11:54 1999 --- dhcp-2.0b1pl19/RELNOTES Fri Mar 26 09:40:05 1999 *************** *** 1,6 **** Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 18 ! March 5, 1998 Release Notes --- 1,6 ---- Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 19 ! March 26, 1998 Release Notes *************** *** 53,56 **** --- 53,106 ---- 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 18 + + - 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 FROM VERSION 2.0 BETA 1 PATCHLEVEL 17 diff -rNc2 dhcp-2.0b1pl18/client/clparse.c dhcp-2.0b1pl19/client/clparse.c *** dhcp-2.0b1pl18/client/clparse.c Fri Jul 10 16:17:00 1998 --- dhcp-2.0b1pl19/client/clparse.c Fri Mar 26 08:33:34 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: clparse.c,v 1.13.2.2 1998/07/10 23:17:00 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: clparse.c,v 1.13.2.3 1999/03/26 16:33:34 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 52,56 **** struct client_config top_level_config; - u_int32_t requested_lease_time; /* client-conf-file :== client-declarations EOF --- 52,55 ---- *************** *** 82,87 **** 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.bootp_policy = ACCEPT; top_level_config.script_name = "/etc/dhclient-script"; --- 81,86 ---- top_level_config.reboot_timeout = 10; top_level_config.retry_interval = 300; ! top_level_config.backoff_cutoff = 15; ! top_level_config.initial_interval = 3; top_level_config.bootp_policy = ACCEPT; top_level_config.script_name = "/etc/dhclient-script"; *************** *** 107,115 **** [top_level_config.requested_option_count++] = DHO_HOST_NAME; - requested_lease_time = 7200; - top_level_config.send_options [DHO_DHCP_LEASE_TIME].data - = (unsigned char *)&requested_lease_time; - top_level_config.send_options [DHO_DHCP_LEASE_TIME].len - = sizeof requested_lease_time; if ((cfile = fopen (path_dhclient_conf, "r")) != NULL) { --- 106,109 ---- diff -rNc2 dhcp-2.0b1pl18/client/dhclient.c dhcp-2.0b1pl19/client/dhclient.c *** dhcp-2.0b1pl18/client/dhclient.c Fri Mar 5 08:13:54 1999 --- dhcp-2.0b1pl19/client/dhclient.c Fri Mar 26 09:39:20 1999 *************** *** 57,61 **** #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.44.2.25 1999/03/05 16:13:54 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.27 1999/03/26 17:39:20 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.0b1pl18"; 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.0b1pl19"; 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"; *************** *** 470,474 **** --- 470,476 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) debug ("DHCPACK in wrong transaction."); + #endif return; } *************** *** 478,482 **** --- 480,486 ---- ip -> client -> state != S_RENEWING && ip -> client -> state != S_REBINDING) { + #if defined (DEBUG) debug ("DHCPACK in wrong state."); + #endif return; } *************** *** 715,719 **** --- 719,725 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) debug ("%s in wrong transaction.", name); + #endif return; } *************** *** 918,922 **** --- 924,930 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) debug ("DHCPNAK in wrong transaction."); + #endif return; } *************** *** 926,930 **** --- 934,940 ---- ip -> client -> state != S_RENEWING && ip -> client -> state != S_REBINDING) { + #if defined (DEBUG) debug ("DHCPNAK in wrong state."); + #endif return; } *************** *** 1034,1041 **** /* Record the number of seconds since we started sending. */ ! if (interval < 255) ! ip -> client -> packet.secs = interval; else ! ip -> client -> packet.secs = 255; note ("DHCPDISCOVER on %s to %s port %d interval %ld", --- 1044,1052 ---- /* Record the number of seconds since we started sending. */ ! if (interval < 65536) ! ip -> client -> packet.secs = htons (interval); else ! ip -> client -> packet.secs = htons (65535); ! ip -> client -> secs = ip -> client -> packet.secs; note ("DHCPDISCOVER on %s to %s port %d interval %ld", *************** *** 1277,1284 **** /* Record the number of seconds since we started sending. */ ! if (interval < 255) ! ip -> client -> packet.secs = interval; ! else ! ip -> client -> packet.secs = 255; note ("DHCPREQUEST on %s to %s port %d", ip -> name, --- 1288,1299 ---- /* Record the number of seconds since we started sending. */ ! if (ip -> client -> state == S_REQUESTING) ! ip -> client -> packet.secs = ip -> client -> secs; ! else { ! if (interval < 65536) ! ip -> client -> packet.secs = htons (interval); ! else ! ip -> client -> packet.secs = htons (65535); ! } note ("DHCPREQUEST on %s to %s port %d", ip -> name, *************** *** 1410,1415 **** /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, ! options, 0, 0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; --- 1425,1430 ---- /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, 0, ! options, 0, 0, 0, (u_int8_t *)0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; *************** *** 1517,1522 **** /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, ! options, 0, 0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; --- 1532,1537 ---- /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, 0, ! options, 0, 0, 0, (u_int8_t *)0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; *************** *** 1618,1623 **** /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, ! options, 0, 0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; --- 1633,1638 ---- /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, 0, ! options, 0, 0, 0, (u_int8_t *)0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; *************** *** 1684,1689 **** /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, ! options, 0, 0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; --- 1699,1704 ---- /* Set up the option buffer... */ ip -> client -> packet_length = ! cons_options ((struct packet *)0, &ip -> client -> packet, 0, ! options, 0, 0, 0, (u_int8_t *)0, 0); if (ip -> client -> packet_length < BOOTP_MIN_LEN) ip -> client -> packet_length = BOOTP_MIN_LEN; *************** *** 1993,1997 **** if (len > sizeof dbuf) { warn ("no space to %s %s", ! "prepend option", dhcp_options [i].name); goto supersede; --- 2008,2012 ---- if (len > sizeof dbuf) { warn ("no space to %s %s", ! "append option", dhcp_options [i].name); goto supersede; *************** *** 1999,2010 **** dp = dbuf; memcpy (dp, ip -> client -> config -> defaults [i].data, ip -> client -> config -> defaults [i].len); - memcpy (dp + ip -> client -> - config -> defaults [i].len, - lease -> options [i].data, - lease -> options [i].len); } } else { --- 2014,2024 ---- dp = dbuf; memcpy (dp, + lease -> options [i].data, + lease -> options [i].len); + memcpy (dp + lease -> options [i].len, ip -> client -> config -> defaults [i].data, ip -> client -> config -> defaults [i].len); } } else { diff -rNc2 dhcp-2.0b1pl18/client/dhclient.conf.5 dhcp-2.0b1pl19/client/dhclient.conf.5 *** dhcp-2.0b1pl18/client/dhclient.conf.5 Fri Nov 21 23:10:15 1997 --- dhcp-2.0b1pl19/client/dhclient.conf.5 Fri Mar 26 08:38:50 1999 *************** *** 260,265 **** [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP ! If for some set of options the client should first a value it ! supplies, and then use the values supplied by the server, if any, these values can be defined in the .B prepend --- 260,265 ---- [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP ! If for some set of options the client should use a value you ! supply, and then use the values supplied by the server, if any, these values can be defined in the .B prepend *************** *** 267,271 **** .B prepend statement can only be used for options which ! allow more than one value to be given. .PP .I The --- 267,272 ---- .B prepend statement can only be used for options which ! allow more than one value to be given. This restriction is not ! enforced - if violated, the results are unpredictable. .PP .I The *************** *** 276,287 **** [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP ! If for some set of options the client should first a value it ! supplies, and then use the values supplied by ! the server, if any, these values can be defined in the .B append statement. The .B append statement can only be used for options which ! allow more than one value to be given. .SH LEASE DECLARATIONS .PP --- 277,289 ---- [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP ! If for some set of options the client should first use the values ! supplied by the server, if any, and then use values you supply, these ! values can be defined in the .B append statement. The .B append statement can only be used for options which ! allow more than one value to be given. This restriction is not ! enforced - if you ignore it, the behaviour will be unpredictable. .SH LEASE DECLARATIONS .PP diff -rNc2 dhcp-2.0b1pl18/common/alloc.c dhcp-2.0b1pl19/common/alloc.c *** dhcp-2.0b1pl18/common/alloc.c Tue Nov 24 14:17:15 1998 --- dhcp-2.0b1pl19/common/alloc.c Fri Mar 26 08:39:36 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: alloc.c,v 1.13.2.1 1998/11/24 22:17:15 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: alloc.c,v 1.13.2.2 1999/03/26 16:39:36 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 241,244 **** --- 241,246 ---- char *name; { + if (ptr -> prl) + dfree (ptr -> prl, name); ptr -> next = free_lease_states; free_lease_states = ptr; diff -rNc2 dhcp-2.0b1pl18/common/dispatch.c dhcp-2.0b1pl19/common/dispatch.c *** dhcp-2.0b1pl18/common/dispatch.c Tue Feb 23 09:37:00 1999 --- dhcp-2.0b1pl19/common/dispatch.c Fri Mar 26 08:43:02 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dispatch.c,v 1.47.2.12 1999/02/23 17:37:00 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.13 1999/03/26 16:43:02 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 140,147 **** 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) || ! #endif (!(ifr.ifr_flags & IFF_UP) && state != DISCOVER_UNCONFIGURED)) --- 140,144 ---- except don't skip down interfaces if we're trying to get a list of configurable interfaces. */ ! if (!(ifr.ifr_flags & IFF_BROADCAST) || (!(ifr.ifr_flags & IFF_UP) && state != DISCOVER_UNCONFIGURED)) *************** *** 357,360 **** --- 354,360 ---- /* ignore tunnel interfaces. */ #endif + #ifdef HAVE_ARPHRD_ROSE + case ARPHRD_ROSE: + #endif #ifdef HAVE_ARPHRD_LOOPBACK case ARPHRD_LOOPBACK: *************** *** 369,373 **** break; ! #ifndef ARPHRD_IEEE802 # define ARPHRD_IEEE802 HTYPE_IEEE802 #endif --- 369,373 ---- break; ! #ifndef HAVE_ARPHRD_IEEE802 # define ARPHRD_IEEE802 HTYPE_IEEE802 #endif *************** *** 378,382 **** break; ! #ifndef ARPHRD_FDDI # define ARPHRD_FDDI HTYPE_FDDI #endif --- 378,382 ---- break; ! #ifndef HAVE_ARPHRD_FDDI # define ARPHRD_FDDI HTYPE_FDDI #endif *************** *** 395,401 **** #endif default: ! error ("%s: unknown hardware address type %d", ifr.ifr_name, sa.sa_family); } } --- 395,418 ---- #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: ! warn ("%s: unknown hardware address type %d", ifr.ifr_name, sa.sa_family); + break; } } diff -rNc2 dhcp-2.0b1pl18/common/lpf.c dhcp-2.0b1pl19/common/lpf.c *** dhcp-2.0b1pl18/common/lpf.c Tue Feb 23 14:09:55 1999 --- dhcp-2.0b1pl19/common/lpf.c Fri Mar 26 08:44:12 1999 *************** *** 44,48 **** #ifndef lint static char copyright[] = ! "$Id: lpf.c,v 1.1.2.6 1999/02/23 22:09:55 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 44,48 ---- #ifndef lint static char copyright[] = ! "$Id: lpf.c,v 1.1.2.7 1999/03/26 16:44:12 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 93,97 **** if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT) error ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", --- 93,97 ---- if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT || errno == EINVAL) error ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", *************** *** 107,111 **** if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT) error ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", --- 107,111 ---- if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT || errno == EINVAL) error ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", diff -rNc2 dhcp-2.0b1pl18/common/options.c dhcp-2.0b1pl19/common/options.c *** dhcp-2.0b1pl18/common/options.c Thu Jun 25 14:11:30 1998 --- dhcp-2.0b1pl19/common/options.c Fri Mar 26 08:49:44 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: options.c,v 1.26.2.3 1998/06/25 21:11:30 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: options.c,v 1.26.2.4 1999/03/26 16:49:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 158,168 **** of vendor options using the same routine. */ ! int cons_options (inpacket, outpacket, options, overload, terminate, bootpp) struct packet *inpacket; struct dhcp_packet *outpacket; struct tree_cache **options; int overload; /* Overload flags that may be set. */ int terminate; int bootpp; { unsigned char priority_list [300]; --- 158,172 ---- of vendor options using the same routine. */ ! int cons_options (inpacket, outpacket, mms, ! options, overload, terminate, bootpp, prl, prl_len) struct packet *inpacket; struct dhcp_packet *outpacket; + int mms; struct tree_cache **options; int overload; /* Overload flags that may be set. */ int terminate; int bootpp; + u_int8_t *prl; + int prl_len; { unsigned char priority_list [300]; *************** *** 179,197 **** /* XXX if a BOOTP client specifies a max message size, we will honor it. */ ! if (inpacket && inpacket -> options [DHO_DHCP_MAX_MESSAGE_SIZE].data) { ! main_buffer_size = ! (getUShort (inpacket -> options ! [DHO_DHCP_MAX_MESSAGE_SIZE].data) ! - DHCP_FIXED_LEN); ! /* Enforce a minimum packet size... */ ! 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 = 64; else main_buffer_size = 576 - DHCP_FIXED_LEN; /* Preload the option priority list with mandatory options. */ priority_len = 0; --- 183,209 ---- /* XXX if a BOOTP client specifies a max message size, we will honor it. */ ! if (!mms && ! inpacket && ! inpacket -> options [DHO_DHCP_MAX_MESSAGE_SIZE].data && ! (inpacket -> options [DHO_DHCP_MAX_MESSAGE_SIZE].len >= ! sizeof (u_int16_t))) ! mms = getUShort (inpacket -> options ! [DHO_DHCP_MAX_MESSAGE_SIZE].data); ! ! /* If the client has provided a maximum DHCP message size, ! use that; otherwise, if it's BOOTP, only 64 bytes; otherwise ! use up to the minimum IP MTU size (576 bytes). */ ! /* XXX if a BOOTP client specifies a max message size, we will ! honor it. */ ! if (mms) ! main_buffer_size = mms - DHCP_FIXED_LEN; ! else if (bootpp) main_buffer_size = 64; else main_buffer_size = 576 - DHCP_FIXED_LEN; + if (main_buffer_size > sizeof buffer) + main_buffer_size = sizeof buffer; + /* Preload the option priority list with mandatory options. */ priority_len = 0; *************** *** 213,219 **** memcpy (&priority_list [priority_len], ! inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].data, prlen); priority_len += prlen; } else { memcpy (&priority_list [priority_len], --- 225,241 ---- memcpy (&priority_list [priority_len], ! (inpacket -> options ! [DHO_DHCP_PARAMETER_REQUEST_LIST].data), prlen); priority_len += prlen; + prl = priority_list; + } else if (prl) { + if (prl_len + priority_len > sizeof priority_list) + prl_len = (sizeof priority_list) - priority_len; + + memcpy (&priority_list [priority_len], + (inpacket -> options + [DHO_DHCP_PARAMETER_REQUEST_LIST].data), prl_len); + priority_len += prl_len; + prl = priority_list; } else { memcpy (&priority_list [priority_len], diff -rNc2 dhcp-2.0b1pl18/common/packet.c dhcp-2.0b1pl19/common/packet.c *** dhcp-2.0b1pl18/common/packet.c Fri Jun 26 11:20:44 1998 --- dhcp-2.0b1pl19/common/packet.c Fri Mar 26 08:52:39 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: packet.c,v 1.18.2.1 1998/06/26 18:20:44 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: packet.c,v 1.18.2.2 1999/03/26 16:52:39 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 195,199 **** header and the data. */ - #if 0 udp.uh_sum = wrapsum (checksum ((unsigned char *)&udp, sizeof udp, --- 195,198 ---- *************** *** 201,209 **** checksum ((unsigned char *) &ip.ip_src, ! sizeof ip.ip_src, IPPROTO_UDP + (u_int32_t) ntohs (udp.uh_ulen))))); - #endif /* Copy the udp header into the buffer... */ --- 200,207 ---- checksum ((unsigned char *) &ip.ip_src, ! 2 * sizeof ip.ip_src, IPPROTO_UDP + (u_int32_t) ntohs (udp.uh_ulen))))); /* Copy the udp header into the buffer... */ *************** *** 252,255 **** --- 250,255 ---- u_int32_t ip_len = (buf [bufix] & 0xf) << 2; u_int32_t sum, usum; + static int packets_seen; + static int packets_bad_checksum; ip = (struct ip *)(buf + bufix); *************** *** 268,273 **** /* Check the IP header checksum - it should be zero. */ if (wrapsum (checksum (buf + bufix, ip_len, 0))) { ! note ("Bad IP checksum: %x", ! wrapsum (checksum (buf + bufix, sizeof *ip, 0))); return -1; } --- 268,275 ---- /* Check the IP header checksum - it should be zero. */ if (wrapsum (checksum (buf + bufix, ip_len, 0))) { ! if (packets_seen && ! (++packets_seen / ++packets_bad_checksum) < 2) ! note ("Bad IP checksum: %x", ! wrapsum (checksum (buf + bufix, sizeof *ip, 0))); return -1; } *************** *** 285,289 **** } - #if 0 usum = udp -> uh_sum; udp -> uh_sum = 0; --- 287,290 ---- *************** *** 293,297 **** checksum ((unsigned char *) &ip -> ip_src, ! sizeof ip -> ip_src, IPPROTO_UDP + (u_int32_t) --- 294,298 ---- checksum ((unsigned char *) &ip -> ip_src, ! 2 * sizeof ip -> ip_src, IPPROTO_UDP + (u_int32_t) *************** *** 299,306 **** if (usum && usum != sum) { ! note ("Bad udp checksum: %x %x", usum, sum); return -1; } - #endif /* Copy out the port... */ --- 300,310 ---- if (usum && usum != sum) { ! static int packets_seen; ! static int packets_bad_checksum; ! if (packets_seen && ! (++packets_seen / ++packets_bad_checksum) < 2) ! note ("Bad udp checksum: %x %x", usum, sum); return -1; } /* Copy out the port... */ diff -rNc2 dhcp-2.0b1pl18/common/upf.c dhcp-2.0b1pl19/common/upf.c *** dhcp-2.0b1pl18/common/upf.c Tue Feb 23 14:09:56 1999 --- dhcp-2.0b1pl19/common/upf.c Fri Mar 26 08:53:50 1999 *************** *** 1,5 **** /* upf.c ! Ultrix PacketFilter interface code. /* --- 1,5 ---- /* upf.c ! Ultrix PacketFilter interface code. */ /* *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: upf.c,v 1.3.2.3 1999/02/23 22:09:56 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: upf.c,v 1.3.2.4 1999/03/26 16:53:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ diff -rNc2 dhcp-2.0b1pl18/configure dhcp-2.0b1pl19/configure *** dhcp-2.0b1pl18/configure Wed Feb 3 10:53:36 1999 --- dhcp-2.0b1pl19/configure Fri Mar 26 08:28:14 1999 *************** *** 8,11 **** --- 8,13 ---- if [ "$sysname" = "" ]; then case $uname in + AIX) + sysname=aix;; Rhapsody) sysname=rhapsody;; *************** *** 59,62 **** --- 61,65 ---- 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" diff -rNc2 dhcp-2.0b1pl18/includes/cf/aix.h dhcp-2.0b1pl19/includes/cf/aix.h *** dhcp-2.0b1pl18/includes/cf/aix.h Wed Dec 31 16:00:00 1969 --- dhcp-2.0b1pl19/includes/cf/aix.h Fri Mar 26 08:56:44 1999 *************** *** 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 -rNc2 dhcp-2.0b1pl18/includes/dhcpd.h dhcp-2.0b1pl19/includes/dhcpd.h *** dhcp-2.0b1pl18/includes/dhcpd.h Mon Feb 8 20:53:37 1999 --- dhcp-2.0b1pl19/includes/dhcpd.h Fri Mar 26 08:55:50 1999 *************** *** 161,164 **** --- 161,168 ---- struct iaddr from; + int max_message_size; + u_int8_t *prl; + int prl_len; + u_int32_t xid; u_int16_t secs; *************** *** 333,336 **** --- 337,341 ---- struct iaddr destination; /* Where to send packet. */ u_int32_t xid; /* Transaction ID. */ + u_int16_t secs; /* secs value from DHCPDISCOVER. */ TIME first_sending; /* When was first copy sent? */ TIME interval; /* What's the current resend interval? */ *************** *** 458,463 **** void parse_options PROTO ((struct packet *)); void parse_option_buffer PROTO ((struct packet *, unsigned char *, int)); ! int cons_options PROTO ((struct packet *, struct dhcp_packet *, ! struct tree_cache **, int, int, int)); int store_options PROTO ((unsigned char *, int, struct tree_cache **, unsigned char *, int, int, int, int)); --- 463,469 ---- void parse_options PROTO ((struct packet *)); void parse_option_buffer PROTO ((struct packet *, unsigned char *, int)); ! int cons_options PROTO ((struct packet *, struct dhcp_packet *, int, ! struct tree_cache **, int, int, int, ! u_int8_t *, int)); int store_options PROTO ((unsigned char *, int, struct tree_cache **, unsigned char *, int, int, int, int)); diff -rNc2 dhcp-2.0b1pl18/includes/osdep.h dhcp-2.0b1pl19/includes/osdep.h *** dhcp-2.0b1pl18/includes/osdep.h Sat Feb 27 13:42:25 1999 --- dhcp-2.0b1pl19/includes/osdep.h Fri Mar 26 08:56:29 1999 *************** *** 76,79 **** --- 76,83 ---- #endif + #ifdef aix + # include "cf/aix.h" + #endif + #ifdef bsdi # include "cf/bsdos.h" *************** *** 246,249 **** --- 250,273 ---- #if defined (ARPHRD_LOOPBACK) && !defined (HAVE_ARPHRD_LOOPBACK) # 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 diff -rNc2 dhcp-2.0b1pl18/relay/dhcrelay.c dhcp-2.0b1pl19/relay/dhcrelay.c *** dhcp-2.0b1pl18/relay/dhcrelay.c Fri Mar 5 08:13:56 1999 --- dhcp-2.0b1pl19/relay/dhcrelay.c Fri Mar 26 09:39:21 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright [] = ! "$Id: dhcrelay.c,v 1.9.2.21 1999/03/05 16:13:56 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.22 1999/03/26 17:39:21 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.0b1pl18"; 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.0b1pl19"; 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.0b1pl18/server/bootp.c dhcp-2.0b1pl19/server/bootp.c *** dhcp-2.0b1pl18/server/bootp.c Tue Feb 23 09:43:38 1999 --- dhcp-2.0b1pl19/server/bootp.c Fri Mar 26 08:57:33 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: bootp.c,v 1.28.2.3 1999/02/23 17:43:38 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 43,47 ---- #ifndef lint static char copyright[] = ! "$Id: bootp.c,v 1.28.2.4 1999/03/26 16:57:33 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 255,259 **** outgoing.packet_length = ! cons_options (packet, outgoing.raw, options, 0, 0, 1); if (outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; --- 255,260 ---- outgoing.packet_length = ! cons_options (packet, outgoing.raw, ! 0, options, 0, 0, 1, (u_int8_t *)0, 0); if (outgoing.packet_length < BOOTP_MIN_LEN) outgoing.packet_length = BOOTP_MIN_LEN; diff -rNc2 dhcp-2.0b1pl18/server/confpars.c dhcp-2.0b1pl19/server/confpars.c *** dhcp-2.0b1pl18/server/confpars.c Tue Feb 16 10:57:33 1999 --- dhcp-2.0b1pl19/server/confpars.c Fri Mar 26 08:59:12 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: confpars.c,v 1.45.2.7 1999/02/16 18:57:33 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: confpars.c,v 1.45.2.8 1999/03/26 16:59:12 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 76,81 **** root_group.authoritative = 1; ! if ((cfile = fopen (path_dhcpd_conf, "r")) == NULL) ! error ("Can't open %s: %m", path_dhcpd_conf); do { token = peek_token (&val, cfile); --- 76,85 ---- root_group.authoritative = 1; ! if ((cfile = fopen (path_dhcpd_conf, "r")) == NULL) { ! warn ("Can't open %s: %m", path_dhcpd_conf); ! warn ("Please read the dhcpd.leases manual page if you."); ! error ("don't know what to do about this."); ! } ! do { token = peek_token (&val, cfile); diff -rNc2 dhcp-2.0b1pl18/server/dhcp.c dhcp-2.0b1pl19/server/dhcp.c *** dhcp-2.0b1pl18/server/dhcp.c Fri Mar 5 08:10:56 1999 --- dhcp-2.0b1pl19/server/dhcp.c Fri Mar 26 09:05:18 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.57.2.21 1999/03/05 16:10:56 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: dhcp.c,v 1.57.2.22 1999/03/26 17:05:18 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 464,468 **** /* Set up the option buffer... */ outgoing.packet_length = ! cons_options (packet, outgoing.raw, options, 0, 0, 0); /* memset (&raw.ciaddr, 0, sizeof raw.ciaddr);*/ --- 464,469 ---- /* Set up the option buffer... */ outgoing.packet_length = ! cons_options (packet, outgoing.raw, 0, options, 0, 0, 0, ! (u_int8_t *)0, 0); /* memset (&raw.ciaddr, 0, sizeof raw.ciaddr);*/ *************** *** 804,807 **** --- 805,832 ---- state -> offer = offer; + /* Get the Maximum Message Size option from the packet, if one + was sent. */ + if (packet -> options [DHO_DHCP_MAX_MESSAGE_SIZE].data && + (packet -> options [DHO_DHCP_MAX_MESSAGE_SIZE].len >= + sizeof (u_int16_t))) + state -> max_message_size = + getUShort (packet -> options + [DHO_DHCP_MAX_MESSAGE_SIZE].data); + + /* Save the parameter request list if there is one. */ + i = DHO_DHCP_PARAMETER_REQUEST_LIST; + if (packet -> options [i].data) { + state -> prl = dmalloc (packet -> options [i].len, + "ack_lease: prl"); + if (!state -> prl) + warn ("no memory for parameter request list"); + else { + memcpy (state -> prl, + packet -> options [i].data, + packet -> options [i].len); + state -> prl_len = packet -> options [i].len; + } + } + /* Figure out what options to send to the client: */ *************** *** 1111,1115 **** /* Insert such options as will fit into the buffer. */ packet_length = cons_options ((struct packet *)0, &raw, ! state -> options, bufs, nulltp, bootpp); /* Having done the cons_options(), we can release the tree_cache --- 1136,1142 ---- /* Insert such options as will fit into the buffer. */ packet_length = cons_options ((struct packet *)0, &raw, ! state -> max_message_size, ! state -> options, bufs, nulltp, bootpp, ! state -> prl, state -> prl_len); /* Having done the cons_options(), we can release the tree_cache *************** *** 1187,1191 **** (struct packet *)0, &raw, packet_length, ! raw.siaddr, &to, &hto); free_lease_state (state, "dhcp_reply fallback 1"); --- 1214,1219 ---- (struct packet *)0, &raw, packet_length, ! raw.siaddr, ! &to, (struct hardware *)0); free_lease_state (state, "dhcp_reply fallback 1"); *************** *** 1194,1205 **** } ! /* If it comes from a client that already knows its address and ! is not requesting a broadcast response, sent it directly to ! that client. */ ! } else if (raw.ciaddr.s_addr && state -> offer == DHCPACK && ! !(raw.flags & htons (BOOTP_BROADCAST)) && ! can_unicast_without_arp ()) { ! to.sin_addr = state -> ciaddr; ! to.sin_port = remote_port; /* XXX */ if (fallback_interface) { --- 1222,1230 ---- } ! /* If the client is RENEWING, unicast to the client using the ! regular IP stack. */ ! } else if (raw.ciaddr.s_addr && state -> offer == DHCPACK) { ! to.sin_addr = raw.ciaddr; ! to.sin_port = remote_port; if (fallback_interface) { *************** *** 1207,1219 **** (struct packet *)0, &raw, packet_length, ! raw.siaddr, &to, &hto); ! free_lease_state (state, "dhcp_reply fallback 1"); lease -> state = (struct lease_state *)0; return; } } else { - /* Otherwise, broadcast it on the local network. */ to.sin_addr.s_addr = htonl (INADDR_BROADCAST); ! to.sin_port = remote_port; /* XXX */ } --- 1232,1256 ---- (struct packet *)0, &raw, packet_length, ! raw.siaddr, &to, ! (struct hardware *)0); ! free_lease_state (state, ! "dhcp_reply fallback 2"); lease -> state = (struct lease_state *)0; return; } + + /* If it comes from a client that already knows its address + and is not requesting a broadcast response, and we can + unicast to a client without using the ARP protocol, sent it + directly to that client. */ + } else if (!(raw.flags & htons (BOOTP_BROADCAST)) && + can_unicast_without_arp ()) { + to.sin_addr = raw.yiaddr; + to.sin_port = remote_port; + + /* Otherwise, broadcast it on the local network. */ } else { to.sin_addr.s_addr = htonl (INADDR_BROADCAST); ! to.sin_port = remote_port; } diff -rNc2 dhcp-2.0b1pl18/server/dhcpd.c dhcp-2.0b1pl19/server/dhcpd.c *** dhcp-2.0b1pl18/server/dhcpd.c Fri Mar 5 08:13:54 1999 --- dhcp-2.0b1pl19/server/dhcpd.c Fri Mar 26 09:39:19 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.45.2.18 1999/03/05 16:13:54 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.19 1999/03/26 17:39:19 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.0b1pl18 "; 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.0b1pl19 "; 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.0b1pl18/server/dhcpd.conf.5 dhcp-2.0b1pl19/server/dhcpd.conf.5 *** dhcp-2.0b1pl18/server/dhcpd.conf.5 Tue Feb 23 09:49:50 1999 --- dhcp-2.0b1pl19/server/dhcpd.conf.5 Fri Mar 26 09:06:35 1999 *************** *** 516,520 **** .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 for DHCP clients. .PP --- 516,520 ---- .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) ! seperated by colons. The \fIhardware\fR statement may also be used for DHCP clients. .PP