aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-10 14:35:49 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-10 14:38:59 +0100
commit96553f4217e6ded87dc65fd052c30e6b8d93fce7 (patch)
treeed7ed0be4d56a00a7a38fb32ad8008250141b222
parentProcess send NBLs in batches (diff)
downloadwintun-96553f4217e6ded87dc65fd052c30e6b8d93fce7.tar.xz
wintun-96553f4217e6ded87dc65fd052c30e6b8d93fce7.zip
Increment discarded packets properly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--wintun.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wintun.c b/wintun.c
index 05babe4..e2dd828 100644
--- a/wintun.c
+++ b/wintun.c
@@ -337,10 +337,8 @@ cleanupKeReleaseInStackQueuedSpinLock:
KeReleaseInStackQueuedSpinLock(&LockHandle);
skipNbl:
for (NET_BUFFER_LIST *Nbl = NetBufferLists; Nbl; Nbl = NET_BUFFER_LIST_NEXT_NBL(Nbl))
- {
NET_BUFFER_LIST_STATUS(Nbl) = Status;
- DiscardedPacketsCount += PacketsCount;
- }
+ DiscardedPacketsCount += PacketsCount;
ExReleaseSpinLockShared(&Ctx->TransitionLock, Irql);
NdisMSendNetBufferListsComplete(Ctx->MiniportAdapterHandle, NetBufferLists, 0);
updateStatistics: