diff options
author | Kevin Krakauer <krakauer@google.com> | 2018-10-12 13:57:10 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-12 13:58:32 -0700 |
commit | 47d3862c33b7b74b451ea71139abdea34d5b46bd (patch) | |
tree | bb4dfecfae388910a1beba3ab090241256986323 /pkg/sentry/socket | |
parent | a771775f3a4680b3a121deb6f583ed62f4da8bef (diff) |
runsc: Support retrieving MTU via netdevice ioctl.
This enables ifconfig to display MTU.
PiperOrigin-RevId: 216917021
Change-Id: Id513b23d9d76899bcb71b0b6a25036f41629a923
Diffstat (limited to 'pkg/sentry/socket')
-rw-r--r-- | pkg/sentry/socket/epsocket/epsocket.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/socket/epsocket/epsocket.go b/pkg/sentry/socket/epsocket/epsocket.go index c5da18b0e..a44679f0b 100644 --- a/pkg/sentry/socket/epsocket/epsocket.go +++ b/pkg/sentry/socket/epsocket/epsocket.go @@ -1266,9 +1266,10 @@ func interfaceIoctl(ctx context.Context, io usermem.IO, arg int, ifr *linux.IFRe // Gets the metric of the device. As per netdevice(7), this // always just sets ifr_metric to 0. usermem.ByteOrder.PutUint32(ifr.Data[:4], 0) + case syscall.SIOCGIFMTU: // Gets the MTU of the device. - // TODO: Implement. + usermem.ByteOrder.PutUint32(ifr.Data[:4], iface.MTU) case syscall.SIOCGIFMAP: // Gets the hardware parameters of the device. |