mirror of https://github.com/aredn/aredn.git
Filter out non-routable ARP entries which confuse LQM
This commit is contained in:
parent
e515ed7ec6
commit
eefcc888dc
|
@ -362,6 +362,9 @@ function lqm()
|
||||||
for mac, entry in pairs(arps)
|
for mac, entry in pairs(arps)
|
||||||
do
|
do
|
||||||
if entry.Device:match("%.2$") or entry.Device:match("^br%-dtdlink") then
|
if entry.Device:match("%.2$") or entry.Device:match("^br%-dtdlink") then
|
||||||
|
-- Sometimes we find arp entries are not routable. Filter them out early.
|
||||||
|
local rt = ip.route(entry["IP address"])
|
||||||
|
if rt and tostring(rt.gw) == entry["IP address"] then
|
||||||
stations[#stations + 1] = {
|
stations[#stations + 1] = {
|
||||||
type = "DtD",
|
type = "DtD",
|
||||||
device = entry.Device,
|
device = entry.Device,
|
||||||
|
@ -376,6 +379,7 @@ function lqm()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Xlink
|
-- Xlink
|
||||||
if nixio.fs.stat("/etc/config.mesh/xlink") then
|
if nixio.fs.stat("/etc/config.mesh/xlink") then
|
||||||
|
|
Loading…
Reference in New Issue