diff --git a/binaries/win64/winws.exe b/binaries/win64/winws.exe index 6e2dfbe..db48fdc 100644 Binary files a/binaries/win64/winws.exe and b/binaries/win64/winws.exe differ diff --git a/binaries/win64/zapret-winws/winws.exe b/binaries/win64/zapret-winws/winws.exe index 6e2dfbe..db48fdc 100644 Binary files a/binaries/win64/zapret-winws/winws.exe and b/binaries/win64/zapret-winws/winws.exe differ diff --git a/nfq/darkmagic.c b/nfq/darkmagic.c index cab4ccc..e1a6e17 100644 --- a/nfq/darkmagic.c +++ b/nfq/darkmagic.c @@ -1037,6 +1037,7 @@ static bool windivert_recv_filter(HANDLE hFilter, uint8_t *packet, size_t *len, errno=EINTR; return false; } + usleep(0); if (WinDivertRecvEx(hFilter, packet, *len, &recv_len, 0, wa, NULL, &ovl)) { *len = recv_len; diff --git a/nfq/nfqws.c b/nfq/nfqws.c index f6b1f30..53a629c 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -444,17 +444,20 @@ static int win_main(const char *windivert_filter) DLOG("packet: id=%u len=%zu %s IPv6=%u IPChecksum=%u TCPChecksum=%u UDPChecksum=%u IfIdx=%u.%u\n", id, len, wa.Outbound ? "outbound" : "inbound", wa.IPv6, wa.IPChecksum, wa.TCPChecksum, wa.UDPChecksum, wa.Network.IfIdx, wa.Network.SubIfIdx) if (wa.Impostor) { - DLOG("windivert: skipping impostor packet\n") - continue; + DLOG("windivert: passing impostor packet\n") + verdict = VERDICT_PASS; } - if (wa.Loopback) + else if (wa.Loopback) { - DLOG("windivert: skipping loopback packet\n") - continue; + DLOG("windivert: passing loopback packet\n") + verdict = VERDICT_PASS; + } + else + { + mark=0; + // pseudo interface id IfIdx.SubIfIdx + verdict = processPacketData(&mark, ifout, packet, &len); } - mark=0; - // pseudo interface id IfIdx.SubIfIdx - verdict = processPacketData(&mark, ifout, packet, &len); switch (verdict & VERDICT_MASK) { case VERDICT_PASS: