From 12fd5592447b41c940c959f2df67de2baa42cb4d Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 25 Aug 2015 16:24:37 +0200 Subject: [PATCH] Fixed DHCP client. RFC2131 states on page 36 regarding DHCPREQUEST: " 'xid' from server DHCPOFFER message " As the DHCPOFFER message uses the 'xid' from the DHCPDISCOVER message this means that the DHCP client is supposed to re-use the 'xid' from its DHCPDISCOVER for the DHCPREQUEST. --- core/net/ip/dhcpc.c | 2 -- core/net/ip64/ip64-dhcpc.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/core/net/ip/dhcpc.c b/core/net/ip/dhcpc.c index 46ba826da..08023f1e4 100644 --- a/core/net/ip/dhcpc.c +++ b/core/net/ip/dhcpc.c @@ -300,7 +300,6 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data)) } selecting: - xid++; s.ticks = CLOCK_SECOND; do { while(ev != tcpip_event) { @@ -366,7 +365,6 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data)) } /* renewing: */ - xid++; do { while(ev != tcpip_event) { tcpip_poll_udp(s.conn); diff --git a/core/net/ip64/ip64-dhcpc.c b/core/net/ip64/ip64-dhcpc.c index fdb1dd0ec..1ed3ac249 100644 --- a/core/net/ip64/ip64-dhcpc.c +++ b/core/net/ip64/ip64-dhcpc.c @@ -308,7 +308,6 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data)) } selecting: - xid++; s.ticks = CLOCK_SECOND; do { while(ev != tcpip_event) { @@ -374,7 +373,6 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data)) } /* renewing: */ - xid++; do { while(ev != tcpip_event) { tcpip_poll_udp(s.conn);