[PATCH 1/1] remove the condition on possibly stale variable (Session->Descriptor.Receive.Ring->Alertable) for Setting TailMoved event
odedkatz
katz.oded at gmail.com
Tue Feb 24 23:42:46 UTC 2026
otherwise wintun driver just holds on the event until something wakes it up (see here)[https://github.com/Twingate/wintun/blob/6bfc34a60aa944149fdc7e9cddb191e9a8b6ec1a/driver/twintun.c#L487-L488]
---
api/session.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/api/session.c b/api/session.c
index ab96c64..dcaeb25 100644
--- a/api/session.c
+++ b/api/session.c
@@ -302,8 +302,7 @@ WintunSendPacket(TUN_SESSION *Session, const BYTE *Packet)
if (Session->Descriptor.Receive.Ring->Tail != Session->Receive.TailRelease)
{
WriteULongRelease(&Session->Descriptor.Receive.Ring->Tail, Session->Receive.TailRelease);
- if (ReadAcquire(&Session->Descriptor.Receive.Ring->Alertable))
- SetEvent(Session->Descriptor.Receive.TailMoved);
+ SetEvent(Session->Descriptor.Receive.TailMoved);
}
LeaveCriticalSection(&Session->Receive.Lock);
}
--
2.43.0
More information about the WireGuard
mailing list