From cc90c6c95d323c05b681457b78da0361ade0bb77 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Wed, 9 Dec 2015 17:45:33 +0000 Subject: [PATCH] Don't read tcp6 file (we don't deal with ipv6 anywhere else). --- probe/endpoint/procspy/proc.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/probe/endpoint/procspy/proc.go b/probe/endpoint/procspy/proc.go index 6823a3ede..84c5a0086 100644 --- a/probe/endpoint/procspy/proc.go +++ b/probe/endpoint/procspy/proc.go @@ -37,15 +37,12 @@ func walkProcPid(buf *bytes.Buffer, walker process.Walker) (map[uint64]Proc, err // Read network namespace, and if we haven't seen it before, // read /proc//net/tcp - err := fs.Lstat(filepath.Join(procRoot, dirName, "/ns/net"), &statT) - if err != nil { + if err := fs.Lstat(filepath.Join(procRoot, dirName, "/ns/net"), &statT); err != nil { return } - if _, ok := namespaces[statT.Ino]; !ok { namespaces[statT.Ino] = struct{}{} readFile(filepath.Join(procRoot, dirName, "/net/tcp"), buf) - readFile(filepath.Join(procRoot, dirName, "/net/tcp6"), buf) } fds, err := fs.ReadDirNames(fdBase)