mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: Support retrieving MTU via netdevice ioctl.
This enables ifconfig to display MTU. PiperOrigin-RevId: 216917021 Change-Id: Id513b23d9d76899bcb71b0b6a25036f41629a923
This commit is contained in:
committed by
Shentubot
parent
a771775f3a
commit
47d3862c33
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user