Comment 20 for bug 1327412

Revision history for this message
patpat (masottaus) wrote :

It seems the fix is only partial ;

From RFC2131 (Dynamic Host Configuration Protocol) for a client we have:

Field DHCPDISCOVER DHCPREQUEST DHCPDECLINE,
                      DHCPINFORM DHCPRELEASE
----- ------------ ----------- -----------
'yiaddr' 0 0 0

but the mentioned patch does not include
- bootp.yiaddr = dev->ip_addr;
+ bootp.yiaddr = INADDR_ANY;
The patch only adds the flags... Considering it is the client DHCP request the yiaddr should be 0 (INADDR_ANY)

***debian/patches/broadcast_dhcp_send.patch***
--- a/usr/kinit/ipconfig/dhcp_proto.c
+++ b/usr/kinit/ipconfig/dhcp_proto.c
@@ -203,6 +203,7 @@ static int dhcp_send(struct netdev *dev,
  bootp.ciaddr = INADDR_ANY;
  bootp.yiaddr = dev->ip_addr;
  bootp.giaddr = INADDR_ANY;
+ bootp.flags = htons(0x800);
  bootp.secs = htons(time(NULL) - dev->open_time);
  memcpy(bootp.chaddr, dev->hwaddr, 16);

Best,
Patrick