Skip to contentSkip to conversation

DHCP via relay

PATCH New DENX Support System 1 participant 1 message Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DHCP via relay

Hello list,

inside the automatic U-Boot patch tracking system a new ticket [DNX#2006040142000311] was created:

<snip>

Quoted 36 lines

Hi,

I am using u-boot 1.1.4 and I discover a problem with DHCP via DHCP Relay. I think that u-boot incorrectly sets some fields in DHCP Request packet. See RFC 2131, chapter 4.4.

CHANGELOG:
* Fix DHCP support (DHCP Relay problem)
Patch by Petr Borsodi, 21 Jan 2006

diff -uprN u-boot-1.1.4/net/bootp.c u-boot-1.1.4-dhcp/net/bootp.c

net/bootp.c +1 -1
+0100
@@ -820,10 +820,10 @@ static void DhcpSendRequestPkt(Bootp_t *
 	bp->bp_hlen = HWL_ETHER;
 	bp->bp_hops = 0;
 	bp->bp_secs = htons(get_timer(0) / CFG_HZ);
-	NetCopyIP(&bp->bp_ciaddr, &bp_offer->bp_ciaddr); /* both in

network byte order */

net/bootp.c +4 -3
-	NetCopyIP(&bp->bp_yiaddr, &bp_offer->bp_yiaddr);
-	NetCopyIP(&bp->bp_siaddr, &bp_offer->bp_siaddr);
-	NetCopyIP(&bp->bp_giaddr, &bp_offer->bp_giaddr);
+	NetCopyIP(&bp->bp_ciaddr, &NetOurIP);
+	NetWriteIP(&bp->bp_yiaddr, 0);
+	NetWriteIP(&bp->bp_siaddr, 0);
+	NetWriteIP(&bp->bp_giaddr, 0);
 	memcpy (bp->bp_chaddr, NetOurEther, 6);
 
 	/*

Petr Borsodi

Quoted 10 lines

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

</snip>

Your U-Boot support team