diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-02-04 19:09:15 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-02-04 19:09:15 +0100 |
commit | 37052f6c9b66c0516c2af00b0b7bc615db6b6320 (patch) | |
tree | eef8b643e2aa6f3c72de10c9575f28706df6b36a /net | |
parent | 7b0f932bcdfadf37e8d25388b29266faa3d3c824 (diff) | |
parent | 223adf761b6c3cc7e4535769a917e0c02b334302 (diff) | |
download | barebox-37052f6c9b66c0516c2af00b0b7bc615db6b6320.tar.gz barebox-37052f6c9b66c0516c2af00b0b7bc615db6b6320.tar.xz |
Merge branch 'for-next/net'
Diffstat (limited to 'net')
-rw-r--r-- | net/dhcp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/dhcp.c b/net/dhcp.c index 9551d60ad4..19a846270e 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -557,11 +557,8 @@ static void dhcp_send_request_packet(struct bootp *bp_offer) bp->bp_htype = HWT_ETHER; bp->bp_hlen = HWL_ETHER; bp->bp_hops = 0; - /* FIXME what is this? */ -// bp->bp_secs = htons(get_timer(0) / CFG_HZ); - net_copy_ip(&bp->bp_ciaddr, &bp_offer->bp_ciaddr); /* both in network byte order */ - net_copy_ip(&bp->bp_yiaddr, &bp_offer->bp_yiaddr); - net_copy_ip(&bp->bp_siaddr, &bp_offer->bp_siaddr); + bp->bp_secs = htons(get_time_ns() >> 30); + /* * RFC3046 requires Relay Agents to discard packets with * nonzero and offered giaddr @@ -579,7 +576,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); |