improve log output

pull/16/head
brl 9 years ago
parent f224866cd5
commit 2d2a269b53

@ -162,16 +162,14 @@ func (fw *Firewall) filterPacket(pkt *nfqueue.Packet) {
fw.dns.processDNS(pkt) fw.dns.processDNS(pkt)
return return
} }
log.Debug("filterPacket %s", printPacket(pkt, fw.dns.Lookup(pkt.Dst))) proc := findProcessForPacket(pkt)
if basicAllowPacket(pkt) { if proc == nil {
log.Warning("No proc found for %s", printPacket(pkt, fw.dns.Lookup(pkt.Dst)))
pkt.Accept() pkt.Accept()
return return
} }
log.Debug("filterPacket [%s] %s", proc.exePath, printPacket(pkt, fw.dns.Lookup(pkt.Dst)))
proc := findProcessForPacket(pkt) if basicAllowPacket(pkt) {
if proc == nil {
log.Warning("No process for: %v", pkt)
pkt.Accept() pkt.Accept()
return return
} }

Loading…
Cancel
Save