efinet Configure network from UEFI device path
authorMichael Chang <mchang@suse.com>
Tue, 25 Apr 2023 15:05:19 +0000 (11:05 -0400)
committerFelix Zielcke <fzielcke@z-51.de>
Mon, 15 Jul 2024 15:05:20 +0000 (17:05 +0200)
commit61a8457a8d34b7d1a80541eefc82b2c2c4243428
tree552fe891078dc0a87c26df1c27bd305ab5cb4cfc
parent699ab79cab7791cc185871db57589e441f3fa93d
efinet Configure network from UEFI device path

The PXE Base Code protocol used to obtain cached PXE DHCPACK packet is
no longer provided for HTTP Boot.  Instead, we have to get the HTTP boot
information from the device path nodes defined in following UEFI
Specification sections.

    9.3.5.12 IPv4 Device Path
    9.3.5.13 IPv6 Device Path
    9.3.5.23 Uniform Resource Identifiers (URI) Device Path

This patch basically does:

include/grub/efi/api.h:
Add new structure for Uniform Resource Identifiers (URI) Device Path

grub-core/net/drivers/efi/efinet.c:

Check if PXE Base Code is available.  If not, try to obtain the netboot
information from the device path where the image booted from.  The
DHCPACK packet is recoverd from the information in device patch and fed
into the same DHCP packet processing functions to ensure the network
interface is set 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>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Gbp-Pq: Topic network
Gbp-Pq: Name efinet-Configure-network-from-UEFI-device-path.patch
grub-core/net/drivers/efi/efinet.c
include/grub/efi/api.h