summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/epsocket/epsocket.go
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2019-03-20 14:30:00 -0700
committerShentubot <shentubot@google.com>2019-03-20 14:31:16 -0700
commit81f4829d1195276d037f8bd23a2ef69e88f5ae6c (patch)
treed03b2e4eef897feaaf9d7f9b37f61a9b19bee01e /pkg/sentry/socket/epsocket/epsocket.go
parentc7877b0a14778af9165eb2b841513b6f7dfdcbee (diff)
Record sockets created during accept(2) for all families.
Track new sockets created during accept(2) in the socket table for all families. Previously we were only doing this for unix domain sockets. PiperOrigin-RevId: 239475550 Change-Id: I16f009f24a06245bfd1d72ffd2175200f837c6ac
Diffstat (limited to 'pkg/sentry/socket/epsocket/epsocket.go')
-rw-r--r--pkg/sentry/socket/epsocket/epsocket.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/socket/epsocket/epsocket.go b/pkg/sentry/socket/epsocket/epsocket.go
index 468e65373..e74bd1bdd 100644
--- a/pkg/sentry/socket/epsocket/epsocket.go
+++ b/pkg/sentry/socket/epsocket/epsocket.go
@@ -504,6 +504,8 @@ func (s *SocketOperations) Accept(t *kernel.Task, peerRequested bool, flags int,
}
fd, e := t.FDMap().NewFDFrom(0, ns, fdFlags, t.ThreadGroup().Limits())
+ t.Kernel().RecordSocket(ns, s.family)
+
return fd, addr, addrLen, syserr.FromError(e)
}