From fb9fc42b598d68dd90f2bb83476182dcb18ab4d7 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Sat, 10 Dec 2022 23:35:58 -0500 Subject: [PATCH] remove 169.x.x.x interfaces from search --- src/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/search.js b/src/search.js index f398312..72b599d 100644 --- a/src/search.js +++ b/src/search.js @@ -20,10 +20,12 @@ function getServers() { const addresses = interfaces[key]; for (let i = addresses.length; i--; ) { const address = addresses[i]; - if (address.family === 'IPv4' && !address.internal) { + + if (address.family === 'IPv4' && !address.internal && address.address.substring(0, 3)!="169") { const subnet = ip.subnet(address.address, address.netmask); let current = ip.toLong(subnet.firstAddress); const last = ip.toLong(subnet.lastAddress) - 1; + console.log(`range ${subnet.firstAddress} - ${subnet.lastAddress}`); while (current++ < last) result.push(ip.fromLong(current)); } }