From: Jo-Philipp Wich Date: Wed, 9 Jun 2021 09:01:36 +0000 (+0200) Subject: luci-mod-network: interfaces.js: fix ifname migration in device sections X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=a648b3637286da16a839892c45a81f75f90553d2;p=project%2Fluci.git luci-mod-network: interfaces.js: fix ifname migration in device sections The migration code attempted to add new device sections instead of moving the ifname option to a ports list within the existing ones. Fixes: #5108 Signed-off-by: Jo-Philipp Wich (cherry picked from commit e13d82a202975bd9ac5eca380049b887cb1d585d) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 98b51c8a8b..0847de905e 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -392,7 +392,7 @@ return view.extend({ var tasks = []; this.deviceWithIfnameSections().forEach(function(ds) { - tasks.push(uci.add('network', ds['.name'], { + tasks.push(uci.callSet('network', ds['.name'], { 'ifname': '', 'ports': L.toArray(ds.ifname) }));