public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Possible fix for dns command
Date: Wed, 23 Nov 2011 10:57:33 +0100	[thread overview]
Message-ID: <4ECCC38D.7080604@denx.de> (raw)
In-Reply-To: <459233bc70c319e1a27422d375f9ead9.squirrel@www.inft.de>

On 16/11/2011 13:37, Mathias Adam wrote:
> Hello,
> 
Hi,

> 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.

I have checked this issue, but I am coming to a different conclusion. I
have sniffed the network between the DHCP server and the target, and the
target is able to recognize the option 6 (DNS - name server) of the DHCP
OFFER.

However, the code setting the variable using by the DNS command
("dnsip") is not set if a file is not loaded by the TFTP server.

In cmd_net.c, you see:

        if ((size = NetLoop(proto)) < 0) {
                show_boot_progress (-81);
                return 1;
        }

After that, netboot_update_env is called setting correctly the
variables. So if the transfer stops or is not successful, the dnsip
variable is not updated.

Can you check (it is not the right fix !) if commenting the above return
statement fixes the issue you report ?

> Forcing ARP queries before DNS fixed this (see patch below).

I do not think this is correct.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  parent reply	other threads:[~2011-11-23  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Stefano Babic [this message]
2011-11-23 10:58   ` [U-Boot] Possible fix for " Mathias Adam
2011-11-23 12:11     ` Stefano Babic
2011-11-23 16:24       ` Mathias Adam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ECCC38D.7080604@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox