From 550f21511a2da20717c6de6172b5bf2e9841d905 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 15 Dec 2015 13:37:16 +0000 Subject: [PATCH] We need to read /proc/PID/net/tcp6 to see the pids for the server end of local connections. --- probe/endpoint/procspy/proc.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/probe/endpoint/procspy/proc.go b/probe/endpoint/procspy/proc.go index dd8c47ae1..30dfab97f 100644 --- a/probe/endpoint/procspy/proc.go +++ b/probe/endpoint/procspy/proc.go @@ -42,8 +42,9 @@ func walkProcPid(buf *bytes.Buffer, walker process.Walker) (map[uint64]*Proc, er } hasConns, ok := namespaces[statT.Ino] if !ok { - read, err := readFile(filepath.Join(procRoot, dirName, "/net/tcp"), buf) - hasConns = err == nil && read > 0 + read, _ := readFile(filepath.Join(procRoot, dirName, "/net/tcp"), buf) + read6, _ := readFile(filepath.Join(procRoot, dirName, "/net/tcp6"), buf) + hasConns = read+read6 > 0 namespaces[statT.Ino] = hasConns } if !hasConns {