luci-mod-network: dhcp.js: don't fail on not existing interface
Fixes: #5177 Fixes: 7e56289538 ("luci-mod-network: improve static DHCP lease validation") Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit f57d20bffffda026ab203d328a859a3f38c0c8d0)
This commit is contained in:
parent
8b02f53a37
commit
16e807edc9
@ -98,9 +98,9 @@ function getDHCPPools() {
|
||||
continue;
|
||||
|
||||
tasks.push(network.getNetwork(sections[i].interface).then(L.bind(function(section_id, net) {
|
||||
var cidr = (net.getIPAddrs()[0] || '').split('/');
|
||||
var cidr = net ? (net.getIPAddrs()[0] || '').split('/') : null;
|
||||
|
||||
if (cidr.length == 2) {
|
||||
if (cidr && cidr.length == 2) {
|
||||
var net_mask = calculateNetwork(cidr[0], cidr[1]);
|
||||
|
||||
pools.push({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user