From 64a066c33972ce803b3e78292081285e5013b4aa Mon Sep 17 00:00:00 2001 From: Helge Mader Date: Thu, 15 Jul 2021 09:33:31 +0200 Subject: luci-proto-bonding: fix member because of API change Signed-off-by: Helge Mader --- .../htdocs/luci-static/resources/protocol/bonding.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js') diff --git a/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js b/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js index aadc2306d3..b0ed5b6a11 100644 --- a/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js +++ b/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js @@ -24,14 +24,16 @@ function getSelectableSlaves(section_id) { var slaves = L.toArray(uci.get('network', interfaces[j]['.name'], 'slaves')); for (var k = 0; k < slaves.length; k++) { - if (devices[i].ifname == slaves[k] && interfaces[j]['.name'] != section_id) { - in_use = true; + if (devices[i].ifname == slaves[k] || devices[i].device == slaves[k]) { + if (interfaces[j]['.name'] != section_id) { + in_use = true; + } } } } } if (in_use == false) { - rv.push(devices[i].ifname); + devices[i].device == null ? rv.push(devices[i].ifname) : rv.push(devices[i].device) } } } -- cgit v1.2.3