Invert skipPacket condition so code matches

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-12-10 14:38:41 +01:00
parent 96553f4217
commit 5f681022c9

View File

@ -242,7 +242,8 @@ TunSendNetBufferLists(
{
PacketsCount++;
UINT PacketSize = NET_BUFFER_DATA_LENGTH(Nb);
if (PacketSize <= TUN_MAX_IP_PACKET_SIZE)
if (PacketSize > TUN_MAX_IP_PACKET_SIZE)
continue; /* The same condition holds down below, where we `goto skipPacket`. */
RequiredRingSpace += TUN_ALIGN(sizeof(TUN_PACKET) + PacketSize);
}
}