summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/socket.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-05 04:05:28 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-05 04:05:28 +0000
commitbb592be222823c7bba4f0b1cf9e59938aa7981d9 (patch)
treee32e7e82be052269fc20ba50c459b05cd0ff4d0f /pkg/sentry/socket/socket.go
parent078753e0fe85dbcc047aaa5607a2bbc209491672 (diff)
parent24bee1c1813a691072cff5bad7a528690a99eb5e (diff)
Merge release-20200323.0-70-g24bee1c (automated)
Diffstat (limited to 'pkg/sentry/socket/socket.go')
-rw-r--r--pkg/sentry/socket/socket.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/sentry/socket/socket.go b/pkg/sentry/socket/socket.go
index b5ba4a56b..6580bd6e9 100644
--- a/pkg/sentry/socket/socket.go
+++ b/pkg/sentry/socket/socket.go
@@ -269,7 +269,7 @@ func NewVFS2(t *kernel.Task, family int, stype linux.SockType, protocol int) (*v
return nil, err
}
if s != nil {
- // TODO: Add vfs2 sockets to global socket table.
+ t.Kernel().RecordSocketVFS2(s)
return s, nil
}
}
@@ -291,7 +291,9 @@ func PairVFS2(t *kernel.Task, family int, stype linux.SockType, protocol int) (*
return nil, nil, err
}
if s1 != nil && s2 != nil {
- // TODO: Add vfs2 sockets to global socket table.
+ k := t.Kernel()
+ k.RecordSocketVFS2(s1)
+ k.RecordSocketVFS2(s2)
return s1, s2, nil
}
}