diff options
Diffstat (limited to 'main/lxc/0001-Clone-bridge-interface-MTU-setting.patch')
-rw-r--r-- | main/lxc/0001-Clone-bridge-interface-MTU-setting.patch | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/main/lxc/0001-Clone-bridge-interface-MTU-setting.patch b/main/lxc/0001-Clone-bridge-interface-MTU-setting.patch deleted file mode 100644 index 7f18e4f293..0000000000 --- a/main/lxc/0001-Clone-bridge-interface-MTU-setting.patch +++ /dev/null @@ -1,66 +0,0 @@ -From e54864d3632e3959bed6dd6b7e6d2cbd7eb8eec0 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Fri, 21 Aug 2015 11:48:10 +0200 -Subject: [PATCH] Clone bridge interface MTU setting -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Instead of require static mtu setting in config we simply clone the -existing MTU setting of the bridge interface. - -This fixes issue when bridge interface has bigger MTU (like 9000 for -jumbo frame support) than the default 1500. When veth interface is -created it has by default MTU set to 1500 and when this is added to the -bridge, the kernel wee reduce the MTU for the bridge to 1500. We solve -this by cloning the MTU value from bridge interface. - -This simplifies managing containers with bridge interface who supports -jumbo frames (mtu 9000) and makes it easier to move containers between -hosts with different MTU settings. - -Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> -Acked-by: Stéphane Graber <stgraber@ubuntu.com> ---- - src/lxc/conf.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/src/lxc/conf.c b/src/lxc/conf.c -index 309ceea..a3d45ee 100644 ---- a/src/lxc/conf.c -+++ b/src/lxc/conf.c -@@ -2609,7 +2609,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd - { - char veth1buf[IFNAMSIZ], *veth1; - char veth2buf[IFNAMSIZ], *veth2; -- int err; -+ int err, mtu = 0; - - if (netdev->priv.veth_attr.pair) { - veth1 = netdev->priv.veth_attr.pair; -@@ -2655,12 +2655,18 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd - } - - if (netdev->mtu) { -- err = lxc_netdev_set_mtu(veth1, atoi(netdev->mtu)); -+ mtu = atoi(netdev->mtu); -+ } else if (netdev->link) { -+ mtu = netdev_get_mtu(if_nametoindex(netdev->link)); -+ } -+ -+ if (mtu) { -+ err = lxc_netdev_set_mtu(veth1, mtu); - if (!err) -- err = lxc_netdev_set_mtu(veth2, atoi(netdev->mtu)); -+ err = lxc_netdev_set_mtu(veth2, mtu); - if (err) { -- ERROR("failed to set mtu '%s' for veth pair (%s and %s): %s", -- netdev->mtu, veth1, veth2, strerror(-err)); -+ ERROR("failed to set mtu '%i' for veth pair (%s and %s): %s", -+ mtu, veth1, veth2, strerror(-err)); - goto out_delete; - } - } --- -2.5.0 - |