mtu: per-interface MTU configuration via netcfg
LinkDevice trait gains set_mtu(mtu) with default no-op. EthernetLink stores mtu in field, clamped to 576-9000 (RFC 791 min/max). netcfg/ifaces/eth0/mtu becomes rw: cat /scheme/netcfg/ifaces/eth0/mtu → '1500' (default) echo 1400 > .../mtu → VPN MTU echo 9000 > .../mtu → jumbo frames Clamped to [576, 9000]: - 576: minimum for IPv4 (RFC 791) - 9000: standard jumbo frame MTU Useful for VPNs (MTU 1400 to avoid fragmentation through tunnel overhead), jumbo frames (MTU 9000 on datacenter networks), and constrained paths.
This commit is contained in:
@@ -57,6 +57,8 @@ pub trait LinkDevice {
|
||||
1500
|
||||
}
|
||||
|
||||
fn set_mtu(&mut self, _mtu: usize) {}
|
||||
|
||||
fn link_state(&self) -> &'static str {
|
||||
"unknown"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user