From 5a0a97f400c451a16691d46d53f6bef48d3880ca Mon Sep 17 00:00:00 2001 From: Alexander Blagoev Date: Sun, 30 Apr 2017 16:55:03 +0300 Subject: [PATCH] Fromat socketType properly in tcp duplication check key --- net/net_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net_linux.go b/net/net_linux.go index 34ecfd0..b71cb6d 100644 --- a/net/net_linux.go +++ b/net/net_linux.go @@ -370,7 +370,7 @@ func statsFromInodes(root string, pid int32, tmap []netConnectionKindType, inode // Build TCP key to id the connection uniquely // socket type, src ip, src port, dst ip, dst port and state should be enough // to prevent duplications. - connKey = fmt.Sprintf("%s-%s:%d-%s:%d-%s", c.sockType, c.laddr.IP, c.laddr.Port, c.raddr.IP, c.raddr.Port, c.status) + connKey = fmt.Sprintf("%d-%s:%d-%s:%d-%s", c.sockType, c.laddr.IP, c.laddr.Port, c.raddr.IP, c.raddr.Port, c.status) if _, ok := dupCheckMap[connKey]; ok { continue }