ethinfo: add wan (Netgear R8500)

This commit is contained in:
Bard 2024-05-10 13:58:47 +08:00 committed by GitHub
parent c02b47b4b9
commit d7a1be3765
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ local jsonc = require "luci.jsonc"
local eth_info = {}
local ifname, stat
for ifname, stat in pairs(util.ubus("network.device", "status")) do
if ifname:match("^(eth%d+)$") == ifname or ifname:match("^(usb%d+)$") or ifname:match("^(lan%d+)$") == ifname then
if ifname:match("^(eth%d+)$") == ifname or ifname:match("^(usb%d+)$") or ifname:match("^(lan%d+)$") or ifname:match("wan") == ifname then
local status, speed, duplex
status = stat.carrier and "yes" or "no"