mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 12:10:53 +03:00
winws: handle signals when busy, pass impostor and loopback
This commit is contained in:
parent
23f2de8014
commit
4febb74b0d
Binary file not shown.
Binary file not shown.
@ -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;
|
||||
|
19
nfq/nfqws.c
19
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:
|
||||
|
Loading…
Reference in New Issue
Block a user