mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] BOOTP extension buffer size (2.4.13pre6)
Date: Tue, 23 Oct 2001 13:20:51 +0200 (CEST)	[thread overview]
Message-ID: <XFMail.20011023132051.ast@domdv.de> (raw)

[-- 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 */
 }
 

                 reply	other threads:[~2001-10-23 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20011023132051.ast@domdv.de \
    --to=ast@domdv.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®