summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-wireguard/root
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/luci-proto-wireguard/root')
-rw-r--r--protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard2
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
index c6ae13c94b..c177da4773 100644
--- a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
+++ b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
@@ -89,7 +89,7 @@ const methods = {
let peer_name;
uci.foreach('network', `wireguard_${last_device}`, (s) => {
- if (!s.disabled && s.public_key == record[1] && checkPeerHost(s.endpoint_host, s.endpoint_port, record[3]))
+ if (!s.disabled && s.public_key == record[1] && (!s.endpoint_host || checkPeerHost(s.endpoint_host, s.endpoint_port, record[3])))
peer_name = s.description;
});