From: Josef Bacik <jbacik@fb.com>
To: grub-devel@gnu.org, kernel-team@fb.com
Cc: Josef Bacik <jbacik@fb.com>
Subject: [PATCH] net: reset nb->data per dns record lookup loop
Date: Tue, 17 Nov 2015 11:07:31 -0800 [thread overview]
Message-ID: <1447787251-1433231-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>
---
grub-core/net/dns.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
index c356318..9291aec 100644
--- a/grub-core/net/dns.c
+++ b/grub-core/net/dns.c
@@ -570,11 +570,11 @@ grub_net_dns_lookup (const char *name,
grub_err_t err2;
if (!sockets[j])
continue;
- 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)))
--
1.8.1
next reply other threads:[~2015-11-17 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 19:07 Josef Bacik [this message]
2015-11-17 19:55 ` [PATCH] net: reset nb->data per dns record lookup loop Andrei Borzenkov
2015-11-20 14:47 ` Andrei Borzenkov
2015-11-20 15:04 ` Josef Bacik
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=1447787251-1433231-1-git-send-email-jbacik@fb.com \
--to=jbacik@fb.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).