On 08/19/20 18:53, Maciej Rabeda wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2876
> 
> According to PXE 2.1 spec, DHCP option 43, tag 6 (PXE_DISCOVERY_CONTROL),
> bit 3 specifies whether PXE client should use/accept TFTP servers defined
> within PXE_BOOT_SERVERS list (tag 8). This bit was not being taken into
> account when choosing boot server IP in PxeBcDhcp4BootInfo().
> 
> Cc: Jiaxin Wu <jiaxin...@intel.com>
> Cc: Siyuan Fu <siyuan...@intel.com>
> Signed-off-by: Maciej Rabeda <maciej.rab...@linux.intel.com>
> ---
>  NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c 
> b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
> index d062a526077b..ed9bca0f7de3 100644
> --- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
> +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
> @@ -499,12 +499,16 @@ PxeBcDhcp4BootInfo (
>  
>    //
>    // Parse the boot server address.
> -  // If prompt/discover is disabled, get the first boot server from the boot 
> servers list.
> -  // Otherwise, parse the boot server Ipv4 address from next server address 
> field in DHCP header.
> +  // If prompt/discover is disabled, server list should be used and is 
> present (DHCP option 43),
> +  // get the first boot server from the boot servers list.
> +  // Otherwise, parse the boot server IPv4 address from next server address 
> field in DHCP header.
>    // If all these fields are not available, use option 54 instead.
>    //
>    VendorOpt = &Cache4->VendorOpt;
> -  if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) && 
> IS_VALID_BOOT_SERVERS (VendorOpt->BitMap)) {
> +  if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) &&
> +      IS_VALID_BOOT_SERVERS (VendorOpt->BitMap) &&
> +      IS_ENABLE_USE_SERVER_LIST (VendorOpt->DiscoverCtrl))
> +  {
>      Entry = VendorOpt->BootSvr;
>      if (VendorOpt->BootSvrLen >= sizeof (PXEBC_BOOT_SVR_ENTRY) && 
> Entry->IpCnt > 0) {
>        CopyMem (
> 

I'm still undecided whether option#43 / tag#6 / bit#3 being clear means
we should *ignore* PXE_BOOT_SERVERS (tag#8), but I'm willing to defer to
you on that. So, I can give a cautious

Reviewed-by: Laszlo Ersek <ler...@redhat.com>

for this patch.

Regarding the feature freeze -- in theory, this is a bugfix. However,
before we merge it, it would be really nice to get feedback from the
original reporter (CC'd).

I also intend to regression-test this patch, I'll report back.

Thanks,
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#64461): https://edk2.groups.io/g/devel/message/64461
Mute This Topic: https://groups.io/mt/76290910/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to