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 commitf57d20bfff
)
This commit is contained in:
parent
8b02f53a37
commit
16e807edc9
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue