This patch adds the extension buffer size to the BOOTP request. If not given
the BOOTP server will assume a default of 64 bytes which is quite often too
short, resulting in missing BOOTP data and thus boot failure.
Example (ISC dhcpd):
subnet 10.4.1.0 netmask 255.255.255.0 {
range dynamic-bootp 10.4.1.128 10.4.1.254;
option routers 10.4.1.1;
option broadcast-address 10.4.1.255;
option domain-name-servers 10.4.1.1;
option netbios-name-servers 10.4.1.1;
option time-servers 10.4.1.1;
option ntp-servers 10.4.1.1;
option subnet-mask 255.255.255.0;
option domain-name "lan.domdv.de";
option netbios-dd-server 10.4.1.1;
option netbios-node-type 8;
option ip-forwarding off;
max-lease-time 600;
default-lease-time 120;
dynamic-bootp-lease-length 3600;
next-server 10.1.2.5;
option root-path "/mnt/data4/nfsroot";
}
Stand-alone booted kernel from floppy without the patch does the following:
1. Kernel sends BOOTP request without DHCP MAX MESSAGE SIZE option, but a 128
byte option buffer.
2. dhcpd thus allocates by default a 64 bytes options buffer for the reply,
as this buffer is too small the boot path is not included in the reply
(the domain name and other options already fill the buffer).
3. Kernel doesn't find boot path in BOOTP reply, tries default path and fails
to boot.
Fix: Add the DHCP MAX MESSAGE SIZE option to the dhcp request. The size
in the fix below is 128 bytes linux vendor buffer plus the size dhcpd
subtracts from this size to calculate the vendor buffer size.
<rant>
Posted this patch for 2.2.14 on 08 May 2000. Maybe this time somebody does take
care and applies the patch.
</rant>
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
--_=XFMail.1.4.6-3.Linux:20011023131131:5243=_
Content-Disposition: attachment; filename="ipconfig2.patch"
Content-Transfer-Encoding: 7bit
Content-Description: ipconfig2.patch
Content-Type: text/plain; charset=us-ascii; name=ipconfig2.patch; SizeOnDisk=375
--- linux/net/ipv4/ipconfig.c Tue Oct 23 12:58:28 2001
+++ linux-fixed/net/ipv4/ipconfig.c Tue Oct 23 13:09:53 2001
@@ -605,6 +605,12 @@
*e++ = 17; /* Boot path */
*e++ = 40;
e += 40;
+
+ *e++ = 57; /* set extension buffer size for reply */
+ *e++ = 2;
+ *e++ = 1; /* 128+236+8+20+14, see dhcpd sources */
+ *e++ = 150;
+
*e++ = 255; /* End of the list */
}
--_=XFMail.1.4.6-3.Linux:20011023131131:5243=_--
End of MIME message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/