[lxc-devel] [lxd/master] validate: Increases IsNetworkMTU max MTU to 16384 to support super jumbo packets

tomponline on Github lxc-bot at linuxcontainers.org
Mon Oct 5 09:13:26 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 409 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201005/76ded923/attachment.bin>
-------------- next part --------------
From 84299fc473794c1b77a182f0f8f26ec2f856c5b5 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Mon, 5 Oct 2020 10:11:49 +0100
Subject: [PATCH] shared/validate/validate: Increases max MTU to 16384 to
 support super jumbo packets

Fixes https://github.com/lxc/lxd/issues/7972

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 shared/validate/validate.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/shared/validate/validate.go b/shared/validate/validate.go
index d9645f6dfc..356a7d8744 100644
--- a/shared/validate/validate.go
+++ b/shared/validate/validate.go
@@ -385,7 +385,7 @@ func IsNetworkVLAN(value string) error {
 	return nil
 }
 
-// IsNetworkMTU validates MTU number >= 1280 and <= 9202.
+// IsNetworkMTU validates MTU number >= 1280 and <= 16384.
 // Anything below 68 and the kernel doesn't allow IPv4, anything below 1280 and the kernel doesn't allow IPv6.
 // So require an IPv6-compatible MTU as the low value and cap at the max ethernet jumbo frame size.
 func IsNetworkMTU(value string) error {
@@ -394,8 +394,8 @@ func IsNetworkMTU(value string) error {
 		return fmt.Errorf("Invalid MTU %q", value)
 	}
 
-	if mtu < 1280 || mtu > 9202 {
-		return fmt.Errorf("Out of MTU range (1280-9202) %q", value)
+	if mtu < 1280 || mtu > 16384 {
+		return fmt.Errorf("Out of MTU range (1280-16384) %q", value)
 	}
 
 	return nil


More information about the lxc-devel mailing list