git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
27ecfda
)
luci-proto-wireguard: fixed incorrect peer detection for ipv6 and default port
author
Tom Haley
<redacted>
Thu, 5 Dec 2024 07:54:19 +0000
(10:54 +0300)
committer
Paul Donald
<redacted>
Thu, 5 Dec 2024 17:09:39 +0000
(18:09 +0100)
Fixed incorrect peer detection if IP v6 is used and no port for peer is defined.
Signed-off-by: Tom Haley <redacted>
protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
patch
|
blob
|
history
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 32acbb639d2614b7fe4e8b0428b861e56c1d4b9d..55f0bba2a9432d13ce858e447eff5b9234c1dd3c 100644
(file)
--- a/
protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
+++ b/
protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
@@
-20,10
+20,10
@@
function checkPeerHost(configHost, configPort, wgHost) {
const hostIp = replace(wgHost, /\[|\]/g, "");
if (ips) {
for (let line = ips.read('line'); length(line); line = ips.read('line')) {
- const ip =
rtrim(line, '\n');
+ const ip = rtrim(line, '\n');
if (configPort && (ip + ":" + configPort == hostIp)) {
return true;
- } else if (ip == substr(hostIp, 0, index(hostIp, ":"))) {
+ } else if (ip == substr(hostIp, 0,
r
index(hostIp, ":"))) {
return true;
}
}
git clone https://git.99rst.org/PROJECT