lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 04 Mar 2008 17:04:28 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	shemminger@...ux-foundation.org
Cc:	akpm@...ux-foundation.org, netdev@...r.kernel.org,
	Marcel.Wappler@...dgeco.net, kaber@...sh.net
Subject: Re: [patch (for 2.6.25?) 1/2] The kernel gets no IP from some DHCP
 servers

From: Stephen Hemminger <shemminger@...ux-foundation.org>
Date: Tue, 4 Mar 2008 16:23:42 -0800

> Same patch without the noise comment and extra code.

Much nicer.

The following is what I'll push to Linus.

Thanks.

commit dea75bdfa57f75a7a7ec2961ec28db506c18e5db
Author: Stephen Hemminger <shemminger@...ux-foundation.org>
Date:   Tue Mar 4 17:03:49 2008 -0800

    [IPCONFIG]: The kernel gets no IP from some DHCP servers
    
    From: Stephen Hemminger <shemminger@...ux-foundation.org>
    
    Based upon a patch by Marcel Wappler:
    
       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.
    
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 10013cc..5dd9385 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -753,9 +753,9 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
 		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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ