Fix check for whether wireguard tunnels are up (#1469)

This commit is contained in:
Tim Wilkinson 2024-09-07 09:40:23 -07:00 committed by GitHub
parent ad07fb2148
commit 861e299251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ uciMesh.foreach("vtun", "server", a => {
network: a.netip, network: a.netip,
passwd: a.passwd, passwd: a.passwd,
weight: a.weight ?? "", weight: a.weight ?? "",
up: wireguard ? (length(filter(up.wg, v => index(a.key, v) !== -1)) === 0 ? false : true) : (up.lg[a.netip] ? true : false) up: wireguard ? (length(filter(up.wg, v => index(a.passwd, v) !== -1)) === 0 ? false : true) : (up.lg[a.netip] ? true : false)
}); });
delete available.l[a.clientip]; delete available.l[a.clientip];
delete available.w[a.clientip]; delete available.w[a.clientip];