diff options
author | Michael Brown <mcb30@ipxe.org> | 2018-07-17 12:01:30 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2018-07-17 12:14:43 +0100 |
commit | b9d68b9de02cc474c8a713f1232ce69fefafe18e (patch) | |
tree | bb78cdd2596ec08a7d926315519e2c30b3e2b892 /src/net/ethernet.c | |
parent | 05b979146ddb0b957354663a99c181357ad310b2 (diff) | |
download | ipxe-b9d68b9de02cc474c8a713f1232ce69fefafe18e.tar.gz |
[ethernet] Use standard 1500 byte MTU unless explicitly overridden
Devices that support jumbo frames will currently default to the
largest possible MTU. This assumption is valid for virtual adapters
such as virtio-net, where the MTU must have been configured by a
system administrator, but is unsafe in the general case of a physical
adapter.
Default to the standard Ethernet MTU, unless explicitly overridden
either by the driver or via the ${netX/mtu} setting.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ethernet.c')
-rw-r--r-- | src/net/ethernet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/ethernet.c b/src/net/ethernet.c index 26fdedea8..707bdf905 100644 --- a/src/net/ethernet.c +++ b/src/net/ethernet.c @@ -269,6 +269,7 @@ struct net_device * alloc_etherdev ( size_t priv_size ) { netdev->ll_protocol = ðernet_protocol; netdev->ll_broadcast = eth_broadcast; netdev->max_pkt_len = ETH_FRAME_LEN; + netdev->mtu = ETH_MAX_MTU; } return netdev; } |