Fixed incorrect peer detection if port is not set (default port is used)
Signed-off-by: Tom Haley <this_username_has_been_taken2@proton.me>
if (ips) {
for (let line = ips.read('line'); length(line); line = ips.read('line')) {
const ip = rtrim(line, '\n');
- if (ip + ":" + configPort == hostIp) {
+ if (configPort && (ip + ":" + configPort == hostIp)) {
+ return true;
+ } else if (ip == substr(hostIp, 0, index(hostIp, ":"))) {
return true;
}
}
return false;
}
-
const methods = {
generatePsk: {
call: function() {