aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcap_importer.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pcap_importer.go b/pcap_importer.go
index 4cca916..0df4bcb 100644
--- a/pcap_importer.go
+++ b/pcap_importer.go
@@ -224,6 +224,7 @@ func (pi *PcapImporter) parsePcap(session ImportingSession, fileName string, flu
if packet.NetworkLayer() == nil || packet.TransportLayer() == nil ||
packet.TransportLayer().LayerType() != layers.LayerTypeTCP { // invalid packet
+ log.Warn("Invalid packet: no network or transport layer")
session.InvalidPackets++
continue
}
@@ -241,6 +242,7 @@ func (pi *PcapImporter) parsePcap(session ImportingSession, fileName string, flu
servicePort = uint16(tcp.SrcPort)
index = 1
} else {
+ log.Warn("Invalid packet: source and destination are the same")
session.InvalidPackets++
continue
}