Fix network discovery on nedge

This commit is contained in:
emanuele-f 2018-03-08 17:28:02 +01:00
parent 4b9ae1904d
commit 60f3753e12
5 changed files with 34 additions and 16 deletions

View file

@ -736,6 +736,7 @@ local function discoverARP()
local res = {}
local ghost_macs = {}
local ghost_found = false
local arp_mdns = interface.arpScanHosts()
if(arp_mdns == nil) then
@ -745,7 +746,7 @@ local function discoverARP()
local known_macs = interface.getMacsInfo(nil, 999, 0, false, true, true, nil) or {}
for _,hmac in pairs(known_macs.macs) do
if(hmac["bytes.sent"] > 0) then -- Skip silent hosts
if((hmac["bytes.sent"] > 0) and (hmac["location"] == "lan")) then -- Skip silent/wan hosts
if(arp_mdns[hmac.mac] == nil) then
local ips = interface.findHostByMac(hmac.mac) or {}
if(discover.debug) then io.write("Missing MAC "..hmac.mac.."\n") end