[lxc-devel] [lxd/master] lxd/network: Push MTU over DHCP

stgraber on Github lxc-bot at linuxcontainers.org
Sat Apr 11 01:55:33 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200410/68e87d1c/attachment.bin>
-------------- next part --------------
From 24403022dcf9aea6ba0de2932bff7e01c470221f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 10 Apr 2020 21:55:19 -0400
Subject: [PATCH] lxd/network: Push MTU over DHCP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/network/network.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd/network/network.go b/lxd/network/network.go
index 3510bec05a..7e399e1636 100644
--- a/lxd/network/network.go
+++ b/lxd/network/network.go
@@ -433,6 +433,10 @@ func (n *Network) setup(oldConfig map[string]string) error {
 				dnsmasqCmd = append(dnsmasqCmd, fmt.Sprintf("--dhcp-option=3,%s", n.config["ipv4.dhcp.gateway"]))
 			}
 
+			if mtu != "1500" {
+				dnsmasqCmd = append(dnsmasqCmd, fmt.Sprintf("--dhcp-option-force=26,%s", mtu))
+			}
+
 			expiry := "1h"
 			if n.config["ipv4.dhcp.expiry"] != "" {
 				expiry = n.config["ipv4.dhcp.expiry"]


More information about the lxc-devel mailing list