Only in DHCPD-BETA-5.15: Makefile diff -rc2 DHCPD-BETA-5.15/Makefile.dist DHCPD-BETA-5.16/Makefile.dist *** DHCPD-BETA-5.15/Makefile.dist Sat Mar 29 00:40:14 1997 --- DHCPD-BETA-5.16/Makefile.dist Fri May 9 01:44:13 1997 *************** *** 196,200 **** SRCS = dhcpd.c dhcp.c bootp.c conflex.c confpars.c db.c OBJS = dhcpd.o dhcp.o bootp.o conflex.o confpars.o db.o ! PROGS = dhcpd dhclient MAN = dhcpd.8 dhcpd.conf.5 --- 196,200 ---- SRCS = dhcpd.c dhcp.c bootp.c conflex.c confpars.c db.c OBJS = dhcpd.o dhcp.o bootp.o conflex.o confpars.o db.o ! PROG = dhcpd dhcpxlt MAN = dhcpd.8 dhcpd.conf.5 *************** *** 202,206 **** CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) ! all: dhcpd dhclient dhcpxlt $(CATMANPAGES) install: dhcpd $(CATMANPAGES) --- 202,206 ---- CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) ! all: $(PROG) $(CATMANPAGES) install: dhcpd $(CATMANPAGES) *************** *** 224,234 **** clean: ! -rm -f $(OBJS) $(COBJ) $(XOBJ) dhclient.o realclean: clean ! -rm -f dhcpd dhclient dhcpxlt $(CATMANPAGES) *~ #* distclean: clean ! -rm -f dhcpd dhclient dhcpxlt $(CATMANPAGES) Makefile # These should only be done on 4.4 BSD-based systems, since the mandoc --- 224,234 ---- clean: ! -rm -f $(OBJS) $(COBJ) $(XOBJ) realclean: clean ! -rm -f $(PROGS) $(CATMANPAGES) *~ #* distclean: clean ! -rm -f $(PROGS) $(CATMANPAGES) Makefile # These should only be done on 4.4 BSD-based systems, since the mandoc *************** *** 247,253 **** $(CC) $(LFLAGS) -o dhcpd $(OBJS) $(COBJ) $(LIBS) - dhclient: dhclient.o $(COBJ) - $(CC) $(LFLAGS) -o dhclient dhclient.o $(COBJ) $(LIBS) - dhcpxlt: dhcpxlt.o errwarn.o convert.o tables.o inet.o xconflex.o \ hash.o alloc.o --- 247,250 ---- *************** *** 331,335 **** bootp.o: dhcpd.h cdefs.h osdep.h site.h $(CF) dhcp.h tree.h hash.h \ inet.h - - dhclient.o: dhcpd.h cdefs.h osdep.h site.h $(CF) dhcp.h tree.h hash.h \ - inet.h dhctoken.h --- 328,329 ---- diff -rc2 DHCPD-BETA-5.15/README DHCPD-BETA-5.16/README *** DHCPD-BETA-5.15/README Sat Mar 29 00:40:15 1997 --- DHCPD-BETA-5.16/README Fri May 9 00:38:07 1997 *************** *** 2,103 **** Dynamic Host Configuration Protocol Server Beta Release 5 ! August 29, 1996 This is the fifth Beta release of the Internet Software Consortium DHCP Server (ISC dhcpd). In this Beta release, support for the core DHCP and BOOTP protocols are provided. This release currently works ! well on Digital Alpha OSF/1, SunOS 4.1.4, NetBSD, FreeBSD and BSD/OS. ! It can also be run usefully on Solaris as long as only one network ! interface is being used. It also runs on Ultrix, QNX and Linux as long as only one network interface is present and a host route is added from that interface to the 255.255.255.255 broadcast address. BUILDING DHCPD To build dhcpd, type ``configure''. If configure can figure out what sort of system you're running on, it will create a custom Makefile for ! you for that system; otherwise, it will complain. Once you've run ! configure, just type ``make'', and after a while you should have a ! dhcp server. If you get compile errors on one of the systems ! mentioned above, please let us know. If you get errors on a system ! not mentioned above, you probably need to think about doing a port. ! ! PORTING ! ! If you want to attempt a port, the first thing to do is to make a copy ! of one of the header files in cf/ for your system and hack the ! variables you find there as needed. Hack osdep.h to conditionally ! include your header file when compiling on your system. ! ! DHCP servers require more of their network stack than most network ! servers do. A DHCP server must be able to tell which network ! interface a packet arrived on. If you have only one interface, this ! is easy, which is why dhcpd works on a lot of systems if you only have ! one network interface. If you have several network interfaces, dhcpd ! only works on systems for which some kind of low-level network ! interface support is present. Currently there are low-level network ! drivers for the Berkeley Packet Filter (BPF) and Sun's STREAMS Network ! Interface Tap (NIT). If you want to make dhcpd work really well on ! your favourite system, and it doesn't support NIT or BPF, you're going ! to need to implement a new low-level driver program along the lines of ! bpf.c or nit.c in order to make this happen. ! ! Even if you only need dhcpd to work on systems with a single ! interface, there can still be problems. Of all the systems dhcpd ! currently works on, only one (Solaris) has an IP stack that allows the ! all-ones broadcast address (255.255.255.255) to go out onto the ! network unchanged. Other systems insist on changing 255.255.255.255 ! into the local subnet broadcast address (here, that's ! 204.254.239.255). This results in a protocol violation, and while many DHCP clients don't notice the problem, some (e.g., all Microsoft DHCP clients) do. Clients that have this problem will appear not to ! see DHCOPFFER responses from the server. ! It is possible to work around this problem on most such systems by ! creating a host route from your network interface address to ! 255.255.255.255. On most systems, you do this with: ! route add 255.255.255.255 0 ! or ! route add -host 255.255.255.255 ! Some Linux systems work better with: ! route add -host 255.255.255.255 dev ! On some systems, you will get error messages if you use the route ! command, but may succeed if you write a small program to do the system ! calls. It would be nice if dhcpd were to do this automatically. ! If you have a patch to do this, send it in! :') ! DEBUGGING ! dhcpd logs to LOG_DAEMON. Depending on the logging level that you ! choose with syslog, you can get quite a bit of information about what ! dhcpd is doing. To get the most logging, put the following in your ! /etc/syslog.conf file and restart syslog: ! daemon.debug: /var/log/daemon.log ! You may, of course, change the filename to suit your taste. Be sure ! that the log file actually exists before restarting syslogd. In ! addition to dhcp logging, you may also capture a lot of information ! from other daemons that you aren't interested in. If this is a ! problem, you may want to edit site.h and redefine the ! DHCPD_LOG_FACILITY macro to, for example, LOG_LOCAL7, and then use ! local7.debug instead of daemon.debug. You need to recompile and ! reinstall if you make this change. ! You can also specify the -d flag on the command line to have dhcpd log ! all of its output to standard error as well as to syslog. To run ! dhcpd under the debugger, supply the -f flag. ! More verbose debugging information can be obtained by defining ! DEBUG_PACKET in site.h and recompiling. This will give you hex dumps ! and symbolic dumps of all DHCP packets that are successfully processed ! or are generated by dhcpd. SUPPORT --- 2,118 ---- Dynamic Host Configuration Protocol Server Beta Release 5 ! Patchlevel 16 ! May 8, 1997 This is the fifth Beta release of the Internet Software Consortium DHCP Server (ISC dhcpd). In this Beta release, support for the core DHCP and BOOTP protocols are provided. This release currently works ! well on Digital Alpha OSF/1, SunOS 4.1.4, NetBSD, FreeBSD, BSD/OS and ! Ultrix. It can also be run usefully on Solaris as long as only one ! network interface is being used. It also runs on QNX and Linux as long as only one network interface is present and a host route is added from that interface to the 255.255.255.255 broadcast address. + If you wish to run dhcpd on Linux, please see the Linux-specific notes + later in this document. If you wish to run on a SCO release, please + see the SCO-specific notes later in this document. You particularly + need to read these notes if you intend to support Windows 95 clients. + If you are running a version of FreeBSD prior to 2.2, please read the + note on FreeBSD. If you are running HP-UX or Ultrix, please read the + notes for those operating systems below. + BUILDING DHCPD To build dhcpd, type ``configure''. If configure can figure out what sort of system you're running on, it will create a custom Makefile for ! you for that system; otherwise, it will complain. If it can't figure ! out what system you are using, that system is not supported - you are ! on your own. ! ! Once you've run configure, just type ``make'', and after a while you ! should have a dhcp server. If you get compile errors on one of the ! supported systems mentioned earlier, please let us know. If you get ! errors on a system not mentioned above, you will need to do some ! programming or debugging on your own to get dhcpd working. ! ! LINUX ! ! In order for dhcpd to work correctly with picky DHCP clients (e.g., ! Windows 95), it must be able to send packets with an IP destination ! address of 255.255.255.255. Unfortunately, Linux insists on changing ! 255.255.255.255 into the local subnet broadcast address (here, that's ! 192.5.5.223). This results in a DHCP protocol violation, and while many DHCP clients don't notice the problem, some (e.g., all Microsoft DHCP clients) do. Clients that have this problem will appear not to ! see DHCPOFFER messages from the server. ! ! It is possible to work around this problem on some versions of Linux ! by creating a host route from your network interface address to ! 255.255.255.255. The command you need to use to do this on Linux ! varies from version to version. The easiest version is: ! ! route add -host 255.255.255.255 dev eth0 ! ! On some older Linux systems, you will get an error if you try to do ! this. On those systems, try adding the following entry to your ! /etc/hosts file: ! 255.255.255.255 all-ones ! Then, try: ! route add -host all-ones dev eth0 ! Another route that has worked for some users is: ! route add -net 255.255.255.0 dev eth0 ! If you are not using eth0 as your network interface, you should ! specify the network interface you *are* using in your route command. ! SCO + SCO has the same problem as Linux (described earlier). The thing is, + SCO *really* doesn't want to let you add a host route to the all-ones + broadcast address. One technique that has been successful on some + versions of SCO is the very bizarre command: ! ifconfig net0 alias 10.1.1.1 netmask 8.0.0.0 ! Apparently this works because of an interaction between SCO's support ! for network classes and the weird netmask. The 10.* network is just a ! dummy that can generally be assumed to be safe. Don't ask why this ! works. Just try it. If it works for you, great. If not, SCO is ! supposedly adding hooks to support real DHCP service in a future ! release - I have this on good authority from the people at SCO who do ! *their* DHCP server and client. ! HP-UX ! HP-UX has the same problem with the all-ones broadcast address that ! SCO and Linux have. It is not entirely clear to me how to get it ! working on HP-UX, but I'm given to understand that some users have ! succeeded. HP-UX comes with its own DHCP server as of version 10, so ! there hasn't been a lot of interest in this recently. If you have ! trouble, ask on the mailing list. ! ULTRIX ! Now that we have Ultrix packet filter support, dhcpd on Ultrix should ! be pretty trouble-free. However, one thing you do need to be aware of ! is that it now requires that the pfilt device be configured into your ! kernel and present in /dev. If you type ``man packetfilter'', you ! will get some information on how to configure your kernel for the ! packet filter (if it isn't already) and how to make an entry for it in ! /dev. ! ! FreeBSD ! ! Versions of FreeBSD prior to 2.2 have a bug in BPF support in that the ! ethernet driver swaps the ethertype field in the ethernet header ! downstream from BPF, which corrupts the output packet. If you are ! running a version of FreeBSD prior to 2.2, and you find that dhcpd ! can't communicate with its clients, you should #define BROKEN_FREEBSD_BPF ! in site.h and recompile. SUPPORT *************** *** 107,118 **** Internet, which means that there are a lot of knowledgable users who may be able to help you if you get stuck. These people generally read ! the dhcpd-users@fugue.com mailing list. ! If you are going to use dhcpd, you should probably subscribe to ! dhcpd-users, as well as dhcpd-announce. For details, please see http://www.fugue.com/dhcp/lists. If you don't have WorldWide Web ! access, you can send mail to dhcpd-request@fugue.com and tell me which lists you want to subscribe to, but please use the web interface if ! you can, since I have to handle the -request mailing list manually. PLEASE DO NOT SEND REQUESTS FOR SUPPORT DIRECTLY TO ME! The number --- 122,135 ---- Internet, which means that there are a lot of knowledgable users who may be able to help you if you get stuck. These people generally read ! the dhcp-server@fugue.com mailing list. ! If you are going to use dhcpd, you should probably subscribe to the ! dhcp-server and dhcp-announce mailing lists. For details, please see http://www.fugue.com/dhcp/lists. If you don't have WorldWide Web ! access, you can send mail to dhcp-request@fugue.com and tell me which lists you want to subscribe to, but please use the web interface if ! you can, since I have to handle the -request mailing list manually, ! and I will give you the third degree if you make me do your ! subscription manually. PLEASE DO NOT SEND REQUESTS FOR SUPPORT DIRECTLY TO ME! The number *************** *** 121,124 **** --- 138,147 ---- never get any more coding done. + PLEASE DO NOT CALL ME ON THE PHONE FOR SUPPORT! Answering the phone + takes a lot more of my time and attention than answering email. If you + do call me on the phone, I will tell you to send email to the mailing + list, and I won't answer your question, so there's no point in doing + it. + BUGS *************** *** 128,134 **** protocol, so this probably won't be a major problem for most users. ! The man page for dhcpd.leases is not yet ready. - The system is painful to configure. I will try to get GNU configure - going in the next release. --- 151,155 ---- protocol, so this probably won't be a major problem for most users. ! Vendor tags and User tags are not currently supported. diff -rc2 DHCPD-BETA-5.15/RELNOTES DHCPD-BETA-5.16/RELNOTES *** DHCPD-BETA-5.15/RELNOTES Sat Mar 29 00:40:16 1997 --- DHCPD-BETA-5.16/RELNOTES Sat Mar 29 01:36:39 1997 *************** *** 2,204 **** Dynamic Host Configuration Protocol Server Beta Release 5 ! August 29, 1996 Release Notes ! !!!!!!! IMPORTANT !!!!!!! ! ! THE FORMAT OF THE dhcpd.conf AND dhcpd.leases FILES HAS CHANGED! ! ! !!!!!!! IMPORTANT !!!!!!! ! ! If you are currently using dhcpd Beta 4 Patchlevel 7 or earlier, YOU ! MUST CONVERT YOUR LEASE DATABASE AND CONFIGURATION FILES before ! running the new version of DHCPD. At best, dhcpd will not work. At ! worst, the lease database could be erased. ! ! To convert your dhcpd.leases and dhcpd.conf files, make a backup copy ! of each file and then run the dhcpxlt command with the old config file ! as input and the new config file as output. For example: ! ! mv /etc/dhcpd.conf /etc/dhcpd.conf.old ! ./dhcpxlt /etc/dhcpd.conf ! mv /var/db/dhcpd.leases /var/db/dhcpd.leases.old ! ./dhcpxlt /var/db/dhcpd.leases ! ! The dhcpxlt command has been tested and appears to work, but it is ! brand new and has only been tested by one person - me - at one site - ! mine. Unfortunately, my site is relatively simple, so there's a ! decent chance that I've overlooked something. Please proceed with ! caution. ! ! NEW FEATURES ! ! NEW CONFIG FILE FORMAT ! ! Obviously, the first new feature is that the configuration file ! formats have been changed. The old format was a major source of ! confusion for new users. The new format uses braces for nesting and ! semicolons to end every statement, so what in the old version looked ! like: ! ! shared-network FOO ! option domain-name "fugue.com" ! subnet 204.254.239.0 netmask 255.255.255.224 ! option routers 204.254.239.1 ! subnet 205.254.239.32 netmask 255.255.255.224 ! option routers 204.254.239.33; ! ! Now looks like: ! ! shared-network FOO { ! option domain-name "fugue.com"; ! subnet 204.254.239.0 netmask 255.255.255.224 { ! option routers 204.254.239.1; ! } ! subnet 205.254.239.32 netmask 255.255.255.224 { ! option routers 204.254.239.33; ! } ! } ! ! I'm hoping that this will reduce confusion somewhat. ! ! In addition to changing the file format, I've also documented it ! (finally)! The definitive documentation is in dhcpd.conf.5, and gives ! a complete and hopefully fairly readable description of the syntax, ! along with examples and a reference section. ! ! Also, the parser should now report line numbers correctly. Instead ! of reporting the character position at which the offending token ! starts, it now prints the line containing the offending token with an ! arrow pointing at that token. ! ! Hostnames may now begin with numbers - previously, a hostname like ! 1Q7.isc.org would not have been allowed. ! ! Dhcpd will now exit if errors are found in the config file - before, ! it would try to press on. I added this so that dhcpd would not even ! try to read the dhcpd.leases file if the config file was broken. ! ! README FILE UPDATED ! ! Please take a look at the new README file - it's been brought forward ! into the 20th century. ! ! QNX SUPPORT ! ! Brian Stecher of Watcom has donated configuration code for the QNX ! operating system. ! ! MAKEFILE FUN ! ! Several people donated clean targets for the Makefile. The idea ! being that you type ``make clean'', and all the object files are ! removed. I added the target I liked best (donated by Mark Sirota). ! ! DYNAMIC BOOTP LEASES ! ! Mark also suggested a change that would set the expiry date on leases ! for Dynamic BOOTP clients to something other than infinity. Two ! different keywords have been added so that you can set either a cutoff ! date or just a shorter lease length. ! ! MEMORY ALLOCATION ZAPPED ! ! A lot of bugs cropped up in Beta 4 having to do with uninitialized ! allocated memory. I finally gave up and put code in the allocator to ! just zero out every hunk of memory that gets allocated. Ugly, but ! probably worthwhile. ! ! NEW GROUP DECLARATION ! ! Several users have asked for the ability to define client groupings ! with common boot parameters which don't correspond with subnet ! boundaries. This would be useful for a LAN where several departments ! are spread out so that each department has some machines on one subnet ! and some machines on another. It would also be useful for grouping ! particular kinds of hardware together. The syntax looks like this: ! ! group { ! option domain-name "accounting.isc.org"; ! ! host foo {...} ! host bar {...} ! host baz {...} ! } ! ! NEXT BOOT SERVER SUPPORT ! ! DHCP and BOOTP clients often need to load a kernel using TFTP or NFS ! once they've configured their network interface. If your TFTP or NFS ! server was the same as your DHCP server, this worked fine, but ! otherwise, there was no way to boot. The next-server parameter now ! allows you to specify the address of the server from which the boot ! file should be loaded. ! ! RESTRICTED DHCP ! ! It is now possible to restrict access to dynamic addresses using the ! boot-unknown-clients parameter. If boot-unknown-clients is turned ! off on a given network, dhcpd will only provide addresses to clients ! for which host entries exist. ! ! DEBUGGING ! ! It is now possible to start dhcpd without having it immediately go ! into the background, using the -f option. This is handy for running ! under a debugger or for running dhcpd out of /etc/inittab. It is ! also possible to get a normally-compiled version of dhcpd to log its ! debugging information to standard error as well as to syslogd, using ! the -d flag. ! ! HOSTNAMES ! ! Dhcpd now looks up the hostnames for each address in the allocation ! pool using gethostbyaddr. If a hostname option was not specified for ! a client, the name is taken from the name of the client's host ! declaration, if there is one. Otherwise, it's taken from the domain ! name associated with the address being assigned to the client. This ! only affects clients that want to learn their hostnames from the ! server. ! ! DHCPD.PID FILE WRITTEN SOONER ! ! One user complained that the dhcpd.pid file was being written after ! the lease database was loaded, and this could take a very significant ! amount of time. Dhcpd now reads the pid file before loading the ! database, and if no server is running on that pid, dhcpd rewrites the ! pid file immediately. There are still race conditions here, but this ! should improve things somewhat. ! ! LOOPBACK AND POINT-TO-POINT INTERFACES AUTOMATICALLY ELIMINATED ! ! I have added code which works everywhere I've tested it so far to ! determine what kind of network connection each identified interface ! provides, and to ignore any interface claiming to be a loopback ! interface or a point-to-point interface. I am somewhat concerned ! that this code may fail on Linux, but it should work on BSD-derived ! TCP stacks, which are present on most Unix systems. ! ! NUMEROUS BUG FIXES ! ! Beta 4 Patchlevel 7 was not a very successful release, mostly because ! I had to do it from Montreal over an X terminal, and so I wasn't able ! to test it. A bunch of bugs introduced in Beta 4.7 have been fixed, ! including: ! ! - NIT no longer consumes excessive resources on SunOS ! - NIT no longer fails on SunOS versions prior to 4.1.4. ! - Mobile hosts should no longer corrupt the in-memory lease ! database (I can't test this here - please let me know) ! - DHCPD no longer gets infinite BOOTREQUESTs when booting ! BOOTP clients on the other side of a BOOTP gateway. ! - DHCPD should dump core less often - a lot of bogus pointer ! dereferences have been fixed. ! - IP aliases should now be handled correctly on Linux ! machines. It would be nice if somebody could test this - I ! can't. ! - Lease times are now printed using printf and read in using a ! hand-coded conversion routine. As a result, dhcpd no ! longer puts GMT times on syslog messages. ! - The lease database code is more robust (I don't know if this ! ever caused any problems). --- 2,87 ---- Dynamic Host Configuration Protocol Server Beta Release 5 ! Patchlevel 15 ! March 29, 1997 Release Notes ! This patchlevel is on the Internet Software Consortium DHCP Server ! Release 1.0 track. The previous version was Beta Release 5, ! Patchlevel 14. This patchlevel is strictly a bug-fix patchlevel. ! The only new feature is Ultrix Packetfilter support, which is sufficiently ! far from the DHCP protocol engine that its inclusion was felt to be very ! low-risk. ! ! The following bug fixes have been made in this release: ! ! - When the server saw a DHCPREQUEST for a client that it knew had a ! lease on a different network, it would release that lease. This ! behaviour is incorrect according to the protocol - there is nothing ! in the protocol that says that a client can't simultaneously hold a ! lease on two addresses on two different networks. ! ! - On little-endian machines (e.g., intel machines and DEC machines), ! if a client requested that responses to it be broadcast rather than ! unicast, this request would not be honored because of a ! byte-swapping error. ! ! - The server would print a banner on startup and then go into a ! background (daemon) mode. If there was a parse error in the ! dhcpd.conf file, this was not detected until the server had gone ! into the background, and thus there was no immediate notification. ! This caused service failures for some users which were difficult to ! diagnose. Dhcpd now continues to log messages to the console until ! after it has successfully parsed the config file and lease file. ! Also, if dhcpd runs into a problem which causes it to exit, it now ! logs the message ``exited'' at CRITICAL priority, which should show ! up on the system console. ! ! - On Linux, spurious Host Unreachable and Connection Refused errors ! could delay or foil the DHCP protocol by preventing the transmission ! of some packets. This is because of a Linux kernel bug whereby ! bogus ICMP errors can be communicated to the user program. ! ! - DHCPNAK behaviour wasn't correct. In some cases, the server would ! not NAK DHCPREQUEST messages if they were on the wrong network. ! This has now been fixed. ! ! - DHCPACK behaviour was incorrect. If a client sent a DHCPREQUEST ! for an address that the server was not willing to provide, the ! server could respond with a DHCPACK for a different address, when it ! should have ignored the DHCPREQUEST. ! ! - DHCPDECLINE processing wasn't being done correctly, with the result ! that DHCPDECLINEs were effectively being ignored. DHCPDECLINEs are ! now processed correctly - leases which have been DECLINEed are ! abandoned and never again offered to clients, at lease until the ! administrator intervenes. Warning: this bug fix does open up the ! DHCP server to a denial of service attack that was formerly not ! possible - a client can successively request and DECLINE every lease ! in the server's database. ! ! - The lease file was being rewritten twice whenever it was time to ! rewrite it. This no longer happens. ! ! - BOOTP clients for which there was a host entry with no fixed-address ! would not be allowed to boot if the dynamic-bootp flag and the ! boot-unknown-clients flags were set. ! ! - If an address range specified within a subnet declaration was on the ! wrong network, dhcpd would silently mask off the erroneous network ! number and mask in the network number from the subnet declaration, ! resulting in incorrect and potentially harmful behaviour. Dhcpd ! now flags this as an error. ! ! - The vendor-encapsulated-options option was specified as a text ! string, which was incorrect. It is now specified as an arbitrary ! string of hexadecimal values, so that a user may mock up vendor ! tags. This behaviour will eventually be superseded by correct ! vendor option support. ! ! - On Ultrix, the executable was not being installed in the correct ! directory. ! ! - Got rid of change warnings in the configure script - these warnings ! were instituted in August of 1996, and probably anybody who would be ! affected by them is already aware of them. Only in DHCPD-BETA-5.15: alloc.o Only in DHCPD-BETA-5.15: bootp.o Only in DHCPD-BETA-5.15: bpf.o diff -rc2 DHCPD-BETA-5.15/cf/freebsd.h DHCPD-BETA-5.16/cf/freebsd.h *** DHCPD-BETA-5.15/cf/freebsd.h Sat Mar 29 00:41:41 1997 --- DHCPD-BETA-5.16/cf/freebsd.h Fri May 9 00:39:58 1997 *************** *** 81,84 **** #if defined (USE_DEFAULT_NETWORK) # define USE_BPF - # define BROKEN_FREEBSD_BPF /* Fixed in 2.2 */ #endif --- 81,83 ---- Only in DHCPD-BETA-5.15: conflex.o diff -rc2 DHCPD-BETA-5.15/confpars.c DHCPD-BETA-5.16/confpars.c *** DHCPD-BETA-5.15/confpars.c Sat Mar 29 00:40:30 1997 --- DHCPD-BETA-5.16/confpars.c Fri May 9 01:37:30 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: confpars.c,v 1.36.2.1 1997/03/29 08:06:44 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.36.2.3 1997/05/09 08:37:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 1590,1600 **** /* Guess the time value... */ guess = ((((((365 * (tm.tm_year - 70) + /* Days in years since '70 */ ! (tm.tm_year - 72) / 4 + /* Leap days since '70 */ (tm.tm_mon /* Days in months this year */ ? months [tm.tm_mon - 1] : 0) + (tm.tm_mon > 1 && /* Leap day this year */ ! ((tm.tm_year - 72) & 3)) + ! tm.tm_mday) * 24) + /* Day of month */ tm.tm_hour) * 60) + tm.tm_min) * 60) + tm.tm_sec; --- 1590,1600 ---- /* Guess the time value... */ guess = ((((((365 * (tm.tm_year - 70) + /* Days in years since '70 */ ! (tm.tm_year - 69) / 4 + /* Leap days since '70 */ (tm.tm_mon /* Days in months this year */ ? months [tm.tm_mon - 1] : 0) + (tm.tm_mon > 1 && /* Leap day this year */ ! !((tm.tm_year - 72) & 3)) + ! tm.tm_mday - 1) * 24) + /* Day of month */ tm.tm_hour) * 60) + tm.tm_min) * 60) + tm.tm_sec; Only in DHCPD-BETA-5.15: confpars.o Only in DHCPD-BETA-5.15: convert.o Only in DHCPD-BETA-5.15: db.o Only in DHCPD-BETA-5.15: dhclient Only in DHCPD-BETA-5.15: dhclient.c Only in DHCPD-BETA-5.15: dhclient.o diff -rc2 DHCPD-BETA-5.15/dhcp.c DHCPD-BETA-5.16/dhcp.c *** DHCPD-BETA-5.15/dhcp.c Sat Mar 29 00:40:41 1997 --- DHCPD-BETA-5.16/dhcp.c Thu May 8 23:43:59 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.34.2.2 1997/03/29 08:31: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: dhcp.c,v 1.34.2.3 1997/05/09 06:43:59 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 173,178 **** /* Find the lease that matches the address requested by the client. */ ! if (packet -> shared_network) ! lease = find_lease (packet, packet -> shared_network); else lease = (struct lease *)0; --- 173,179 ---- /* Find the lease that matches the address requested by the client. */ ! ! if (subnet) ! lease = find_lease (packet, subnet -> shared_network); else lease = (struct lease *)0; *************** *** 187,194 **** : packet -> interface -> name); ! /* If a client on a given network wants to request a lease on ! an address on a different network, NAK it. If the Requested ! Address option was used, the protocol says that it must have ! been broadcast, so we can trust the source network information. If ciaddr was specified and Requested Address was not, then --- 188,196 ---- : packet -> interface -> name); ! /* If a client on a given network REQUESTs a lease on an ! address on a different network, NAK it. If the Requested ! Address option was used, the protocol says that it must ! have been broadcast, so we can trust the source network ! information. If ciaddr was specified and Requested Address was not, then *************** *** 197,209 **** IP router, we'll just have to assume that it's cool. ! This violates the protocol spec in the case that the client ! is in the INIT-REBOOT state and broadcasts a DHCPREQUEST on ! the local wire. We're supposed to check ciaddr for ! validity in that case, but if the packet was unicast ! through a router from a client in the RENEWING state, it ! would look exactly the same to us and it would be very ! bad to send a DHCPNAK. I think we just have to live with ! this. */ ! if ((packet -> raw -> ciaddr.s_addr && packet -> raw -> giaddr.s_addr) || packet -> options [DHO_DHCP_REQUESTED_ADDRESS].len) { --- 199,235 ---- IP router, we'll just have to assume that it's cool. ! If we don't think we know where the packet came from, it ! came through a gateway from an unknown network, so it's not ! from a RENEWING client. If we recognize the network it ! *thinks* it's on, we can NAK it even though we don't ! recognize the network it's *actually* on; otherwise we just ! have to ignore it. ! ! We don't currently try to take advantage of access to the ! raw packet, because it's not available on all platforms. ! So a packet that was unicast to us through a router from a ! RENEWING client is going to look exactly like a packet that ! was broadcast to us from an INIT-REBOOT client. ! ! Since we can't tell the difference between these two kinds ! of packets, if the packet appears to have come in off the ! local wire, we have to treat it as if it's a RENEWING ! client. This means that we can't NAK a RENEWING client on ! the local wire that has a bogus address. The good news is ! that we won't ACK it either, so it should revert to INIT ! state and send us a DHCPDISCOVER, which we *can* work with. ! ! Because we can't detect that a RENEWING client is on the ! wrong wire, it's going to sit there trying to renew until ! it gets to the REBIND state, when we *can* NAK it because ! the packet will get to us through a BOOTP gateway. We ! shouldn't actually see DHCPREQUEST packets from RENEWING ! clients on the wrong wire anyway, since their idea of their ! local router will be wrong. In any case, the protocol ! doesn't really allow us to NAK a DHCPREQUEST from a ! RENEWING client, so we can punt on this issue. */ ! ! if (!packet -> shared_network || ! (packet -> raw -> ciaddr.s_addr && packet -> raw -> giaddr.s_addr) || packet -> options [DHO_DHCP_REQUESTED_ADDRESS].len) { *************** *** 221,227 **** } ! /* If we do know where it came from and either we don't ! know where it came from at all or it came from a different ! shared network than the packet came from, send a nak. */ subnet = find_grouped_subnet (packet -> shared_network, cip); if (!subnet) { --- 247,252 ---- } ! /* If we do know where it came from and it asked for an ! address that is not on that shared network, nak it. */ subnet = find_grouped_subnet (packet -> shared_network, cip); if (!subnet) { *************** *** 427,431 **** } else { to.sin_addr.s_addr = htonl (INADDR_BROADCAST); ! to.sin_port = packet->client_port; } --- 452,456 ---- } else { to.sin_addr.s_addr = htonl (INADDR_BROADCAST); ! to.sin_port = htons (ntohs (server_port) + 1); /* XXX */ } *************** *** 957,960 **** --- 982,988 ---- break; fixed_lease = (struct lease *)0; + if (uid_lease && + (uid_lease -> flags & ABANDONED_LEASE)) + uid_lease = (struct lease *)0; } } else { *************** *** 984,987 **** --- 1012,1017 ---- if (hw_lease -> shared_network == share) break; + if (hw_lease && (hw_lease -> flags & ABANDONED_LEASE)) + hw_lease = (struct lease *)0; /* Try to find a lease that's been allocated to the client's *************** *** 1002,1008 **** /* If the requested IP address isn't on the network the packet ! came from, don't use it (this is probably taken care of at ! a higher level, but it's cheap to make sure here too). */ ! if (ip_lease && ip_lease -> shared_network != share) ip_lease = (struct lease *)0; --- 1032,1038 ---- /* If the requested IP address isn't on the network the packet ! came from, or if it's been abandoned, don't use it. */ ! if (ip_lease && (ip_lease -> shared_network != share || ! (ip_lease -> flags & ABANDONED_LEASE))) ip_lease = (struct lease *)0; Only in DHCPD-BETA-5.15: dhcp.o Only in DHCPD-BETA-5.15: dhcpd diff -rc2 DHCPD-BETA-5.15/dhcpd.c DHCPD-BETA-5.16/dhcpd.c *** DHCPD-BETA-5.15/dhcpd.c Sat Mar 29 00:40:45 1997 --- DHCPD-BETA-5.16/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: BETA_5_15 $"; #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: BETA_5_16 $"; #include "dhcpd.h" diff -rc2 DHCPD-BETA-5.15/dhcpd.conf.5 DHCPD-BETA-5.16/dhcpd.conf.5 *** DHCPD-BETA-5.15/dhcpd.conf.5 Sat Mar 29 00:40:55 1997 --- DHCPD-BETA-5.16/dhcpd.conf.5 Fri May 9 01:37:51 1997 *************** *** 172,176 **** option domain-name "isc.org"; ! option name-servers ns1.isc.org, ns2.isc.org; .ce 1 --- 172,176 ---- option domain-name "isc.org"; ! option domain-name-servers ns1.isc.org, ns2.isc.org; .ce 1 *************** *** 490,494 **** .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 --- 490,494 ---- .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 *************** *** 753,759 **** preference. .PP ! \fBoption\fR \fBname-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]; .PP ! The name-servers option specifies a list of IEN 116 name servers available to the client. Servers should be listed in order of preference. --- 753,759 ---- preference. .PP ! \fBoption\fR \fBien116-name-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]; .PP ! The ien116-name-servers option specifies a list of IEN 116 name servers available to the client. Servers should be listed in order of preference. Only in DHCPD-BETA-5.15: dhcpd.o Only in DHCPD-BETA-5.15: dhcpxlt Only in DHCPD-BETA-5.15: dhcpxlt.o Only in DHCPD-BETA-5.15: dispatch.o Only in DHCPD-BETA-5.15: errwarn.o Only in DHCPD-BETA-5.15: hash.o Only in DHCPD-BETA-5.15: inet.o Only in DHCPD-BETA-5.15: memory.o Only in DHCPD-BETA-5.15: nit.o Only in DHCPD-BETA-5.15: options.o diff -rc2 DHCPD-BETA-5.15/packet.c DHCPD-BETA-5.16/packet.c *** DHCPD-BETA-5.15/packet.c Sat Mar 29 00:41:29 1997 --- DHCPD-BETA-5.16/packet.c Thu May 8 23:56:30 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: packet.c,v 1.11 1996/08/27 09:53:14 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.11.2.1 1997/05/09 06:56:30 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 74,78 **** debug ("sum = %x", sum); #endif ! sum += (u_int16_t) ntohs(*((u_int16_t *)buf)++); } --- 74,78 ---- debug ("sum = %x", sum); #endif ! sum += (u_int16_t) ntohs(*((u_int16_t *)(buf + i))); } *************** *** 83,87 **** debug ("sum = %x", sum); #endif ! sum += (*buf) << 8; } --- 83,87 ---- debug ("sum = %x", sum); #endif ! sum += buf [i] << 8; } Only in DHCPD-BETA-5.15: packet.o Only in DHCPD-BETA-5.15: print.o Only in DHCPD-BETA-5.15: raw.o Only in DHCPD-BETA-5.15: socket.o diff -rc2 DHCPD-BETA-5.15/tables.c DHCPD-BETA-5.16/tables.c *** DHCPD-BETA-5.15/tables.c Sat Mar 29 00:41:36 1997 --- DHCPD-BETA-5.16/tables.c Fri May 9 01:38:21 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: tables.c,v 1.11.2.1 1997/03/29 08:17:03 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: tables.c,v 1.11.2.2 1997/05/09 08:38:21 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 72,76 **** { "routers", "IA", &dhcp_universe, 3 }, { "time-servers", "IA", &dhcp_universe, 4 }, ! { "name-servers", "IA", &dhcp_universe, 5 }, { "domain-name-servers", "IA", &dhcp_universe, 6 }, { "log-servers", "IA", &dhcp_universe, 7 }, --- 72,76 ---- { "routers", "IA", &dhcp_universe, 3 }, { "time-servers", "IA", &dhcp_universe, 4 }, ! { "ien116-name-servers", "IA", &dhcp_universe, 5 }, { "domain-name-servers", "IA", &dhcp_universe, 6 }, { "log-servers", "IA", &dhcp_universe, 7 }, Only in DHCPD-BETA-5.15: tables.o Only in DHCPD-BETA-5.15: tree.o diff -rc2 DHCPD-BETA-5.15/upf.c DHCPD-BETA-5.16/upf.c *** DHCPD-BETA-5.15/upf.c Sat Mar 29 00:41:40 1997 --- DHCPD-BETA-5.16/upf.c Sat Mar 29 01:43:41 1997 *************** *** 43,47 **** #ifndef lint static char copyright[] = ! "$Id: upf.c,v 1.1.2.1 1997/03/29 07:16:26 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: upf.c,v 1.1.2.2 1997/03/29 09:43:41 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 106,110 **** /* Set the UPF device to point at this interface. */ ! if (ioctl (sock, EIOCSETIF, info -> ifp) < 0) error ("Can't attach interface %s to upf device %s: %m", info -> name, filename); --- 106,110 ---- /* Set the UPF device to point at this interface. */ ! if (ioctl (sock, EIOCSETIF, info -> tif) < 0) error ("Can't attach interface %s to upf device %s: %m", info -> name, filename); *************** *** 203,207 **** pf.enf_Filter [pf.enf_FilterLen++] = ENF_PUSHWORD + 18; pf.enf_Filter [pf.enf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.enf_Filter [pf.enf_FilterLen++] = local_port; if (ioctl (info -> rfdesc, EIOCSETF, &pf) < 0) --- 203,207 ---- pf.enf_Filter [pf.enf_FilterLen++] = ENF_PUSHWORD + 18; pf.enf_Filter [pf.enf_FilterLen++] = ENF_PUSHLIT + ENF_CAND; ! pf.enf_Filter [pf.enf_FilterLen++] = server_port; if (ioctl (info -> rfdesc, EIOCSETF, &pf) < 0) Only in DHCPD-BETA-5.15: upf.o Only in DHCPD-BETA-5.15: xconflex.o