* [PATCH] BOOTP extension buffer size (2.4.13pre6)
@ 2001-10-23 11:20 Andreas Steinmetz
0 siblings, 0 replies; only message in thread
From: Andreas Steinmetz @ 2001-10-23 11:20 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
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
[-- Attachment #2: ipconfig2.patch --]
[-- Type: text/plain, Size: 375 bytes --]
--- 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 */
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-23 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-23 11:20 [PATCH] BOOTP extension buffer size (2.4.13pre6) Andreas Steinmetz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®