Filter out non-routable ARP entries which confuse LQM

This commit is contained in:
Tim Wilkinson 2023-02-01 22:38:17 -08:00 committed by Joe AE6XE
parent e515ed7ec6
commit eefcc888dc
1 changed files with 16 additions and 12 deletions

View File

@ -362,18 +362,22 @@ 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
stations[#stations + 1] = { -- Sometimes we find arp entries are not routable. Filter them out early.
type = "DtD", local rt = ip.route(entry["IP address"])
device = entry.Device, if rt and tostring(rt.gw) == entry["IP address"] then
signal = nil, stations[#stations + 1] = {
ip = entry["IP address"], type = "DtD",
mac = mac:upper(), device = entry.Device,
tx_packets = 0, signal = nil,
tx_fail = 0, ip = entry["IP address"],
tx_retries = 0, mac = mac:upper(),
tx_bitrate = 0, tx_packets = 0,
rx_bitrate = 0 tx_fail = 0,
} tx_retries = 0,
tx_bitrate = 0,
rx_bitrate = 0
}
end
end end
end end