From 7e9893eeb500ab56dcab80471300df50c12288ae Mon Sep 17 00:00:00 2001 From: Brian Geffon Date: Thu, 7 Jun 2018 11:36:26 -0700 Subject: Add missing rpcinet ioctls. PiperOrigin-RevId: 199669120 Change-Id: I0be88cdbba29760f967e9a5bb4144ca62c1ed7aa --- pkg/sentry/socket/rpcinet/socket.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'pkg/sentry/socket/rpcinet/socket.go') diff --git a/pkg/sentry/socket/rpcinet/socket.go b/pkg/sentry/socket/rpcinet/socket.go index 3356f7804..29546b683 100644 --- a/pkg/sentry/socket/rpcinet/socket.go +++ b/pkg/sentry/socket/rpcinet/socket.go @@ -417,10 +417,22 @@ func (s *socketOperations) Ioctl(ctx context.Context, io usermem.IO, args arch.S var buf []byte switch cmd { // The following ioctls take 4 byte argument parameters. - case syscall.TIOCINQ, syscall.TIOCOUTQ: + case syscall.TIOCINQ, + syscall.TIOCOUTQ: buf = make([]byte, 4) // The following ioctls have args which are sizeof(struct ifreq). - case syscall.SIOCGIFINDEX, syscall.SIOCGIFNETMASK, syscall.SIOCGIFHWADDR, syscall.SIOCGIFNAME, syscall.SIOCGIFFLAGS: + case syscall.SIOCGIFADDR, + syscall.SIOCGIFBRDADDR, + syscall.SIOCGIFDSTADDR, + syscall.SIOCGIFFLAGS, + syscall.SIOCGIFHWADDR, + syscall.SIOCGIFINDEX, + syscall.SIOCGIFMAP, + syscall.SIOCGIFMETRIC, + syscall.SIOCGIFMTU, + syscall.SIOCGIFNAME, + syscall.SIOCGIFNETMASK, + syscall.SIOCGIFTXQLEN: buf = make([]byte, sizeOfIfReq) default: return 0, syserror.ENOTTY -- cgit v1.2.3