summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-08-09 19:47:23 +0200
committerGitHub <noreply@github.com>2021-08-09 19:47:23 +0200
commit3d2a2ec1fab2c28b403e44bb9887ef3726f76ea4 (patch)
tree72f1d1dcdcd2439e13eb7db7ef615be13a3a6d07 /protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol
parentfd2e755b6f30d80ffdf15536669fdb739212ac96 (diff)
parent64a066c33972ce803b3e78292081285e5013b4aa (diff)
Merge pull request #5190 from TDT-AG/pr/20210715-proto-bonding
luci-proto-bonding: fix member because of API change
Diffstat (limited to 'protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol')
-rw-r--r--protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js8
1 files changed, 5 insertions, 3 deletions
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 5af062aaca..4c774290f0 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)
}
}
}