[PATCH v4 0/1] Improve validation of --mtu option
Here are some of the more straightforward parts of my patches making various MTU related fixes. These ones improve how we validate the --mtu option. Changes since v3: * None, just verified rebase and reposted. Changes since v2: * Don't disable a protocol because the MTU is too small, just warn. It's only an advertised MTU, not an enforced MTU David Gibson (1): conf: Be more precise about minimum MTUs conf.c | 18 +++++++++++++++--- ip.h | 7 +++++++ util.h | 6 ------ 3 files changed, 22 insertions(+), 9 deletions(-) -- 2.48.1
Currently we reject the -m option if given a value less than ETH_MIN_MTU
(68). That define is derived from the kernel, but its name is misleading:
it doesn't really have anything to do with Ethernet per se, but is rather
the minimum payload any L2 link must be able to handle in order to carry
IPv4. For IPv6, it's not sufficient: that requires an MTU of at least
1280.
Newer kernels have better named constants IPV4_MIN_MTU and IPv6_MIN_MTU.
Copy and use those constants instead, along with some more specific error
messages.
Signed-off-by: David Gibson
On Wed, 5 Mar 2025 17:20:02 +1100
David Gibson
Here are some of the more straightforward parts of my patches making various MTU related fixes. These ones improve how we validate the --mtu option.
Changes since v3: * None, just verified rebase and reposted. Changes since v2: * Don't disable a protocol because the MTU is too small, just warn. It's only an advertised MTU, not an enforced MTU
David Gibson (1): conf: Be more precise about minimum MTUs
Applied. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio