[syslinux] patch for UEFI PXE booting bugs

Patrick Masotta masottaus at yahoo.com
Mon May 4 08:32:56 PDT 2015


>>>
 PXE booting in UEFI mode of HP
 Proliant Gen9 will fail if the nic port
 used is not the first one enumerated.
 Based on syslinux 6.03, several modifications have to be
 made in the
 EFI supporting codes.
 1. The function "net_parse_dhcp". Instead of using the first
 handle
 that returns EFI_SUCCESS, a check on the DhcpAckReceived is
 made. The
 index and the total number handles are saved in global
 variables.
 2. Function "efi_create_binding". Instead of using the first
 handle
 that returns EFI_SUCCESS, a best guess on the working handle
 is made
 and used directly.
 3. Functions "core_udp_connect" and "core_udp_sendto". The
 ip address
 in the global variable IPInfo is used instead of the default
 address!
<<<

Hi Dashi,
Thanks for your patch.
I agree with you that taking the first PXE handle that returns EFI_SUCCESS is not
a good approach for multihomed clients. But your patch detects if the handle was 
the one used to PXE boot the system only by checking the "DhcpAckReceived" flag.
I "think" this is not correct. i.e. consider the case of a client where NIC_1 is connected 
to a network that only has a regular DHCP server (non-PXE) while its NIC_2 is connected 
to a real PXE network; your code would take the handle corresponding to NIC_1 what would
be wrong.

I "think" the detection should be done asking for "PxeReplyReceived" first, then for "ProxyOfferReceived":
if either flag is true then the handle represents the one used in a successful PXE boot transaction, surely
the one that brought syslinux.efi to the client, then the right handle.

see an example of this detection at function DiscoverBootFile() at UDK2014
\MyWorkSpace\MdeModulePkg\Universal\Network\UefiPxeBcDxe\PxeBcImpl.c

see also my patch
http://www.syslinux.org/archives/2015-March/023326.html

Best,
Patrick






More information about the Syslinux mailing list