diff options
author | Ian Gudger <igudger@google.com> | 2018-12-03 17:02:28 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-03 17:03:15 -0800 |
commit | 5560615c531bc2a0108a4db1e9877f0397a69f8f (patch) | |
tree | 93213a37376ece43e5048dd178600172df78570c /pkg/sentry/socket/netlink/socket.go | |
parent | edbd8a86d297470c2a55daa87fce2ba5576de0bf (diff) |
Return an int32 for netlink SO_RCVBUF
Untyped integer constants default to type int and the binary package will panic
if one tries to encode an int.
PiperOrigin-RevId: 223890001
Change-Id: Iccc3afd6d74bad24c35d764508e450fd317b76ec
Diffstat (limited to 'pkg/sentry/socket/netlink/socket.go')
-rw-r--r-- | pkg/sentry/socket/netlink/socket.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/socket/netlink/socket.go b/pkg/sentry/socket/netlink/socket.go index b1f6620de..c4798839e 100644 --- a/pkg/sentry/socket/netlink/socket.go +++ b/pkg/sentry/socket/netlink/socket.go @@ -298,7 +298,7 @@ func (s *Socket) GetSockOpt(t *kernel.Task, level int, name int, outLen int) (in return nil, syserr.ErrInvalidArgument } // We don't have limit on receiving size. - return math.MaxInt32, nil + return int32(math.MaxInt32), nil default: socket.GetSockOptEmitUnimplementedEvent(t, name) |