From b174b3ba3e2560de5c2c679d05b372262e0a72b1 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 1 May 2022 12:34:43 +0200 Subject: [PATCH] Fix wizard when modifying a macvlan interface --- .../luasrc/controller/openmptcprouter.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 20e9db6cd..f5193e100 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -333,6 +333,12 @@ function wizard_add() ucic:set("network",intf .. "_dev","name",ifname) end end + if typeintf ~= "macvlan" and ucic:get("network",intf .. "_dev","type") == "macvlan" then + ucic:delete("network",intf .. "_dev","type") + ucic:delete("network",intf .. "_dev","mode") + ucic:delete("network",intf .. "_dev","ifname") + ucic:delete("network",intf .. "_dev","macaddr") + end if proto == "pppoe" then ucic:set("network",intf,"pppd_options","persist maxfail 0") end