summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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)
}
}
}