net: reset nb->data per dns record lookup loop
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 commit is contained in:
parent
6a46cbcc5c
commit
f9d1b4422e
1 changed files with 1 additions and 2 deletions
|
@ -568,11 +568,10 @@ grub_net_dns_lookup (const char *name,
|
||||||
{
|
{
|
||||||
grub_err_t err2;
|
grub_err_t err2;
|
||||||
|
|
||||||
nb->data = nbd;
|
|
||||||
|
|
||||||
grub_size_t t = 0;
|
grub_size_t t = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
nb->data = nbd;
|
||||||
if (servers[j].option == DNS_OPTION_IPV4 ||
|
if (servers[j].option == DNS_OPTION_IPV4 ||
|
||||||
((servers[j].option == DNS_OPTION_PREFER_IPV4) && (t++ == 0)) ||
|
((servers[j].option == DNS_OPTION_PREFER_IPV4) && (t++ == 0)) ||
|
||||||
((servers[j].option == DNS_OPTION_PREFER_IPV6) && (t++ == 1)))
|
((servers[j].option == DNS_OPTION_PREFER_IPV6) && (t++ == 1)))
|
||||||
|
|
Loading…
Reference in a new issue