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]
Message-Id: <E1JSL2Y-0001fc-DK@faramir.fjphome.nl>
Date:	Fri, 22 Feb 2008 00:41:22 +0100
From:	Frans Pop <elendil@...net.nl>
To:	Wappler Marcel <Marcel.Wappler@...dgeco.net>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] The kernel gets no IP from some DHCP servers, 2.6.24

Adding netdev list.
Original patch can be found at: http://lkml.org/lkml/2008/2/21/171

Wappler Marcel wrote:
> 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.
> 
> Please CC me personaly when answering this message.
> 
> Thanks,
> Marcel
> 
> --- linux-2.6.24.2/net/ipv4/ipconfig.c	2008-02-21 15:27:47.250890963 +0100
> +++ linux/net/ipv4/ipconfig.c	2008-02-21 15:36:12.686735925 +0100
> @@ -29,6 +29,10 @@
>   *
>   *  Multiple Nameservers in /proc/net/pnp
>   *              --  Josef Siemes <jsiemes@....de>, Aug 2002
> + *
> + *  Bugfix: Not getting an IP from some DHCP servers: RFC2131 page 36
> + *  Table 5 requests DHCPDISCOVER fields ciaddr and siaddr MUST be '0'.
> + *              -- marcel.wappler@...dgeco.net
>   */
>  
>  #include <linux/types.h>
> @@ -103,6 +107,7 @@
>  - '3' from resolv.h */
>  
>  #define NONE __constant_htonl(INADDR_NONE)
> +#define ZERO __constant_htonl(((unsigned long int) 0x00000000))
>  
>  /*
>   * Public IP configuration
> @@ -740,8 +745,8 @@
>  b->htype = dev->type; /* can cause undefined behavior */
>  }
>  b->hlen = dev->addr_len;
> -	b->your_ip = NONE;
> -	b->server_ip = NONE;
> +	b->your_ip = ZERO;
> +	b->server_ip = ZERO;
>  memcpy(b->hw_addr, dev->dev_addr, dev->addr_len);
>  b->secs = htons(jiffies_diff / HZ);
>  b->xid = d->xid;
> 
> --
> Marcel Wappler
> Bridgeco AG
> CH-8600 Dübendorf
> Switzerland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ