winws: beautify log, null ifout if inbound

This commit is contained in:
bol-van 2024-04-30 17:56:44 +03:00
parent 738766fde3
commit 42e69e81f3

View File

@ -438,8 +438,8 @@ static int win_main(const char *windivert_filter)
break; break;
} }
*ifout=0; *ifout=0;
snprintf(ifout,sizeof(ifout),"%u.%u",wa.Network.IfIdx, wa.Network.SubIfIdx); if (wa.Outbound) snprintf(ifout,sizeof(ifout),"%u.%u", wa.Network.IfIdx, wa.Network.SubIfIdx);
DLOG("packet: id=%u len=%zu outbound=%u IPv6=%u IPChecksum=%u TCPChecksum=%u UDPChecksum=%u IfIdx=%s\n", id, len, wa.Outbound, wa.IPv6, wa.IPChecksum, wa.TCPChecksum, wa.UDPChecksum, ifout) 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) if (wa.Impostor)
{ {
DLOG("windivert: skipping impostor packet\n") DLOG("windivert: skipping impostor packet\n")