From: Maxime Bizon <mbizon@freebox.fr>
To: davem@davemloft.net
Cc: netdev@oss.sgi.com
Subject: [PATCH] ipconfig.c: fix "dhcp server takes precedence over bootp header one"
Date: Tue, 18 Oct 2005 19:05:19 +0200 [thread overview]
Message-ID: <1129655119.4133.71.camel@sakura.staff.proxad.net> (raw)
Hello,
I was unable to use nfs root with a dhcp server that does not fill the
"saddr" field in the bootp header (kernel then tries RPC on 0.0.0.0).
The ipconfig code states that the dhcp server_id takes precedence over
bootp header, but I think the check is misplaced as it is done only for
DHCPOFFER.
The following patch fixes the problem.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
--- linux-2.6.13.4/net/ipv4/ipconfig.c.orig 2005-10-18 18:11:54.000000000 +0200
+++ linux-2.6.13.4/net/ipv4/ipconfig.c 2005-10-18 18:22:18.000000000 +0200
@@ -959,13 +959,6 @@
printk(" by server %u.%u.%u.%u\n",
NIPQUAD(ic_servaddr));
#endif
- /* The DHCP indicated server address takes
- * precedence over the bootp header one if
- * they are different.
- */
- if ((server_id != INADDR_NONE) &&
- (b->server_ip != server_id))
- b->server_ip = ic_servaddr;
break;
case DHCPACK:
@@ -982,6 +975,14 @@
goto drop_unlock;
};
+ /* The DHCP indicated server address takes
+ * precedence over the bootp header one if
+ * they are different.
+ */
+ if ((server_id != INADDR_NONE) &&
+ (b->server_ip != server_id))
+ b->server_ip = ic_servaddr;
+
ic_dhcp_msgtype = mt;
}
--
Maxime
reply other threads:[~2005-10-18 17:05 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=1129655119.4133.71.camel@sakura.staff.proxad.net \
--to=mbizon@freebox.fr \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
/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