[U-Boot] Possible fix for dns command
Mathias Adam
m.adam--uboot at adamis.de
Tue Nov 22 12:37:49 CET 2011
repost, in case my mail from last week was lost somewhere...
Am Mi, 16.11.2011, 13:37 schrieb Mathias Adam:
> 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
>
More information about the U-Boot
mailing list