Skip to content

Commit

Permalink
format socketType properly in tcp duplication check key
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorv007 committed Jun 24, 2017
1 parent 026aa32 commit 82608f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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 {
Expand Down

0 comments on commit 82608f2

Please sign in to comment.