Subject: bin/3124: dhcpd ignores boot-unknown-clients flag for dynamic bootp
To: None <gnats-bugs@gnats.netbsd.org>
From: Andrew Wheadon <andrew@wipux2.wifo.uni-mannheim.de>
List: netbsd-bugs
Date: 01/18/1997 00:37:20
>Number:         3124
>Category:       bin
>Synopsis:       boot-unknown-clients flag is ignored for dynamic bootp
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 17 15:50:01 1997
>Last-Modified:
>Originator:     Andrew Wheadon
>Organization:
The cost of living hasn't affected its popularity. (Mark Twain)
current	release=doc host=netbsd.wifo.uni-mannheim.de \ "NetBSD-current mirror"
hostbase=/mit/ftp/pub/NetBSD base=/usr prefix=/usr backup delete use-rel-suffix
>Release:        15.01.97
>Environment:
	
System: NetBSD wipux2.wifo.uni-mannheim.de 1.2B NetBSD 1.2B (WIPOOL) #0: Sat Jan 11 03:34:48 MET 1997 toor@wipux2.wifo.uni-mannheim.de:/src/src/sys/arch/i386/compile/WIPOOL i386


>Description:
Setting the boot-unknown-clients flag in /etc/dhcpd.conf
to false is ignored for dynamic bootp (it is observed for dhcp-requests).
This behaviour can have unwanted results like routers and other
stuff relying on bootp to given the wrong ip-address, when dhcpd
answers faster than the correct bootp-server.
Here's an output of the log file with incorrect behaviour where
it is trying to answer but has had it's address range turned off
(because it was causing major complications in our net).

created using bootpquery since bootptest seems useless.
Listening on BPF/de0/0:0:c0:eb:39:d3/WIPOOL
Sending on   BPF/de0/0:0:c0:eb:39:d3/WIPOOL
Sending on   Socket/fallback/fallback-net
BOOTREQUEST from c:0:43:4f:3f:34 via de0
Ignoring unknown BOOTP client c:0:43:4f:3f:34
No applicable record for BOOTP host c:0:43:4f:3f:34    <- this is wrong.
BOOTREQUEST from c:0:43:4f:3f:34 via de0
...

This is the desired output:
Listening on BPF/de0/0:0:c0:eb:39:d3/WIPOOL
Sending on   BPF/de0/0:0:c0:eb:39:d3/WIPOOL
Sending on   Socket/fallback/fallback-net
DHCPDISCOVER from 8:0:2b:e2:b4:4d via de0
no free leases on subnet WIPOOL
BOOTREQUEST from c:0:43:4f:3f:34 via de0
Ignoring unknown BOOTP client c:0:43:4f:3f:34
BOOTREQUEST from c:0:43:4f:3f:34 via de0	<- no answer was attempted.
...
>How-To-Repeat:
	Enable dynamic bootp in dhcpd, set boot-unknown-clients to false
	and watch unknown clients receiving responses.
	
>Fix:
Luckily quite easy since it's just a return that is missing.
--- bootp.c.old	Mon Oct 14 19:00:41 1996
+++ bootp.c	Sat Jan 18 00:17:34 1997
@@ -113,6 +113,7 @@
 			      print_hw_addr (packet -> raw -> htype,
 					     packet -> raw -> hlen,
 					     packet -> raw -> chaddr));
+			return;
 		}
 
 		/* If the packet is from a host we don't know and there
>Audit-Trail:
>Unformatted: