Public bug reported:

This effects the LTSP package suite, since PXE booted kernels use
ipconfig (from klibc) to obtain a DHCP address.  It affected my network
because when we turned on Cisco's DHCP snooping (which mitigates rogue
DHCP servers somewhere in your network) it breaks LTSP.

I have filed this report with the upstream maintainer
(http://marc.info/?l=linux-kernel&m=119729810931653&w=2) and it has been
sent to the kernel, but I would like it if this could be backported to
gutsy in an update.

The basic behavior is that according to RFC 2131, DHCP relay hosts
should reject a DHCP request packet that has the giaddr field set.  This
one line fix just sets the giaddr field to INADDR_ANY.

Here is a simple (git formatted) patch:

diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
index a1090f3..8ff1d58 100644
--- a/usr/kinit/ipconfig/dhcp_proto.c
+++ b/usr/kinit/ipconfig/dhcp_proto.c
@@ -161,7 +161,7 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
       bootp.hlen      = dev->hwlen;
       bootp.xid       = dev->bootp.xid;
       bootp.ciaddr    = dev->ip_addr;
-       bootp.giaddr    = dev->bootp.gateway;
+       bootp.giaddr    = INADDR_ANY;
       bootp.secs      = htons(time(NULL) - dev->open_time);
       memcpy(bootp.chaddr, dev->hwaddr, 16);

** Affects: klibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Klibc: ipconfig fails on network with DHCP relays
https://bugs.launchpad.net/bugs/175324
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to