From 9e84fb41d5e21200595765b27ab64ad65658f882 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Mon, 13 Aug 2018 22:45:44 +0200 Subject: [PATCH] Fix MTU setting for macvlan --- luci-mod-admin-full/root/etc/init.d/macvlan | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luci-mod-admin-full/root/etc/init.d/macvlan b/luci-mod-admin-full/root/etc/init.d/macvlan index a40e80710..fae2a4fbe 100755 --- a/luci-mod-admin-full/root/etc/init.d/macvlan +++ b/luci-mod-admin-full/root/etc/init.d/macvlan @@ -32,6 +32,8 @@ _setup_interface() { config_get _type "$1" type uci -q get "network.$1_dev.ifname" >/dev/null && { + uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) + uci -q commit network [ "$_type" = "macvlan" ] || { uci -q batch <<-EOF delete network.$1_dev @@ -66,6 +68,7 @@ _setup_interface() { _macaddr=$(uci -q get "network.$1.macaddr") _setup_macaddr "$1" "${_macaddr:-auto$(date +%s)}" uci -q set "network.$1.type=macvlan" # legacy + uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) uci -q commit network }