Fix missing cursor (#1132)

This commit is contained in:
Tim Wilkinson 2024-03-28 23:01:37 -07:00 committed by GitHub
parent 4337fc6393
commit 068e35dfc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -193,6 +193,7 @@ function html.reboot()
local aredn_info = require("aredn.info")
require("aredn.hardware")
require("aredn.http")
require("uci")
local node = aredn_info.get_nvram("node")
if node == "" then
@ -210,6 +211,7 @@ function html.reboot()
fromlan = validate_same_subnet(browser, lanip, lanmask)
if fromlan then
lanmask = ip_to_decimal(lanmask)
local cursor = uci.cursor()
local cfgip = cursor:get("network", "lan", "ipaddr")
local cfgmask = ip_to_decimal(cursor:get("network", "lan", "netmask"))
if lanmask ~= cfgmask or nixio.bit.band(ip_to_decimal(lanip), lanmask) ~= nixio.bit.band(ip_to_decimal(cfgip), cfgmask) then