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 <jo@mein.io>
(cherry picked from commit e13d82a202)
This commit is contained in:
Jo-Philipp Wich 2021-06-09 11:01:36 +02:00
parent da2eefe94b
commit a648b36372

View 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)
}));