FF-Wizard: Set interface protocol to static, don't add the zone to network if it does not match an existing interface
This commit is contained in:
parent
8bba6cf4d0
commit
1665418366
2 changed files with 3 additions and 1 deletions
|
@ -178,6 +178,7 @@ function main.write(self, section, value)
|
|||
|
||||
-- Crate network interface
|
||||
local netconfig = _strip_internals(uci:get_all("freifunk", "interface"))
|
||||
netconfig.proto = "static"
|
||||
netconfig.ipaddr = ip
|
||||
uci:section("network", "interface", device, netconfig)
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ function firewall_zone_add_interface(name, interface)
|
|||
local cursor = uci.cursor()
|
||||
local zone = firewall_find_zone(name)
|
||||
local net = cursor:get("firewall", zone, "network")
|
||||
cursor:set("firewall", zone, "network", (net or name .. " ") .. interface)
|
||||
local old = net or (cursor:get("network", name) and name)
|
||||
cursor:set("firewall", zone, "network", (old and old .. " " or "") .. interface)
|
||||
cursor:save("firewall")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue