summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ffwizard-leipzig/luasrc/tools
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-13 23:21:32 +0000
committerSteven Barth <steven@midlink.org>2008-09-13 23:21:32 +0000
commit16654183664f14a7c6be0ca701c693c301a93321 (patch)
treea84b939072ce3f945d58616643441d6386547eaf /applications/luci-ffwizard-leipzig/luasrc/tools
parent8bba6cf4d061e28d8fda10a6f9348fa8a8b1380e (diff)
FF-Wizard: Set interface protocol to static, don't add the zone to network if it does not match an existing interface
Diffstat (limited to 'applications/luci-ffwizard-leipzig/luasrc/tools')
-rw-r--r--applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua b/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
index bb7cbb8345..60a240bf0c 100644
--- a/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
+++ b/applications/luci-ffwizard-leipzig/luasrc/tools/ffwizard.lua
@@ -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