Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aTcZH-0001mL-3p for mharc-grub-devel@gnu.org; Wed, 10 Feb 2016 16:44:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTcZE-0001jL-21 for grub-devel@gnu.org; Wed, 10 Feb 2016 16:44:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTcZ9-000453-Pm for grub-devel@gnu.org; Wed, 10 Feb 2016 16:44:55 -0500 Received: from 66-220-144-178.intmgw.facebook.com ([66.220.144.178]:27628 helo=mx-out.facebook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTcZ9-00044q-Jh for grub-devel@gnu.org; Wed, 10 Feb 2016 16:44:51 -0500 Received: from facebook.com (2401:db00:2040:5012:face:0:9:0) by mx-out.facebook.com (10.102.107.99) with ESMTP id 0d591d24d03c11e597940002c99293a0-ef6fc270 for ; Wed, 10 Feb 2016 13:20:04 -0800 Received: by devbig041.ash4.facebook.com (Postfix, from userid 8730) id C53824540BEE; Wed, 10 Feb 2016 13:21:10 -0800 (PST) From: Josef Bacik To: grub-devel@gnu.org, kernel-team@fb.com Subject: [PATCH 10/14] dns: poll card between each dns request Date: Wed, 10 Feb 2016 13:21:04 -0800 Message-Id: <1455139268-3241273-11-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1455139268-3241273-1-git-send-email-jbacik@fb.com> References: <1455139268-3241273-1-git-send-email-jbacik@fb.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 66.220.144.178 Cc: Josef Bacik X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 21:44:57 -0000 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 --- 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