[AFD] Respect the maximum receive buffer size for datagram sockets. CORE-14048

This commit is contained in:
Thomas Faber 2017-12-04 21:13:43 +01:00
parent 8a83c24419
commit 05b4bd3833
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ NTSTATUS WarmSocketForBind( PAFD_FCB FCB, ULONG ShareType ) {
Status = STATUS_NO_MEMORY;
}
if (NT_SUCCESS(Status))
if (NT_SUCCESS(Status) && FCB->Recv.Content < FCB->Recv.Size)
{
Status = TdiReceiveDatagram(&FCB->ReceiveIrp.InFlightRequest,
FCB->AddressFile.Object,

View file

@ -681,7 +681,7 @@ PacketSocketRecvComplete(
} else
FCB->PollState &= ~AFD_EVENT_RECEIVE;
if( NT_SUCCESS(Irp->IoStatus.Status) ) {
if( NT_SUCCESS(Irp->IoStatus.Status) && FCB->Recv.Content < FCB->Recv.Size ) {
/* Now relaunch the datagram request */
Status = TdiReceiveDatagram
( &FCB->ReceiveIrp.InFlightRequest,