Fix MTU failure which broken node-setup (#878)

This commit is contained in:
Tim Wilkinson 2023-06-22 17:17:43 -07:00 committed by GitHub
parent 15c78a4369
commit 426abfacfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,8 @@ if cfg.wifi_enable == "1" then
if not cfg.wifi_intf or cfg.wifi_intf == "" then
cfg.wifi_intf = aredn.hardware.get_board_network_ifname("wifi"):match("^(%S+)")
end
local mtu = tonumber(c:get("aredn", "@lqm[0]", "mtu"))
local mtu = c:get("aredn", "@lqm[0]", "mtu")
mtu = tonumber(mtu)
if mtu and mtu >= 256 and mtu <= 1500 then
cfg.wifi_mtu = mtu
end