grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: reset nb->data per dns record lookup loop
@ 2015-11-17 19:07 Josef Bacik
  2015-11-17 19:55 ` Andrei Borzenkov
  0 siblings, 1 reply; 4+ messages in thread
From: Josef Bacik @ 2015-11-17 19:07 UTC (permalink / raw)
  To: grub-devel, kernel-team; +Cc: Josef Bacik

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



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

end of thread, other threads:[~2015-11-20 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 19:07 [PATCH] net: reset nb->data per dns record lookup loop Josef Bacik
2015-11-17 19:55 ` Andrei Borzenkov
2015-11-20 14:47   ` Andrei Borzenkov
2015-11-20 15:04     ` Josef Bacik

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