From 42e69e81f3adf066894a34983bba4294bd5ad216 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 30 Apr 2024 17:56:44 +0300 Subject: [PATCH] winws: beautify log, null ifout if inbound --- nfq/nfqws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index ff982e3..5641ad6 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -438,8 +438,8 @@ static int win_main(const char *windivert_filter) break; } *ifout=0; - 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) + if (wa.Outbound) snprintf(ifout,sizeof(ifout),"%u.%u", wa.Network.IfIdx, wa.Network.SubIfIdx); + 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")