diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-04-23 23:49:16 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-23 23:49:16 +0000 |
commit | 4deaa22143c7806418b4353bb5d2181765d21f88 (patch) | |
tree | a6788ace48891239c544994f51bb18df24fa3776 | |
parent | 9eea9a92f7c90600ccbd0f038d6d170312549ab4 (diff) | |
parent | 80cd26c2f43e78d43e2ff769cf0449e67254e673 (diff) |
Merge release-20210419.0-26-g80cd26c2f (automated)
-rw-r--r-- | pkg/sentry/socket/hostinet/socket.go | 4 |
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: |