public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Possible fix for dns command
@ 2011-11-16 12:37 Mathias Adam
  2011-11-22 11:37 ` Mathias Adam
  2011-11-23  9:57 ` [U-Boot] Possible fix for " Stefano Babic
  0 siblings, 2 replies; 9+ messages in thread
From: Mathias Adam @ 2011-11-16 12:37 UTC (permalink / raw)
  To: u-boot

Hello,

I'm currently using u-boot on a TI DM816x evaluation board (u-boot as
included in TI's EZSDK 5.02). I manually enabled CONFIG_CMD_DNS. However,
running dhcp followed by dns <some_host_name> only gave timeouts.

I found (using #define DEBUG) that DNS UDP queries are being sent to the
MAC of the DHCP server -- which is not equal to the DNS server, hence the
timeouts. Forcing ARP queries before DNS fixed this (see patch below). I
copyied that line from net/tftp.c (which works out of the box).

However, as I'm quite new to u-boot I'm not sure whether that behaviour is
intended or if my patch breaks other things?

Patch (against plain u-boot-2011.09):

--- net/dns.c	2011-09-29 21:11:15.000000000 +0200
+++
../ti-ezsdk_dm816x-evm_5_02_02_60/board-support/u-boot-2010.06-psp04.00.00.12/net/dns.c	2011-11-16
10:35:38.335903630 +0100
@@ -206,5 +206,8 @@
 	NetSetTimeout(DNS_TIMEOUT, DnsTimeout);
 	NetSetHandler(DnsHandler);
+	/* zero out server ether in case the server ip has changed */
+	memset(NetServerEther, 0, 6);
+
 	DnsSend();
 }



Regards,
Mathias Adam

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-23 20:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16 12:37 [U-Boot] Possible fix for dns command Mathias Adam
2011-11-22 11:37 ` Mathias Adam
2011-11-22 19:01   ` Wolfgang Denk
2011-11-23 16:27     ` [U-Boot] [PATCH] Fix " Mathias Adam
2011-11-23 20:59       ` Graeme Russ
2011-11-23  9:57 ` [U-Boot] Possible fix for " Stefano Babic
2011-11-23 10:58   ` Mathias Adam
2011-11-23 12:11     ` Stefano Babic
2011-11-23 16:24       ` Mathias Adam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox