summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/hostinet
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-04-23 23:49:16 +0000
committergVisor bot <gvisor-bot@google.com>2021-04-23 23:49:16 +0000
commit4deaa22143c7806418b4353bb5d2181765d21f88 (patch)
treea6788ace48891239c544994f51bb18df24fa3776 /pkg/sentry/socket/hostinet
parent9eea9a92f7c90600ccbd0f038d6d170312549ab4 (diff)
parent80cd26c2f43e78d43e2ff769cf0449e67254e673 (diff)
Merge release-20210419.0-26-g80cd26c2f (automated)
Diffstat (limited to 'pkg/sentry/socket/hostinet')
-rw-r--r--pkg/sentry/socket/hostinet/socket.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/socket/hostinet/socket.go b/pkg/sentry/socket/hostinet/socket.go
index a784e23b5..0d3b23643 100644
--- a/pkg/sentry/socket/hostinet/socket.go
+++ b/pkg/sentry/socket/hostinet/socket.go
@@ -528,7 +528,9 @@ func parseUnixControlMessages(unixControlMessages []unix.SocketControlMessage) s
switch unixCmsg.Header.Type {
case linux.SO_TIMESTAMP:
controlMessages.IP.HasTimestamp = true
- binary.Unmarshal(unixCmsg.Data[:linux.SizeOfTimeval], hostarch.ByteOrder, &controlMessages.IP.Timestamp)
+ ts := linux.Timeval{}
+ ts.UnmarshalBytes(unixCmsg.Data[:linux.SizeOfTimeval])
+ controlMessages.IP.Timestamp = ts.ToNsecCapped()
}
case linux.SOL_IP: