grub2/grub-core/net
Michael Chang 309e2fcabe efinet: Setting DNS server from UEFI protocol
In the URI device path node, any name rahter than address can be used for
looking up the resources so that DNS service become needed to get answer of the
name's address. Unfortunately the DNS is not defined in any of the device path
nodes so that we use the EFI_IP4_CONFIG2_PROTOCOL and EFI_IP6_CONFIG_PROTOCOL
to obtain it.

These two protcols are defined the sections of UEFI specification.

 27.5 EFI IPv4 Configuration II Protocol
 27.7 EFI IPv6 Configuration Protocol

include/grub/efi/api.h:
Add new structure and protocol UUID of EFI_IP4_CONFIG2_PROTOCOL and
EFI_IP6_CONFIG_PROTOCOL.

grub-core/net/drivers/efi/efinet.c:
Use the EFI_IP4_CONFIG2_PROTOCOL and EFI_IP6_CONFIG_PROTOCOL to obtain the list
of DNS server address for IPv4 and IPv6 respectively. The address of DNS
servers is structured into DHCPACK packet and feed into the same DHCP packet
processing functions to ensure the network interface is setting up the same way
it used to be.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>

Patch-Name: efinet_set_dns_from_uefi_proto.patch
2017-06-23 10:24:11 +01:00
..
drivers efinet: Setting DNS server from UEFI protocol 2017-06-23 10:24:11 +01:00
arp.c net: trivial grub_cpu_to_XX_compile_time cleanup 2015-03-27 18:58:57 +03:00
bootp.c bootp: Add processing DHCPACK packet from HTTP Boot 2017-06-23 10:24:11 +01:00
dns.c dns: fix buffer overflow for data->addresses in recv_hook 2016-07-26 20:38:58 +03:00
ethernet.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
http.c net: read bracketed ipv6 addrs and port numbers 2017-06-23 10:24:11 +01:00
icmp6.c net: fix ipv6 routing 2016-02-25 22:38:52 +03:00
icmp.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
ip.c bootp: New net_bootp6 command 2017-06-23 10:24:11 +01:00
net.c net: read bracketed ipv6 addrs and port numbers 2017-06-23 10:24:11 +01:00
netbuff.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
tcp.c tcp: fix memory leaks 2016-01-16 20:59:50 +03:00
tftp.c net: read bracketed ipv6 addrs and port numbers 2017-06-23 10:24:11 +01:00
udp.c * grub-core/disk/ahci.c: Add needed explicit cast. 2013-08-21 21:02:14 +02:00