I found that the NetworkPkg code will send out an incorrect PXE option 94 in 
DHCP discover packets during PXE boot.  The option will contain question marks 
in the portion defining the UNDI version. It doesn't seem to be a problem with 
most PXE servers but it was a problem for an obscure, custom DHCP proxy.  The 
code only modifies the default string if an NII protocol exists and an NII 
protocol exists only if a UNDI driver is present.  My implementation only has 
an SNP network driver.  Changing the default string to the only reasonable 
defaults fixes the issue. This is now consistent with the original PXE DHCP 
code in MdeModulePkg.

I exchanged email with Siyuan Fu <[email protected]> who is apparently the 
current NetworkPkg maintainer.  I quote his suggested fix among various that I 
had proposed to him:
"The default value of UNDI device (MajorVer = 0x03, MinorVer = 0x00) was 
defined in Table 177 of UEFI spec 2.4, we can consider it as the "must support" 
version of UNDI device and the upper layer drivers (like your SNP) need to 
provide compatibility if UNDI driver is not present. So I think it's ok to use 
the default value in PXE option 94. For the question mark in vendor class 
option, I think it's better to use "UNDI:003000" to keep consistent with option 
94 if UNDI is absent."

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Larry Cleeton <[email protected]>
---
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
index ee519d9..7396719 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
@@ -127,7 +127,7 @@ typedef enum {

#define BIT(x)                (1 << x)
#define CTRL(x)               (0x1F & (x))
-#define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:?????:????:??????"
+#define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:xxxxx:UNDI:003000"
#define DEFAULT_UNDI_TYPE     1
#define DEFAULT_UNDI_MAJOR    3
#define DEFAULT_UNDI_MINOR    0
--
1.9.0.msysgit.0
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to