grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <grub-devel@gnu.org>, <kernel-team@fb.com>, <arvidjaar@gmail.com>
Subject: [PATCH REBASED] net: reset nb->data per dns record lookup loop
Date: Tue, 24 Nov 2015 12:41:35 -0500	[thread overview]
Message-ID: <1448386895-22013-1-git-send-email-jbacik@fb.com> (raw)

We were resetting nb->data every time we tried a new server, but we need to do
it every time we try for a different record, otherwise we don't end up falling
back to the A record properly.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
-This is a rebase onto this mornings master.

 grub-core/net/dns.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
index b7e951a..82a3307 100644
--- a/grub-core/net/dns.c
+++ b/grub-core/net/dns.c
@@ -568,11 +568,10 @@ grub_net_dns_lookup (const char *name,
 	{
           grub_err_t err2;
 
-          nb->data = nbd;
-
           grub_size_t t = 0;
           do
             {
+              nb->data = nbd;
               if (servers[j].option == DNS_OPTION_IPV4 ||
                  ((servers[j].option == DNS_OPTION_PREFER_IPV4) && (t++ == 0)) ||
                  ((servers[j].option == DNS_OPTION_PREFER_IPV6) && (t++ == 1)))
-- 
2.1.0



             reply	other threads:[~2015-11-24 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 17:41 Josef Bacik [this message]
2015-11-24 17:49 ` [PATCH REBASED] net: reset nb->data per dns record lookup loop Andrei Borzenkov

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=1448386895-22013-1-git-send-email-jbacik@fb.com \
    --to=jbacik@fb.com \
    --cc=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=kernel-team@fb.com \
    /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;
as well as URLs for NNTP newsgroup(s).