Skip to content

Commit

Permalink
Don't read tcp6 file (we don't deal with ipv6 anywhere else).
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie committed Dec 9, 2015
1 parent f727ea1 commit 20e42e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions probe/endpoint/procspy/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ 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/<pid>/net/tcp
err = fs.FS.Lstat(filepath.Join(procRoot, dirName, "/ns/net"), &statT)
if err != nil {
if err := fs.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)
//readFile(filepath.Join(procRoot, dirName, "/net/tcp6"), buf)
}

fds, err := fs.FS.ReadDirNames(fdBase)
Expand Down

0 comments on commit 20e42e0

Please sign in to comment.