summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-07-18 15:39:47 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-18 15:41:04 -0700
commiteefa817cfdb04ff07e7069396f21bd6ba2c89957 (patch)
tree7114a733e361dbf98e2ef1ae075945bfb908107a /pkg/sentry/syscalls
parent163ab5e9bab4f14923433967656d20f169d0f904 (diff)
net/tcp/setockopt: impelment setsockopt(fd, SOL_TCP, TCP_INQ)
PiperOrigin-RevId: 258859507
Diffstat (limited to 'pkg/sentry/syscalls')
-rw-r--r--pkg/sentry/syscalls/linux/sys_socket.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_socket.go b/pkg/sentry/syscalls/linux/sys_socket.go
index 195734257..fa568a660 100644
--- a/pkg/sentry/syscalls/linux/sys_socket.go
+++ b/pkg/sentry/syscalls/linux/sys_socket.go
@@ -802,6 +802,11 @@ func recvSingleMsg(t *kernel.Task, s socket.Socket, msgPtr usermem.Addr, flags i
controlData = control.PackTimestamp(t, cms.IP.Timestamp, controlData)
}
+ if cms.IP.HasInq {
+ // In Linux, TCP_CM_INQ is added after SO_TIMESTAMP.
+ controlData = control.PackInq(t, cms.IP.Inq, controlData)
+ }
+
if cms.Unix.Rights != nil {
controlData, mflags = control.PackRights(t, cms.Unix.Rights.(control.SCMRights), flags&linux.MSG_CMSG_CLOEXEC != 0, controlData, mflags)
}