Ignore DNS request connection from kernel
This commit is contained in:
@@ -54,8 +54,9 @@ func getDNSRequestConnectionKey(packetInfo *packet.Info) (id string, ok bool) {
|
|||||||
// SaveDNSRequestConnection saves a dns request connection for later retrieval.
|
// SaveDNSRequestConnection saves a dns request connection for later retrieval.
|
||||||
func SaveDNSRequestConnection(conn *Connection, pkt packet.Packet) {
|
func SaveDNSRequestConnection(conn *Connection, pkt packet.Packet) {
|
||||||
// Check connection.
|
// Check connection.
|
||||||
if conn.PID == process.UndefinedProcessID {
|
if conn.PID == process.UndefinedProcessID || conn.PID == process.SystemProcessID {
|
||||||
log.Tracer(pkt.Ctx()).Tracef("network: not saving dns request connection because the PID is undefined")
|
// When re-injecting packets on Windows, they are reported with kernel PID (4).
|
||||||
|
log.Tracer(pkt.Ctx()).Tracef("network: not saving dns request connection because the PID is undefined/kernel")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user