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,18 +362,22 @@ function lqm()
|
|||
for mac, entry in pairs(arps)
|
||||
do
|
||||
if entry.Device:match("%.2$") or entry.Device:match("^br%-dtdlink") then
|
||||
stations[#stations + 1] = {
|
||||
type = "DtD",
|
||||
device = entry.Device,
|
||||
signal = nil,
|
||||
ip = entry["IP address"],
|
||||
mac = mac:upper(),
|
||||
tx_packets = 0,
|
||||
tx_fail = 0,
|
||||
tx_retries = 0,
|
||||
tx_bitrate = 0,
|
||||
rx_bitrate = 0
|
||||
}
|
||||
-- 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] = {
|
||||
type = "DtD",
|
||||
device = entry.Device,
|
||||
signal = nil,
|
||||
ip = entry["IP address"],
|
||||
mac = mac:upper(),
|
||||
tx_packets = 0,
|
||||
tx_fail = 0,
|
||||
tx_retries = 0,
|
||||
tx_bitrate = 0,
|
||||
rx_bitrate = 0
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue