\r
NewAddress = *((EFI_IP4_CONFIG2_MANUAL_ADDRESS *) Data);\r
\r
+ StationAddress = EFI_NTOHL (NewAddress.Address);\r
+ SubnetMask = EFI_NTOHL (NewAddress.SubnetMask);\r
+\r
+ if (NetGetMaskLength (SubnetMask) == IP4_MASK_NUM) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
//\r
// Store the new data, and init the DataItem status to EFI_NOT_READY because\r
// we may have an asynchronous configuration process.\r
DataItem->DataSize = DataSize;\r
DataItem->Status = EFI_NOT_READY;\r
\r
- StationAddress = EFI_NTOHL (NewAddress.Address);\r
- SubnetMask = EFI_NTOHL (NewAddress.SubnetMask);\r
-\r
IpSb->Reconfig = TRUE;\r
Status = Ip4Config2SetDefaultAddr (IpSb, StationAddress, SubnetMask);\r
if (EFI_ERROR (Status)) {\r