summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/rpcinet
diff options
context:
space:
mode:
authorBrian Geffon <bgeffon@google.com>2018-06-07 11:36:26 -0700
committerShentubot <shentubot@google.com>2018-06-07 11:37:16 -0700
commit7e9893eeb500ab56dcab80471300df50c12288ae (patch)
tree124defbb039e436f648c3043036c7603131d448a /pkg/sentry/socket/rpcinet
parent9170303105bedbe7dda1d11b196e21abe9040cdf (diff)
Add missing rpcinet ioctls.
PiperOrigin-RevId: 199669120 Change-Id: I0be88cdbba29760f967e9a5bb4144ca62c1ed7aa
Diffstat (limited to 'pkg/sentry/socket/rpcinet')
-rw-r--r--pkg/sentry/socket/rpcinet/socket.go16
1 files changed, 14 insertions, 2 deletions
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