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.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@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 (
--
2.24.0.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#64453): https://edk2.groups.io/g/devel/message/64453
Mute This Topic: https://groups.io/mt/76290910/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> > -----Original Message----- > From: Maciej Rabeda <maciej.rabeda@linux.intel.com> > Sent: 2020年8月20日 0:54 > To: devel@edk2.groups.io > Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com> > Subject: [PATCH v1] NetworkPkg/UefiPxeBcDxe: Fix PXE_BOOT_SERVERS usage > in boot info parse flow > > 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.wu@intel.com> > Cc: Siyuan Fu <siyuan.fu@intel.com> > Signed-off-by: Maciej Rabeda <maciej.rabeda@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 ( > > -- > 2.24.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64479): https://edk2.groups.io/g/devel/message/64479 Mute This Topic: https://groups.io/mt/76290910/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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.wu@intel.com> > Cc: Siyuan Fu <siyuan.fu@intel.com> > Signed-off-by: Maciej Rabeda <maciej.rabeda@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 <lersek@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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 08/19/20 20:13, Laszlo Ersek wrote: > 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.wu@intel.com> >> Cc: Siyuan Fu <siyuan.fu@intel.com> >> Signed-off-by: Maciej Rabeda <maciej.rabeda@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 <lersek@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. I've repeated my usual PXEv4 boot tests (using OVMF IA32X64 and ArmVirtQemu AARCH64 guests, covering shim + grub + vmlinuz + initrd); nothing seems to have regressed. Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64464): https://edk2.groups.io/g/devel/message/64464 Mute This Topic: https://groups.io/mt/76290910/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
@Laszlo Thanks for regression test! I need to correct the typo in commit msg, (bit 3 -> bit 2). Code logic is not affected. @Michael I am now wondering whether bit 3 is actually relevant to server choice. Bit 3: == 0 -> prompt user to choose a boot file. Which means to me: show minimal menu with prompt (tag 10 - PXE_MENU_PROMPT) and options (tag 9 - PXE_BOOT_MENU). == 1 -> do not prompt user. If boot file name is present (option 67), download that boot file. Bit 3 does not seem to specify/regulate which server to use. Choice of server IP might look like: if (option 43 is present, tag 6 is present, tag_6.bit_2 is set and tag 8 is present and valid) take server IP from tag 8 (PXE_BOOT_SERVERS) else if (option 66 is present) take server IP from option 66 (TFTP server name) else if (option 54 is present) take server IP from option 54 (Server Identifier) else failure Looking forward to discussion. Thanks, Maciej On 19-Aug-20 21:20, Laszlo Ersek wrote: > On 08/19/20 20:13, Laszlo Ersek wrote: >> 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.wu@intel.com> >>> Cc: Siyuan Fu <siyuan.fu@intel.com> >>> Signed-off-by: Maciej Rabeda <maciej.rabeda@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 <lersek@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. > I've repeated my usual PXEv4 boot tests (using OVMF IA32X64 and > ArmVirtQemu AARCH64 guests, covering shim + grub + vmlinuz + initrd); > nothing seems to have regressed. > > Regression-tested-by: Laszlo Ersek <lersek@redhat.com> > > Thanks > Laszlo > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64491): https://edk2.groups.io/g/devel/message/64491 Mute This Topic: https://groups.io/mt/76290910/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 20/08/2020 11:44, Maciej Rabeda wrote: > @Michael > I am now wondering whether bit 3 is actually relevant to server choice. > > Bit 3: > == 0 -> prompt user to choose a boot file. Which means to me: show > minimal menu with prompt (tag 10 - PXE_MENU_PROMPT) and options (tag 9 - > PXE_BOOT_MENU). > == 1 -> do not prompt user. If boot file name is present (option 67), > download that boot file. > > Bit 3 does not seem to specify/regulate which server to use. > > Choice of server IP might look like: > > if (option 43 is present, tag 6 is present, tag_6.bit_2 is set and tag 8 > is present and valid) > take server IP from tag 8 (PXE_BOOT_SERVERS) > > else if (option 66 is present) > take server IP from option 66 (TFTP server name) > > else if (option 54 is present) > take server IP from option 54 (Server Identifier) > > else > failure RFC 2132 defines option 66 as a hostname (not an IP address): it is the equivalent of the non-option "sname" field. RFC 2132 defines option 54 as the DHCP server identifier, which is unrelated to the TFTP server. In the simple case (with no PXE menus involved), the TFTP server IP is provided by the non-option "siaddr" field. If option 60 is set to "PXEClient" and option 43 tag 9 is present and option 43 tag 6 bit 3 is clear then this initiates a convoluted process in which the user is first presented with an interactive menu (constructed from the contents of option 43 tag 9) in order to select a "boot server type", after which a second convoluted process is performed to query the network using a protocol that is almost, but not quite, entirely unlike DHCP. The TFTP server IP and boot filename are eventually taken from the selected response packet in this final almost-DHCP exchange. Michael -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64504): https://edk2.groups.io/g/devel/message/64504 Mute This Topic: https://groups.io/mt/76290910/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 08/20/20 15:41, Michael Brown wrote: > On 20/08/2020 11:44, Maciej Rabeda wrote: >> @Michael >> I am now wondering whether bit 3 is actually relevant to server choice. >> >> Bit 3: >> == 0 -> prompt user to choose a boot file. Which means to me: show >> minimal menu with prompt (tag 10 - PXE_MENU_PROMPT) and options (tag 9 >> - PXE_BOOT_MENU). >> == 1 -> do not prompt user. If boot file name is present (option 67), >> download that boot file. >> >> Bit 3 does not seem to specify/regulate which server to use. >> >> Choice of server IP might look like: >> >> if (option 43 is present, tag 6 is present, tag_6.bit_2 is set and tag >> 8 is present and valid) >> take server IP from tag 8 (PXE_BOOT_SERVERS) >> >> else if (option 66 is present) >> take server IP from option 66 (TFTP server name) >> >> else if (option 54 is present) >> take server IP from option 54 (Server Identifier) >> >> else >> failure > > RFC 2132 defines option 66 as a hostname (not an IP address): it is the > equivalent of the non-option "sname" field. > > RFC 2132 defines option 54 as the DHCP server identifier, which is > unrelated to the TFTP server. > > In the simple case (with no PXE menus involved), the TFTP server IP is > provided by the non-option "siaddr" field. > > If option 60 is set to "PXEClient" and option 43 tag 9 is present and > option 43 tag 6 bit 3 is clear then this initiates a convoluted process > in which the user is first presented with an interactive menu > (constructed from the contents of option 43 tag 9) in order to select a > "boot server type", after which a second convoluted process is performed > to query the network using a protocol that is almost, but not quite, > entirely unlike DHCP. The TFTP server IP and boot filename are > eventually taken from the selected response packet in this final > almost-DHCP exchange. *shudder* I'll 100% defer to you and Maciej on this -- this is very complicated. To begin with, I'm not fully clear what the purpose of edk2 git commit ecec42044078 ("Update PXE driver to support PXE forced mode.", 2014-01-06) was. What on Earth is "PXE forced mode"? Siyuan, can you please explain? And then I don't know whether the bug report at https://bugzilla.tianocore.org/show_bug.cgi?id=2876 really has merit. In the words of the reporter, the presently discussed patch would still qualify as a "work-around", for making the PXE client ignore PXE_BOOT_SERVERS, via clearing option#43 tag#6 bit#2 in the DHCP server response. But IMO the more important question is whether it is valid for the DHCP server (config) at their site to (a) populate PXE_BOOT_SERVERS, (b) put (apparently!) the ProxyDHCP IP address in PXE_BOOT_SERVERS. Like, I'd like to be convinced that the server config at the reporter's site is not *invalid* in the first place. If it's invalid, then we shouldn't be complicating the edk2 client code with a workaround. Even if we adopted the workaround, the reporter would still have to *activate* it, by manually clearing the bit in question (see at the very end of <https://bugzilla.tianocore.org/show_bug.cgi?id=2876#c4>). For me one big difficulty is that the PXE config options are scattered about a forest of specs. Last time I spent more than an hour cursing and hunting for them. At Red Hat, over the last few years I've received an immense amount of bug reports related to PXEv4/PXEv6 booting with edk2. In almost every case, it was a bug in the reporter's server configuration. Yes, anecdotal evidence. It makes me very reluctant to change the edk2 code, especially that the reporter of TianoCore#2876 has seemingly stopped communications. Note how the bug report makes references to various attachments, such as RAR files and one "Serva32.exe", regarding a reproducer. But until now, with the latest comment being #9, those files have *not* been attached. So it's not like we can set up some virtual machines on a virtual network and fire up wireshark or tcpdump, to see the actual traffic. I'm happy to pull out of this review session, as I trust you Michael and Maciej to do the right here. I'm happy to offer some level of regression testing, if you got new patches. I'd also be OK to simply close TianoCore#2876 as INVALID (due to insufficient data). Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64530): https://edk2.groups.io/g/devel/message/64530 Mute This Topic: https://groups.io/mt/76290910/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Thank you for your attention to this issue, current status we already fix our customer problem, but we don’t know the root cause whether related to server configuration or EDK2 code. I have no concerns with close TianoCore#2876 as INVALID Thank you all. Attached package is server configuration files, PSW: 123 How to reproduce: 1. Prepare three machines for server and a switch with at least 4 LAN ports (you can also use a router instead). The machine will use Windows 10 system 2. Connect all three machines to the switch with a network cable. The switch does not need to be connected to an external network. 3. Turn off the firewalls on each machine 4. Set the static Address of the first machine to 192.168.20.2, extract the TFTP.rAR package and copy it to the root directory of Disk C, click Serva32. exe and wait for 7 seconds, then click "Thanks, not today..." The button 5. Set the second machine static IP 192.168.20.100, extract dhCp.rar and copy it to the root directory of Disk C, and click Serva32.exe 6. Set the third machine static IP 192.168.20.10, extract copy of proxydhcp.rar and proxydhcpworking. Rar to the root directory of Disk C, just click serva32.exe in the proxydhCP folder 7. Ping the machines to make sure they are connected 8. To prepare a fourth machine, connected to the switch. 9. Set UEFI only Mode in the BIOS (the fourth machine ) , Restart the machine press F12 to enter the boot page and select PXE Boot. you will see the fourth machine connect to proxydhcp-> problem problem: [cid:image005.jpg@01D677EC.DD9D2960] Expection: [cid:image006.jpg@01D677EC.DD9D2960] -----邮件原件----- 发件人: Laszlo Ersek <lersek@redhat.com> 发送时间: Friday, August 21, 2020 5:11 PM 收件人: Michael Brown <mcb30@ipxe.org>; devel@edk2.groups.io; maciej.rabeda@linux.intel.com 抄送: Jiaxin Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Ding, Seven <Seven.ding@lcfuturecenter.com> 主题: Re: [edk2-devel] [PATCH v1] NetworkPkg/UefiPxeBcDxe: Fix PXE_BOOT_SERVERS usage in boot info parse flow On 08/20/20 15:41, Michael Brown wrote: > On 20/08/2020 11:44, Maciej Rabeda wrote: >> @Michael >> I am now wondering whether bit 3 is actually relevant to server choice. >> >> Bit 3: >> == 0 -> prompt user to choose a boot file. Which means to me: show >> minimal menu with prompt (tag 10 - PXE_MENU_PROMPT) and options (tag 9 >> - PXE_BOOT_MENU). >> == 1 -> do not prompt user. If boot file name is present (option 67), >> download that boot file. >> >> Bit 3 does not seem to specify/regulate which server to use. >> >> Choice of server IP might look like: >> >> if (option 43 is present, tag 6 is present, tag_6.bit_2 is set and tag >> 8 is present and valid) >> take server IP from tag 8 (PXE_BOOT_SERVERS) >> >> else if (option 66 is present) >> take server IP from option 66 (TFTP server name) >> >> else if (option 54 is present) >> take server IP from option 54 (Server Identifier) >> >> else >> failure > > RFC 2132 defines option 66 as a hostname (not an IP address): it is the > equivalent of the non-option "sname" field. > > RFC 2132 defines option 54 as the DHCP server identifier, which is > unrelated to the TFTP server. > > In the simple case (with no PXE menus involved), the TFTP server IP is > provided by the non-option "siaddr" field. > > If option 60 is set to "PXEClient" and option 43 tag 9 is present and > option 43 tag 6 bit 3 is clear then this initiates a convoluted process > in which the user is first presented with an interactive menu > (constructed from the contents of option 43 tag 9) in order to select a > "boot server type", after which a second convoluted process is performed > to query the network using a protocol that is almost, but not quite, > entirely unlike DHCP. The TFTP server IP and boot filename are > eventually taken from the selected response packet in this final > almost-DHCP exchange. *shudder* I'll 100% defer to you and Maciej on this -- this is very complicated. To begin with, I'm not fully clear what the purpose of edk2 git commit ecec42044078 ("Update PXE driver to support PXE forced mode.", 2014-01-06) was. What on Earth is "PXE forced mode"? Siyuan, can you please explain? And then I don't know whether the bug report at https://bugzilla.tianocore.org/show_bug.cgi?id=2876 really has merit. In the words of the reporter, the presently discussed patch would still qualify as a "work-around", for making the PXE client ignore PXE_BOOT_SERVERS, via clearing option#43 tag#6 bit#2 in the DHCP server response. But IMO the more important question is whether it is valid for the DHCP server (config) at their site to (a) populate PXE_BOOT_SERVERS, (b) put (apparently!) the ProxyDHCP IP address in PXE_BOOT_SERVERS. Like, I'd like to be convinced that the server config at the reporter's site is not *invalid* in the first place. If it's invalid, then we shouldn't be complicating the edk2 client code with a workaround. Even if we adopted the workaround, the reporter would still have to *activate* it, by manually clearing the bit in question (see at the very end of <https://bugzilla.tianocore.org/show_bug.cgi?id=2876#c4>). For me one big difficulty is that the PXE config options are scattered about a forest of specs. Last time I spent more than an hour cursing and hunting for them. At Red Hat, over the last few years I've received an immense amount of bug reports related to PXEv4/PXEv6 booting with edk2. In almost every case, it was a bug in the reporter's server configuration. Yes, anecdotal evidence. It makes me very reluctant to change the edk2 code, especially that the reporter of TianoCore#2876 has seemingly stopped communications. Note how the bug report makes references to various attachments, such as RAR files and one "Serva32.exe", regarding a reproducer. But until now, with the latest comment being #9, those files have *not* been attached. So it's not like we can set up some virtual machines on a virtual network and fire up wireshark or tcpdump, to see the actual traffic. I'm happy to pull out of this review session, as I trust you Michael and Maciej to do the right here. I'm happy to offer some level of regression testing, if you got new patches. I'd also be OK to simply close TianoCore#2876 as INVALID (due to insufficient data). Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64540): https://edk2.groups.io/g/devel/message/64540 Mute This Topic: https://groups.io/mt/76332354/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=- 7z��' I�vF�% 9 ��c�j��;,:�`���W�����昙KD���I�px��I�ц������$ScJ���Z��>�6�# ���۟F�RT)�6ċ�tt�H�ۚH���T^�1O V ��x��21p.R�뇇x�6��k��ˣeaSYن?{�U@p�&�4�s_��@�b9�Z�p#YmF���ۛu��5 �0J�0(j��g�J!���ao��5���������90���?�B%j�(�5�o��lQŻ�2�7�I�d�$� obQ��=�4�Μ1c��8��"Ѹ�~@���\l&U����6T6Х��?��7C�F+JzeZ �d�SBX�]�z��+� ��18^`�����J�KXzP��Kt��[$8H��>]κ�PC1��Y6h��~����+uOC�m�H߾=-�r���T��'�}�_O� '��>A�D��E=S�zHq�d��"�b+�;��5\��'9`0�C�b!�� ��������ӆN�,7�z��m�����@n1cf7�T� H��I�9h{���ݭ^!�e �ͺΡ�=��/P�4�0W�����Or�7��\1��'�+��P�w4c��^�O���v�K�rt�҈���{&��2�������?C�X���S�ڌ�1����M7�B���y�Q5{�d�,����0��]%���GY�-z��ڥ�Ϭa�O�4P�xA�,e�iJ�]]}Kă̶$�T�U7W�mT=F^�_XY]g�:oU9ԦRHk�^��b�Q���P�!��+��v� <;G5rNhR�J@� �]U����j�_���4F�Q�d��RL@-��4Ԝ�-l���lM��b|؎� ���>�h����v��T�D W����!�;H���F6��t� ��Ѡ����ɬ����=]1Zw�47V"�4�ʼK��ƇQ�S�o�G%���({H�ċW��Y'$О�mN�Jq���E����G�#���8�{M�����,Cԁ�^=�-��<�̨��<�l�!�(/۩ʻ�$��>�*��ͥ�1�;�t�����Yٶ�J,O��_�eDc-��n��D�G>1z��~����p���Oj&���;�^c�́z�}Q�����?�0S���K��Q�r31^�<ł�t�k�h�&�$ yZ�.�[ �j�IO�G0���&��at;�7j"��q��i`���4~P��k=E<��ܦO�m.'���Ӭ&�p�� 2b�۱"���)�e�۴R��HxĶ���w�=^駄,d�� �����a��� �+>�D]��A�"�U�l�F� e��7��fYłʮ�p՞�"P�ڝ������=@h$s,{FjIV�ۺf�,sE����y90��'��nk6�*��W��{�SF�쿕�_�'��Fq���'nX�FV��3xzh]�������#T��2� ���طu`/�fL�� R����,�>��&E0���d ��n^z��S���xOR���K�Ğ�i�,�D%�/���0b,�h?>�����t�;�� ���5F��o�%������/�,�S�(g�F��<���/$H<S�Q>,уsG?�Ig,S��4���N`I�h�n�u�s��R�aW�G1�h��=I�-���ca`j�7��X_{ʣ�$���� ��/��Z�K<و��~��3n�q8��¹���^WW~�yҦ�F-JQ�p��' G��nD��~�j�'R7o���6�3�茥050MZ[�0���ԁၺnJ�惠��=��c�*�f��#���l@�$'h'y=�h�X�8�5�X��˭̹c�쁽H-��_w�2�E��t�H[�S��,gR�k��w�D��kC������zŒό�O� =��*3J�� ��1�^9�g��2��["��_�WF>�X��(�M�p���o䤜��7& Z;p��\@���8i���K���[}iK�X��FcZ��VjnQ�NV�e'r|���+�8Ĉ��Y��~�)#eY��a-��������9�V8�y�K���O�P�ڂ虌��2t3� ��vM0F�Z���I�Ȼ�PR�o�S3�zX��Z��8��wٲΧ���������K���E�>����M'Vp�w:H'�qC�Q��~����W.���A]��Pc��M�y +�*�BAU�E�a�;��A���g��*�% ����RX��rc�K�7j0�Ix��g/�����z�,Z����=g��9�l: 6Ws��!�9��c�E�a��X��^��7�_��P���N:�L�^Wܶ�!�?�q�����=�O����E��1��/��n�o��_�]�P�Ė��q��%KV ����u���ᢙ�i�矜��ի�V�9�#&*s b�����$/��Q�FPE!�*�l�;�c�H)D���Y�_U���,�s����S���(����4��5(āT��T�T���G\�3G�aVЧ��6�<���ԝ'tLt4&UA�R|�>p>��ڛ��T��H´%X��f��:1!�N��G���� ��YB�v<�nr� �7Cl�;�����33&���a��4��u�a��q�e��J}��=�qG�KD\)��X�Ȃɑ(��Vm��T�G�n��9��Oq �^7�UV��4���E��|��d�+�{k����-��I6��w����C��I�b�����37�'�6���U:�́A�P� Orf"A/;,�x���N��(7H ��0�0B3�HbF�7y8�W,���E��CZt{���B�?o�7�;Iͯ����x\]�t��x�?�(����>��?M0��J+�~Wѻ�~��9�F Yn��UYBtS���lTU����O�ǖ��Ѿ�B��~��ojοbDd��q�|l�k�0�Y�ʞ|� ���@����� 'Y��p�+�" X>��� �ޡ|�iϼ� !2�t&��"�����!��8Ȅ�������']���(��V���I?w`��Ԥ��l,e�2�S]�r�'Lv��>{V�V2���^?�%W�?�ɹ���.-m��'�l}5o��o�&�h%ts���ɨ{T)U6O�$�TE<��*�jZ�.ϋ�������ނ�vn�2�·� ��G ��p���۶����d�^[nD� �%5�D��H�H�ͼJy���E ȉ���m��~I$�� *y�B)�����rRH@{��5�L[�* ��KN��'Z���2�>c�J�R�w�Z�)��*侮`�L����rV����ͥ�ӷ���.;Cf&�5�c%��tc���(7r¿�~5���ѱ����o���:���r4N�`z��E��"�5���Ge�&m�aV��m.��%�`Bhp� S�7�"�H�ը=�v��SK��!!��b(*��+>P�p���ca��*�#�jQBv��>��RON}1��0�ܘ���ДQ�٘���T�6XFY���M��W��Фs��'rA"�ܒ��-QHY�E�2����{Uj.02�8 ��A�����U����Z��$@<���d�O��x8 �v�Ė�R]�iR��,�+u�۽ߑ]�:�np����sc�W�d!�6���,�A��xF]���f��Ȗ�u���85 w��9�7$g�a�ܲ��Ҭ�T!$g\ �TN�={h"#p�5��*�Tj~�)�{�(-��o� �� �h�|v�~!�!DQu_�Q~����*�e�ڐՖrˋ�~�`�[�;(sw��uE�����I'�QOY��� ���\FG�c����<�6߃�ޖ�1��� $���n�W[ȱ�1kfX<���&�/t��ǣ8^����Xatj�l憐1e��#2� F�}ӗh+�!zi�T\W�e��b�t��J�/IIX�|��Vqm�Y�W� �B=� �ί6��-ϱ-�u `���� �<;a@29�/g��̒˩ד�`�73�f�w{d���v0�(���P��A����e��v���ߝ6J���)%��c'�}��|sF'��=l���%���x#�Εe�AW*0�sS��}�PP��������#���cܼ�]�K�\����]��s��Ki�R����B� �d��ug��;��a�<܈��&����F���ZS�tg3d����l0�Lmw����,a �� ���dM,Ii�4�$$��X��\�0�_��E� ��^R�l@J�C�AD��1'> ���� }�{�$�� �ۆ+� ��i�iK���������e�<.�'(����oS@?3Y��&�����#�:`�G��Q�9?D��S�<w�ث��[�A�Y����/��avgA.|}�����2� �Y��A�Zs:��h��aC�+������J,�˃�(Ip �1� S�o�&��4S5�!�UH���(fH?%�mi���VS�����V�ۨ�j�ӻ���'/. h���Y^ ����]��l̺��w;� ����)��21�*5��=J6*u:}ݛ�O�P�5�����$��A7��m���"��͈ݺ�6{��c��\��H�`?F v2%;�,l҈9�.�=:P��àմ �BԹ ���.�ȥ��]�"�����?g���wϠ�cH���1 �=dd�E��1�$��}��`�Q��*���w l �7AKk��Φs2W/�|=�F��r��TCb燩��D"����ܗh��IR���5� ⮫�n��{!=���M�[@< ��[�&