diff -rNc2 dhcp-2.0b1pl17/README dhcp-2.0b1pl18/README *** dhcp-2.0b1pl17/README Sat Feb 27 13:51:34 1999 --- dhcp-2.0b1pl18/README Fri Mar 5 08:13:53 1999 *************** *** 1,6 **** Internet Software Consortium Dynamic Host Configuration Protocol Distribution ! Version 2, Beta 1, Patchlevel 17 ! February 27, 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 18 ! March 5, 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.0b1pl17.tar.gz |tar xvf - ! Now, cd to the dhcp-2.0b1pl17 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.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: diff -rNc2 dhcp-2.0b1pl17/RELNOTES dhcp-2.0b1pl18/RELNOTES *** dhcp-2.0b1pl17/RELNOTES Sat Feb 27 13:52:13 1999 --- dhcp-2.0b1pl18/RELNOTES Fri Mar 5 08:11:54 1999 *************** *** 2,6 **** Dynamic Host Configuration Protocol Distribution Version 2, Beta 1, Patchlevel 18 ! February 27, 1998 Release Notes --- 2,6 ---- Dynamic Host Configuration Protocol Distribution Version 2, Beta 1, Patchlevel 18 ! March 5, 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 17 + + - Fix a bug in the relay agent where messages to the client would be + unicast in the IP header but broadcast in the link header. The + Microsoft DHCP client would reject such packets, preventing it from + being configured. This was only a problem on non-socket-API + platforms. + + - Do not attempt to reclaim requested abandoned leases in response to + DHCPDISCOVER messages. + + - Allow the maximum lease time parameter in a host declaration to + override the maximum lease time parameter in a subnet declaration. + + - Better document the -p flag for dhclient, dhcrelay and dhcpd. + + - Apply John Wehle's patch to fix the endianness bug in the dlpi + packet filter on Solaris. CHANGES FROM VERSION 2.0 BETA 1 PATCHLEVEL 16 diff -rNc2 dhcp-2.0b1pl17/client/dhclient.8 dhcp-2.0b1pl18/client/dhclient.8 *** dhcp-2.0b1pl17/client/dhclient.8 Wed Oct 29 10:35:02 1997 --- dhcp-2.0b1pl18/client/dhclient.8 Fri Mar 5 08:04:52 1999 *************** *** 122,125 **** --- 122,137 ---- flag may used. It should be followed by the udp port number that dhclient should use. This is mostly useful for debugging purposes. + If the + .B -p + flag is specified, the client will transmit responses to servers at a + port number that is one less than the one specified - i.e., if you + specify + .B -p + 68, then the client will listen on port 68 and transmit to port 67. + Datagrams that must go through relay agents are sent to the port + number specified with the + .B -p + flag - if you wish to use alternate port numbers, you must configure + any relay agents you are using to use the same alternate port numbers. .PP Dhclient will normally run in the foreground until it has configured diff -rNc2 dhcp-2.0b1pl17/client/dhclient.c dhcp-2.0b1pl18/client/dhclient.c *** dhcp-2.0b1pl17/client/dhclient.c Sat Feb 27 13:51:35 1999 --- dhcp-2.0b1pl18/client/dhclient.c Fri Mar 5 08:13:54 1999 *************** *** 57,61 **** #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.44.2.24 1999/02/27 21:51:35 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.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 */ *************** *** 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.0b1pl17"; 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.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"; diff -rNc2 dhcp-2.0b1pl17/client/scripts/netbsd dhcp-2.0b1pl18/client/scripts/netbsd *** dhcp-2.0b1pl17/client/scripts/netbsd Fri Jul 10 16:04:29 1998 --- dhcp-2.0b1pl18/client/scripts/netbsd Fri Mar 5 08:27:40 1999 *************** *** 1,4 **** --- 1,32 ---- #!/bin/sh + function make_resolv_conf() { + echo search $new_domain_name >/etc/resolv.conf + for nameserver in $new_domain_name_servers; do + echo nameserver $nameserver >>/etc/resolv.conf + done + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. + function exit_with_hooks() { + exit_status=$1 + if [ -x /etc/dhclient-exit-hooks ]; then + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script + exit $exit_status + } + + # Invoke the local dhcp client enter hooks, if they exist. + if [ -x /etc/dhclient-enter-hooks ]; then + exit_status=0 + . /etc/dhclient-enter-hooks + # allow the local script to abort processing of this state + # local script must set exit_status variable to nonzero. + if [ $exit_status -ne 0 ]; then + exit $exit_status + fi + fi + if [ x$new_network_number != x ]; then echo New Network Number: $new_network_number *************** *** 26,30 **** ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1 sleep 1 ! exit 0 fi --- 54,58 ---- ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1 sleep 1 ! exit_with_hooks 0 fi *************** *** 36,44 **** ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ broadcast 255.255.255.255 up ! exit 0 fi if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then ! exit 0; fi --- 64,72 ---- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ broadcast 255.255.255.255 up ! exit_with_hooks 0 fi if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then ! exit_with_hooks 0 fi *************** *** 86,94 **** route add $alias_ip_address 127.0.0.1 fi ! echo search $new_domain_name >/etc/resolv.conf ! for nameserver in $new_domain_name_servers; do ! echo nameserver $nameserver >>/etc/resolv.conf ! done ! exit 0 fi --- 114,119 ---- route add $alias_ip_address 127.0.0.1 fi ! make_resolv_conf ! exit_with_hooks 0 fi *************** *** 118,122 **** route add $alias_ip_address 127.0.0.1 fi ! exit 0 fi --- 143,147 ---- route add $alias_ip_address 127.0.0.1 fi ! exit_with_hooks 0 fi *************** *** 146,158 **** shift; shift done ! echo search $new_domain_name >/etc/resolv.conf.std ! for nameserver in $new_domain_name_servers; do ! echo nameserver $nameserver >>/etc/resolv.conf.std ! done ! if [ -f /etc/resolv.conf ]; then ! rm -f /etc/resolv.conf ! fi ! mv /etc/resolv.conf.std /etc/resolv.conf ! exit 0 fi fi --- 171,176 ---- shift; shift done ! make_resolv_conf ! exit_with_hooks 0 fi fi *************** *** 170,175 **** arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \ |sh >/dev/null 2>&1 ! exit 1 fi ! exit 0 --- 188,193 ---- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \ |sh >/dev/null 2>&1 ! exit_with_hooks 1 fi ! exit_with_hooks 0 diff -rNc2 dhcp-2.0b1pl17/common/dlpi.c dhcp-2.0b1pl18/common/dlpi.c *** dhcp-2.0b1pl17/common/dlpi.c Tue Feb 23 14:09:55 1999 --- dhcp-2.0b1pl18/common/dlpi.c Sun Feb 28 09:10:52 1999 *************** *** 392,403 **** pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; pf.Pf_Filter [pf.Pf_FilterLen++] = htons (ETHERTYPE_IP); - pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT; - pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP); pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 18; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port); #else /* --- 392,406 ---- pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; pf.Pf_Filter [pf.Pf_FilterLen++] = htons (ETHERTYPE_IP); pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11; + #if defined(i386) || defined(__i386) + pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHFF00 + ENF_AND; + #else pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND; ! #endif ! pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP); pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 18; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = local_port; #else /* *************** *** 410,421 **** * of an IP packet. */ - pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT; - pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP); pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 4; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port); #endif --- 413,427 ---- * of an IP packet. */ pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 4; + #if defined(i386) || defined(__i386) + pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHFF00 + ENF_AND; + #else pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSH00FF + ENF_AND; ! #endif ! pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP); pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11; pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.Pf_Filter [pf.Pf_FilterLen++] = local_port; #endif diff -rNc2 dhcp-2.0b1pl17/relay/dhcrelay.8 dhcp-2.0b1pl18/relay/dhcrelay.8 *** dhcp-2.0b1pl17/relay/dhcrelay.8 Fri Nov 21 23:58:22 1997 --- dhcp-2.0b1pl18/relay/dhcrelay.8 Fri Mar 5 08:05:27 1999 *************** *** 103,106 **** --- 103,117 ---- flag may used. It should be followed by the udp port number that dhcrelay should use. This is mostly useful for debugging purposes. + If the + .B -p + flag is specified, the relay agent will transmit responses to clients + at a port number that is one greater than the one specified - i.e., if + you specify + .B -p + 67, then the relay agent will listen on port 67 and transmit to port + 68. Transmissions to servers will be sent to the same port number + that it specified in the + .B -p + flag. .PP Dhcrelay will normally run in the foreground until it has configured diff -rNc2 dhcp-2.0b1pl17/relay/dhcrelay.c dhcp-2.0b1pl18/relay/dhcrelay.c *** dhcp-2.0b1pl17/relay/dhcrelay.c Sat Feb 27 13:51:37 1999 --- dhcp-2.0b1pl18/relay/dhcrelay.c Fri Mar 5 08:13:56 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright [] = ! "$Id: dhcrelay.c,v 1.9.2.19 1999/02/27 21:51:37 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.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 */ *************** *** 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.0b1pl17"; 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.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"; *************** *** 274,281 **** #endif ! memcpy (hto.haddr, packet -> chaddr, ! (packet -> hlen > sizeof hto.haddr ! ? sizeof hto.haddr ! : packet -> hlen)); hto.htype = packet -> htype; --- 274,282 ---- #endif ! /* Set up the hardware destination address. */ ! hto.hlen = packet -> hlen; ! if (hto.hlen > sizeof hto.haddr) ! hto.hlen = sizeof hto.haddr; ! memcpy (hto.haddr, packet -> chaddr, hto.hlen); hto.htype = packet -> htype; diff -rNc2 dhcp-2.0b1pl17/server/dhcp.c dhcp-2.0b1pl18/server/dhcp.c *** dhcp-2.0b1pl17/server/dhcp.c Sat Feb 27 13:47:16 1999 --- dhcp-2.0b1pl18/server/dhcp.c Fri Mar 5 08:10:56 1999 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.57.2.20 1999/02/27 21:47:16 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.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 */ *************** *** 551,554 **** --- 551,556 ---- TIME lease_time; TIME offered_lease_time; + TIME max_lease_time; + TIME default_lease_time; int ulafdr; *************** *** 678,681 **** --- 680,699 ---- lt.starts = cur_time; + /* Figure out maximum lease time. */ + if (lease -> host && + lease -> host -> group -> max_lease_time) + max_lease_time = lease -> host -> group -> max_lease_time; + else + max_lease_time = lease -> subnet -> group -> max_lease_time; + + /* Figure out default lease time. */ + if (lease -> host + && lease -> host -> group -> default_lease_time) + default_lease_time = + lease -> host -> group -> default_lease_time; + else + default_lease_time = + lease -> subnet -> group -> default_lease_time; + /* Figure out how long a lease to assign. If this is a dynamic BOOTP lease, its duration must be infinite. */ *************** *** 687,711 **** /* Don't let the client ask for a longer lease than is supported for this subnet or host. */ ! if (lease -> host && ! lease -> host -> group -> max_lease_time) { ! if (lease_time > ! lease -> host -> group -> max_lease_time) ! lease_time = (lease -> host -> ! group -> max_lease_time); ! } else { ! if (lease_time > ! lease -> subnet -> group -> max_lease_time) ! lease_time = (lease -> subnet -> ! group -> max_lease_time); ! } ! } else { ! if (lease -> host ! && lease -> host -> group -> default_lease_time) ! lease_time = (lease -> host -> ! group -> default_lease_time); ! else ! lease_time = (lease -> subnet -> ! group -> default_lease_time); ! } state -> offered_expiry = cur_time + lease_time; --- 705,712 ---- /* Don't let the client ask for a longer lease than is supported for this subnet or host. */ ! if (lease_time > max_lease_time) ! lease_time = max_lease_time; ! } else ! lease_time = default_lease_time; state -> offered_expiry = cur_time + lease_time; *************** *** 904,913 **** /* Sanity check the lease time. */ if ((state -> offered_expiry - cur_time) < 15) ! offered_lease_time = (lease -> subnet -> ! group -> default_lease_time); ! else if (state -> offered_expiry - cur_time > ! lease -> subnet -> group -> max_lease_time) ! offered_lease_time = (lease -> subnet -> ! group -> max_lease_time); else offered_lease_time = --- 905,911 ---- /* Sanity check the lease time. */ if ((state -> offered_expiry - cur_time) < 15) ! offered_lease_time = default_lease_time; ! else if (state -> offered_expiry - cur_time > max_lease_time) ! offered_lease_time = max_lease_time; else offered_lease_time = *************** *** 1537,1544 **** warning message, so that if it continues to lose, the administrator will eventually investigate. */ ! if (lease && lease -> flags & ABANDONED_LEASE) { ! warn ("Reclaiming REQUESTed abandoned IP address %s.", ! piaddr (lease -> ip_addr)); ! lease -> flags &= ~ABANDONED_LEASE; } --- 1535,1545 ---- warning message, so that if it continues to lose, the administrator will eventually investigate. */ ! if (lease && (lease -> flags & ABANDONED_LEASE)) { ! if (packet -> packet_type == DHCPREQUEST) { ! warn ("Reclaiming REQUESTed abandoned IP address %s.", ! piaddr (lease -> ip_addr)); ! lease -> flags &= ~ABANDONED_LEASE; ! } else ! lease = (struct lease *)0; } diff -rNc2 dhcp-2.0b1pl17/server/dhcpd.8 dhcp-2.0b1pl18/server/dhcpd.8 *** dhcp-2.0b1pl17/server/dhcpd.8 Mon Oct 20 14:38:13 1997 --- dhcp-2.0b1pl18/server/dhcpd.8 Fri Mar 5 08:05:27 1999 *************** *** 159,162 **** --- 159,174 ---- flag may used. It should be followed by the udp port number on which dhcpd should listen. This is mostly useful for debugging purposes. + If the + .B -p + flag is specified, the server will transmit responses to clients at a + port number that is one greater than the one specified - i.e., if you + specify + .B -p + 67, then the server will listen on port 67 and transmit to port 68. + Datagrams that must go through relay agents are sent to the port + number specified with the + .B -p + flag - if you wish to use alternate port numbers, you must configure + any relay agents you are using to use the same alternate port numbers. .PP To run dhcpd as a foreground process, rather than allowing it to run diff -rNc2 dhcp-2.0b1pl17/server/dhcpd.c dhcp-2.0b1pl18/server/dhcpd.c *** dhcp-2.0b1pl17/server/dhcpd.c Sat Feb 27 13:51:37 1999 --- dhcp-2.0b1pl18/server/dhcpd.c Fri Mar 5 08:13:54 1999 *************** *** 43,47 **** #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.45.2.17 1999/02/27 21:51:37 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.18 1999/03/05 16:13:54 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.0b1pl17 "; 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.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";