X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLib%2FEfiSocketLib%2FTcp4.c;h=34e60e2a7f7a951a3b4ee02a084e2f7af9f74938;hb=6e1450f3095c90cf7119a4dbc8e6710daf988444;hp=e7924fa429bc713d3dd7ff7c85903bf20941bd99;hpb=44538ba5aa759c4039fc6c588d33a7fe03503c3f;p=mirror_edk2.git diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c index e7924fa429..34e60e2a7f 100644 --- a/StdLib/EfiSocketLib/Tcp4.c +++ b/StdLib/EfiSocketLib/Tcp4.c @@ -790,6 +790,8 @@ EslTcp4Listen ( // Mark the socket as configured // pSocket->bConfigured = TRUE; + Status = EFI_SUCCESS; + pSocket->errno = 0; // // All done @@ -1155,9 +1157,9 @@ EslTcp4LocalAddressSet ( } else { pAccessPoint->SubnetMask.Addr[0] = 0xff; - pAccessPoint->SubnetMask.Addr[1] = 0xff; - pAccessPoint->SubnetMask.Addr[2] = 0xff; - pAccessPoint->SubnetMask.Addr[3] = 0xff; + pAccessPoint->SubnetMask.Addr[1] = ( 128 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0; + pAccessPoint->SubnetMask.Addr[2] = ( 192 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0; + pAccessPoint->SubnetMask.Addr[3] = ( 224 <= pAccessPoint->StationAddress.Addr[0]) ? 0xff : 0; } //