Network interface type should be checked before the conversion between
text device path node and MAC device path. Otherwise, the MAC text string
can't be converted to the representation of a device node, which leads to
the series failure of network HII configuration(e.g. IP, VLAN, HTTP Boot
configuration in Network Device List).
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
MACDevPath->IfType = (UINT8) Strtoi (IfTypeStr);\r
\r
Length = sizeof (EFI_MAC_ADDRESS);\r
+ if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) {\r
+ Length = 6;\r
+ }\r
+\r
StrHexToBytes (AddressStr, Length * 2, MACDevPath->MacAddress.Addr, Length);\r
\r
return (EFI_DEVICE_PATH_PROTOCOL *) MACDevPath;\r