Subject: Re: new dhcpd & bootp
To: Ted Lemon <mellon@isc.org>
From: Matt Thomas <matt@3am-software.com>
List: current-users
Date: 05/08/2000 12:26:22
At 11:53 AM 5/8/00, Ted Lemon wrote:
> > Well, neither my powerbook nor my decserver 700 will work with
> > the latest dhcpd. /var/log/messages shows things being sent but
> > neither like the response.
>
>Can you send me the output of tcpdump -x -n -e -s 1500 udp port 67?
>The Powerbook should work if it's recent, although there were some
>really ugly problems with OT DHCP for a while. The DECserver 700 is
>probably also not setting the broadcast bit. Try setting
>``always-broadcast on;'' in your dhcpd.conf file, also, and see if
>anything changes.
The powerbook is very recent.
The destination ethernet address is screwed up:
12:03:04.956622 8:0:2b:2c:1e:88 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68 > 255.255.255.255.67: xid:0xe53e7351 file "WWENG2" vend-rfc1048 [tos 0x10]
12:03:04.990801 0:0:c0:70:7a:ef 0:2b:2c:1e:88:0 0800 342: 192.168.1.3.67 > 255.255.255.255.68: xid:0xe53e7351 Y:192.168.1.15 S:192.168.1.3 ether 8:0:2b:2c:1e:88 file "WWENG2" vend-rfc1048 SM:255.255.255.0 DG:192.168.1.254 NS:192.168.1.2 DN:"local" [tos 0x10]
12:03:09.292513 8:0:2b:2c:1e:88 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68 > 255.255.255.255.67: xid:0xe53e7351 secs:4 file "WWENG2" vend-rfc1048 [tos 0x10]
12:03:09.297396 0:0:c0:70:7a:ef 0:2b:2c:1e:88:0 0800 342: 192.168.1.3.67 > 255.255.255.255.68: xid:0xe53e7351 secs:4 Y:192.168.1.15 S:192.168.1.3 ether 8:0:2b:2c:1e:88 file "WWENG2" vend-rfc1048 SM:255.255.255.0 DG:192.168.1.254 NS:192.168.1.2 DN:"local" [tos 0x10]
12:03:13.561999 8:0:2b:2c:1e:88 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68 > 255.255.255.255.67: xid:0xe53e7351 secs:8 file "WWENG2" vend-rfc1048 [tos 0x10]
12:03:13.565906 0:0:c0:70:7a:ef 0:2b:2c:1e:88:0 0800 342: 192.168.1.3.67 > 255.255.255.255.68: xid:0xe53e7351 secs:8 Y:192.168.1.15 S:192.168.1.3 ether 8:0:2b:2c:1e:88 file "WWENG2" vend-rfc1048 SM:255.255.255.0 DG:192.168.1.254 NS:192.168.1.2 DN:"local" [tos 0x10]
12:03:17.723088 8:0:2b:2c:1e:88 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68 > 255.255.255.255.67: xid:0xe53e7351 secs:12 file "WWENG2" vend-rfc1048 [tos 0x10]
12:03:17.726018 0:0:c0:70:7a:ef 0:2b:2c:1e:88:0 0800 342: 192.168.1.3.67 > 255.255.255.255.68: xid:0xe53e7351 secs:12 Y:192.168.1.15 S:192.168.1.3 ether 8:0:2b:2c:1e:88 file "WWENG2" vend-rfc1048 SM:255.255.255.0 DG:192.168.1.254 NS:192.168.1.2 DN:"local" [tos 0x10]
It's a bug in usr.sbin/dhcp/server/bootp.c:
RCS file: /cvsroot/basesrc/usr.sbin/dhcp/server/bootp.c,v
retrieving revision 1.10
diff -u -r1.10 bootp.c
--- bootp.c 2000/04/22 08:18:17 1.10
+++ bootp.c 2000/05/08 19:24:16
@@ -313,7 +313,7 @@
/* Set up the hardware destination address... */
hto.hbuf [0] = packet -> raw -> htype;
hto.hlen = packet -> raw -> hlen + 1;
- memcpy (hto.hbuf, packet -> raw -> chaddr, packet -> raw -> hlen);
+ memcpy (&hto.hbuf [1], packet -> raw -> chaddr, packet -> raw -> hlen);
from = packet -> interface -> primary_address;
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message