summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr
diff options
context:
space:
mode:
authorAndi Bräu <andibraeu@users.noreply.github.com>2023-12-21 22:48:59 +0100
committerGitHub <noreply@github.com>2023-12-21 22:48:59 +0100
commit87da3275eaf7a388e77ad137e09b3bf6d3cf97f3 (patch)
treeeb974d444b98b47b3a9fda0b471e27e102bda1d4 /applications/luci-app-olsr
parentbc6127358648b812162ee87abe085f81a61dd199 (diff)
luci-app-olsr: fix null pointer exception (#6778)
for some 'virtual' interfaces, there don't seem to be network status information Signed-off-by: Andreas Bräu <ab@andi95.de>
Diffstat (limited to 'applications/luci-app-olsr')
-rw-r--r--applications/luci-app-olsr/htdocs/luci-static/resources/view/olsr/status-olsr/neighbors.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/applications/luci-app-olsr/htdocs/luci-static/resources/view/olsr/status-olsr/neighbors.js b/applications/luci-app-olsr/htdocs/luci-static/resources/view/olsr/status-olsr/neighbors.js
index 694e0a8eb8..8feabb32cd 100644
--- a/applications/luci-app-olsr/htdocs/luci-static/resources/view/olsr/status-olsr/neighbors.js
+++ b/applications/luci-app-olsr/htdocs/luci-static/resources/view/olsr/status-olsr/neighbors.js
@@ -198,13 +198,13 @@ return view.extend({
}
}
var hosthints = await network.getHostHints();
- var interfac = await network.getStatusByAddress(v.localIP);
+ var networkStatus = await network.getStatusByAddress(v.localIP);
var lmac = await hosthints.getMACAddrByIPAddr(v.localIP);
var rmac = await hosthints.getMACAddrByIPAddr(v.remoteIP);
for (let i = 0; i < assoclist.length; i++) {
var val = assoclist[i];
- if (val.network === interfac.interface && val.list) {
+ if (networkStatus != undefined && val.network === networkStatus.interface && val.list) {
for (var assocmac in val.list) {
var assot = val.list[assocmac];
if (rmac == assot.mac) {
@@ -216,8 +216,8 @@ return view.extend({
}
}
- if (interfac) {
- v.interface = interfac;
+ if (networkStatus) {
+ v.interface = networkStatus;
}
v.snr = snr || null;
v.signal = signal || null;