summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/netlink/socket.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-12-03 17:02:28 -0800
committerShentubot <shentubot@google.com>2018-12-03 17:03:15 -0800
commit5560615c531bc2a0108a4db1e9877f0397a69f8f (patch)
tree93213a37376ece43e5048dd178600172df78570c /pkg/sentry/socket/netlink/socket.go
parentedbd8a86d297470c2a55daa87fce2ba5576de0bf (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.go2
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)