diff options
Diffstat (limited to 'recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch')
-rw-r--r-- | recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch b/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch new file mode 100644 index 0000000000..7a82335599 --- /dev/null +++ b/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch @@ -0,0 +1,43 @@ +From cfc8d649a959f845983aae4c0fc33a0a0c995c92 Mon Sep 17 00:00:00 2001 +From: maximilian attems <max@stro.at> +Date: Fri, 5 Sep 2008 22:48:27 +0200 +Subject: [PATCH] [klibc] ipconfig: set null ciaddr on DHCPREQUEST during SELECTING state + +RFC 2131, Section 4.3.2 states: + + Clients send DHCPREQUEST messages as follows: + + o DHCPREQUEST generated during SELECTING state: + + Client inserts the address of the selected server in 'server + identifier', 'ciaddr' MUST be zero, 'requested IP address' MUST be + filled in with the yiaddr value from the chosen DHCPOFFER. + +fixes: http://bugs.debian.org/497879 + +my test dhcpd seem all not that picky, ipconfig worked before +and after this RFC 2131 conformal change. + +Reported-by: Craig Bernstein <cbernstein@stanford.edu> +Signed-off-by: maximilian attems <max@stro.at> +--- + usr/kinit/ipconfig/dhcp_proto.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c +index d4f2c09..21448f7 100644 +--- a/usr/kinit/ipconfig/dhcp_proto.c ++++ b/usr/kinit/ipconfig/dhcp_proto.c +@@ -171,7 +171,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) + bootp.htype = dev->hwtype; + bootp.hlen = dev->hwlen; + bootp.xid = dev->bootp.xid; +- bootp.ciaddr = dev->ip_addr; ++ bootp.ciaddr = INADDR_NONE; ++ bootp.yiaddr = dev->ip_addr; + bootp.giaddr = INADDR_ANY; + bootp.secs = htons(time(NULL) - dev->open_time); + memcpy(bootp.chaddr, dev->hwaddr, 16); +-- +1.7.0 + |