grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/14] dns: poll card between each dns request


From: Josef Bacik
Subject: [PATCH 10/14] dns: poll card between each dns request
Date: Wed, 10 Feb 2016 13:21:04 -0800

If we have dns servers that we prefer to get AAAA records from we'll send a
packet and immediately check data.naddresses to see if we got a response.  If we
didn't we'll then send a request for an A record, and _then_ we'll poll the
card.  So if the DNS server doesn't respond between us sending the packet and
checking data.naddresses we'll send a request for the A record and then poll the
card.  Instead we need to make sure we poll after we issue each request to make
sure we give the server enough time to respond to our initial request.

Signed-off-by: Josef Bacik <address@hidden>
---
 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 82a3307..86e609b 100644
--- a/grub-core/net/dns.c
+++ b/grub-core/net/dns.c
@@ -587,12 +587,12 @@ grub_net_dns_lookup (const char *name,
                   grub_errno = GRUB_ERR_NONE;
                   err = err2;
                 }
+             grub_net_poll_cards (200, &data.stop);
               if (*data.naddresses)
                 goto out;
             }
           while (t == 1);
        }
-      grub_net_poll_cards (200, &data.stop);
     }
  out:
   grub_free (data.name);
-- 
1.8.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]