issue separate DNS queries for ipv4 and ipv6
Adding multiple questions on a single DNS query is not supportted by most DNS servers. This patch issues two separate DNS queries sequentially for ipv4 and then for ipv6. Fixes: https://savannah.gnu.org/bugs/?39710 * grub-core/net/bootp.c (parse_dhcp_vendor): Add DNS option. * grub-core/net/dns.c (grub_dns_qtype_id): New enum. * (grub_net_dns_lookup): Now using separated dns packages. * (grub_cmd_nslookup): Add error condition. * (grub_cmd_list_dns): Print DNS option. * (grub_cmd_add_dns): Add four parameters: --only-ipv4, * --only-ipv6, --prefer-ipv4, and --prefer-ipv6. * include/grub/net.h (grub_dns_option_t): New enum. * (grub_net_network_level_address): option added. Also-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com> Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
This commit is contained in:
parent
339eacce1b
commit
9e236169e9
4 changed files with 125 additions and 39 deletions
|
@ -123,6 +123,7 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
|
|||
struct grub_net_network_level_address s;
|
||||
s.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
|
||||
s.ipv4 = grub_get_unaligned32 (ptr);
|
||||
s.option = DNS_OPTION_PREFER_IPV4;
|
||||
grub_net_add_dns_server (&s);
|
||||
ptr += 4;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue