summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol
diff options
context:
space:
mode:
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 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)
}
}
}