Match endpoints by destination port

This commit is contained in:
Daniel
2020-10-15 12:13:25 +02:00
parent 0d09cd9c2d
commit 0e83268356
3 changed files with 18 additions and 3 deletions

View File

@@ -128,6 +128,7 @@ func NewConnectionFromFirstPacket(pkt packet.Packet) *Connection {
Protocol: uint8(pkt.Info().Protocol),
Port: pkt.Info().SrcPort,
}
entity.AddDstPort(pkt.Info().DstPort)
} else {
@@ -137,6 +138,7 @@ func NewConnectionFromFirstPacket(pkt packet.Packet) *Connection {
Protocol: uint8(pkt.Info().Protocol),
Port: pkt.Info().DstPort,
}
entity.AddDstPort(entity.Port)
// check if we can find a domain for that IP
ipinfo, err := resolver.GetIPInfo(proc.LocalProfileKey, pkt.Info().Dst.String())