Import ArpDxe, Dhcp4Dxe, Ip4Dxe, Mtftp4Dxe, PxeBcDxe and PxeDhcp4Dxe.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3492 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -144,6 +144,7 @@ Tcp4Configure (
|
||||
EFI_TCP4_OPTION *Option;
|
||||
SOCKET *Sock;
|
||||
EFI_STATUS Status;
|
||||
IP4_ADDR Ip;
|
||||
|
||||
if (NULL == This) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@ -153,26 +154,25 @@ Tcp4Configure (
|
||||
// Tcp protocol related parameter check will be conducted here
|
||||
//
|
||||
if (NULL != TcpConfigData) {
|
||||
if ((EFI_IP4 (TcpConfigData->AccessPoint.RemoteAddress) != 0) &&
|
||||
!Ip4IsUnicast (EFI_NTOHL (TcpConfigData->AccessPoint.RemoteAddress), 0)) {
|
||||
|
||||
NetCopyMem (&Ip, &TcpConfigData->AccessPoint.RemoteAddress, sizeof (IP4_ADDR));
|
||||
if ((Ip != 0) && !Ip4IsUnicast (NTOHL (Ip), 0)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (TcpConfigData->AccessPoint.ActiveFlag &&
|
||||
(0 == TcpConfigData->AccessPoint.RemotePort || (Ip == 0))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!TcpConfigData->AccessPoint.UseDefaultAddress) {
|
||||
if (!Ip4IsUnicast (EFI_NTOHL (TcpConfigData->AccessPoint.StationAddress), 0) ||
|
||||
!IP4_IS_VALID_NETMASK (EFI_NTOHL (TcpConfigData->AccessPoint.SubnetMask))
|
||||
) {
|
||||
|
||||
NetCopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR));
|
||||
if (!Ip4IsUnicast (NTOHL (Ip), 0) || !IP4_IS_VALID_NETMASK (NTOHL (Ip))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
if (TcpConfigData->AccessPoint.ActiveFlag &&
|
||||
(0 == TcpConfigData->AccessPoint.RemotePort ||
|
||||
(EFI_IP4 (TcpConfigData->AccessPoint.RemoteAddress) == 0))
|
||||
) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Option = TcpConfigData->ControlOption;
|
||||
if ((NULL != Option) &&
|
||||
(Option->EnableSelectiveAck || Option->EnablePathMtuDiscovery)) {
|
||||
|
Reference in New Issue
Block a user