From 6aa1b13111fd26cf09736f04a7b787ca6aa87401 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 5 Jul 2018 10:44:47 +0200 Subject: [PATCH] Fix add interface --- luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index def7bc26a..439cf2fd0 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -33,7 +33,7 @@ function wizard_add() multipath_master = true end end) - local defif = ucic:get("network","wan1","ifname") or "eth0" + local defif = ucic:get("network","wan1_dev","ifname") or "eth0" ucic:set("network","wan" .. i,"interface") ucic:set("network","wan" .. i,"ifname",defif) ucic:set("network","wan" .. i,"proto","static") @@ -49,6 +49,7 @@ function wizard_add() ucic:commit("network") -- Dirty way to add new interface to firewall... luci.sys.call("uci -q add_list firewall.@zone[1].network=wan" .. i) + luci.sys.call("uci -q commit firewall") luci.sys.call("/etc/init.d/macvlan restart >/dev/null 2>/dev/null") gostatus = false