luci-mod-network: interfaces.js: fix ifname migration in device sections
authorJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 09:01:36 +0000 (11:01 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 09:01:36 +0000 (11:01 +0200)
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 <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 98b51c8a8b42d4f6be98a50d2bd64d8232aba123..0847de905ef10291fd817bbc8925e9804082de7a 100644 (file)
@@ -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)
                        }));