From: Stephen Hemminger <shemminger@linux-foundation.org>
To: akpm@linux-foundation.org
Cc: davem@davemloft.net, netdev@vger.kernel.org,
akpm@linux-foundation.org, Marcel.Wappler@bridgeco.net,
kaber@trash.net
Subject: Re: [patch (for 2.6.25?) 1/2] The kernel gets no IP from some DHCP servers
Date: Tue, 4 Mar 2008 16:23:42 -0800 [thread overview]
Message-ID: <20080304162342.65d6340c@extreme> (raw)
In-Reply-To: <200803042256.m24MumHJ001353@imap1.linux-foundation.org>
On Tue, 04 Mar 2008 14:56:48 -0800
akpm@linux-foundation.org wrote:
> From: "Wappler Marcel" <Marcel.Wappler@bridgeco.net>
>
> This patch fixes a DHCP issue of the kernel: some DHCP servers (i.e. in the
> Linksys WRT54Gv5) are very strict about the contents of the DHCPDISCOVER
> packet they receive from clients.
>
> Table 5 in RFC2131 page 36 requests the fields 'ciaddr' and 'siaddr' MUST be
> set to '0'. These DHCP servers ignore Linux kernel's DHCP discovery packets
> with these two fields set to '255.255.255.255' (in contrast to popular DHCP
> clients, such as 'dhclient' or 'udhcpc'). This leads to a not booting system.
>
> I tested this on a ARM embedded device mounting rootfs over NFS obtaining its
> IP from a Linksys WRT54Gv5 Router running VxWorks and a PC based Server
> running a Linux. Changing the two fields to '0.0.0.0' worked.
>
> Cc: Stephen Hemminger <shemminger@osdl.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
Same patch without the noise comment and extra code.
--- a/net/ipv4/ipconfig.c 2008-03-04 16:20:10.000000000 -0800
+++ b/net/ipv4/ipconfig.c 2008-03-04 16:22:49.000000000 -0800
@@ -753,9 +753,9 @@ static void __init ic_bootp_send_if(stru
printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name);
b->htype = dev->type; /* can cause undefined behavior */
}
+
+ /* server_ip and your_ip address are both already zero per RFC2131 */
b->hlen = dev->addr_len;
- b->your_ip = NONE;
- b->server_ip = NONE;
memcpy(b->hw_addr, dev->dev_addr, dev->addr_len);
b->secs = htons(jiffies_diff / HZ);
b->xid = d->xid;
next prev parent reply other threads:[~2008-03-05 0:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 22:56 [patch (for 2.6.25?) 1/2] The kernel gets no IP from some DHCP servers akpm
2008-03-05 0:23 ` Stephen Hemminger [this message]
2008-03-05 1:04 ` David Miller
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=20080304162342.65d6340c@extreme \
--to=shemminger@linux-foundation.org \
--cc=Marcel.Wappler@bridgeco.net \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).