diff options
author | Eric Bénard <eric@eukrea.com> | 2015-01-29 00:42:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-29 08:39:03 +0100 |
commit | 1f9cf67ab05b2034659dc21ebb7ae78c4ef1019b (patch) | |
tree | 203f493a05f1e02eaead1a6139c020f481843c95 /net | |
parent | abf0033be79217f51719d027955fcd86d16d21a4 (diff) | |
download | barebox-1f9cf67ab05b2034659dc21ebb7ae78c4ef1019b.tar.gz barebox-1f9cf67ab05b2034659dc21ebb7ae78c4ef1019b.tar.xz |
dhcp: fix request packet's requested IP option
In the request packet, we are supposed to copy the IP that the DHCP server
provided in the offer packet so that dhcp_extended can fill the option 50.
There is actually an error in barebox as the pointer to the packet currently
built is used as the source instead of the pointer to the offer packet.
With this patch, barebox now sends a request packet which includes the right
requested IP in option 50.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/dhcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dhcp.c b/net/dhcp.c index 9551d60ad4..a22fad0f3a 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -579,7 +579,7 @@ static void dhcp_send_request_packet(struct bootp *bp_offer) /* * Copy options from OFFER packet if present */ - net_copy_ip(&OfferedIP, &bp->bp_yiaddr); + net_copy_ip(&OfferedIP, &bp_offer->bp_yiaddr); extlen = dhcp_extended((u8 *)bp->bp_vend, DHCP_REQUEST, net_dhcp_server_ip, OfferedIP); |