• Michael Chang's avatar
    efinet: Setting DNS server from UEFI protocol · 309e2fca
    Michael Chang authored
    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: 's avatarMichael Chang <mchang@suse.com>
    Signed-off-by: 's avatarKen Lin <ken.lin@hpe.com>
    
    Patch-Name: efinet_set_dns_from_uefi_proto.patch
    309e2fca
Name
Last commit
Last update
..
drivers Loading commit data...
arp.c Loading commit data...
bootp.c Loading commit data...
dns.c Loading commit data...
ethernet.c Loading commit data...
http.c Loading commit data...
icmp.c Loading commit data...
icmp6.c Loading commit data...
ip.c Loading commit data...
net.c Loading commit data...
netbuff.c Loading commit data...
tcp.c Loading commit data...
tftp.c Loading commit data...
udp.c Loading commit data...