Ignore transmit errors for UDPv4, UDPv6 and IPv4.
Support local bind by validating the IP address using the IP configuration protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-by: Ankit Singh3 <Ankit_Singh3@Dell.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14875 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1336,27 +1336,40 @@ EslSocketBindTest (
|
||||
pConfigData = (VOID *)pBuffer;
|
||||
|
||||
//
|
||||
// Attempt to use this configuration
|
||||
// Validate that the port is connected
|
||||
//
|
||||
Status = pPort->pfnConfigure ( pPort->pProtocol.v, pConfigData );
|
||||
Status = pPort->pSocket->pApi->pfnVerifyLocalIpAddress ( pPort, pBuffer );
|
||||
if ( EFI_ERROR ( Status )) {
|
||||
DEBUG (( DEBUG_WARN | DEBUG_BIND,
|
||||
"WARNING - Port 0x%08x failed configuration, Status: %r\r\n",
|
||||
"WARNING - Port 0x%08x invalid IP address: %r\r\n",
|
||||
pPort,
|
||||
Status ));
|
||||
pPort->pSocket->errno = ErrnoValue;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Reset the port
|
||||
// Attempt to use this configuration
|
||||
//
|
||||
Status = pPort->pfnConfigure ( pPort->pProtocol.v, NULL );
|
||||
Status = pPort->pfnConfigure ( pPort->pProtocol.v, pConfigData );
|
||||
if ( EFI_ERROR ( Status )) {
|
||||
DEBUG (( DEBUG_ERROR | DEBUG_BIND,
|
||||
"ERROR - Port 0x%08x failed configuration reset, Status: %r\r\n",
|
||||
DEBUG (( DEBUG_WARN | DEBUG_BIND,
|
||||
"WARNING - Port 0x%08x failed configuration, Status: %r\r\n",
|
||||
pPort,
|
||||
Status ));
|
||||
ASSERT ( EFI_SUCCESS == Status );
|
||||
pPort->pSocket->errno = ErrnoValue;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Reset the port
|
||||
//
|
||||
Status = pPort->pfnConfigure ( pPort->pProtocol.v, NULL );
|
||||
if ( EFI_ERROR ( Status )) {
|
||||
DEBUG (( DEBUG_ERROR | DEBUG_BIND,
|
||||
"ERROR - Port 0x%08x failed configuration reset, Status: %r\r\n",
|
||||
pPort,
|
||||
Status ));
|
||||
ASSERT ( EFI_SUCCESS == Status );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5924,10 +5937,24 @@ EslSocketTxStart (
|
||||
*ppActive = pIo;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Display the transmit error
|
||||
//
|
||||
DEBUG (( DEBUG_TX | DEBUG_INFO,
|
||||
"0x%08x, 0x%08x: pIo, pPacket transmit failure: %r\r\n",
|
||||
pIo,
|
||||
pPacket,
|
||||
Status ));
|
||||
if ( EFI_SUCCESS == pSocket->TxError ) {
|
||||
pSocket->TxError = Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Free the IO structure
|
||||
//
|
||||
pIo->pNext = *ppFree;
|
||||
*ppFree = pIo;
|
||||
|
||||
//
|
||||
// Discard the transmit buffer
|
||||
//
|
||||
|
Reference in New Issue
Block a user