summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-05-11 20:15:20 +0200
committerGitHub <noreply@github.com>2018-05-11 20:15:20 +0200
commite951a4dd90e6de067bdfdac97793ffe9ac6dd573 (patch)
tree81985c8834c76429818909e0cd48a75f39f7c71d /applications
parent658b6d7d2131b9dc891389b22ba35b4b937d9396 (diff)
parent6e4d992710af253110495a1247f433ba76d6e662 (diff)
Merge pull request #1791 from dibdot/travelmate
luci-app-travelmate: fix Interface Wizard
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua
index f8846493e7..a1dcbc638c 100644
--- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua
+++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua
@@ -41,12 +41,14 @@ if uplink == "" then
function o.validate(self, value)
if value then
- local net = nw:add_network(value, { proto = "dhcp" })
- if net then
- local zone = fw:get_zone_by_network("wan")
- if zone then
- zone:add_network(value)
- end
+ local nwnet = nw:get_network(value)
+ local zone = fw:get_zone("wan")
+ local fwnet = fw:get_zone_by_network(value)
+ if not nwnet then
+ nwnet = nw:add_network(value, { proto = "dhcp" })
+ end
+ if zone and not fwnet then
+ fwnet = zone:add_network(value)
end
end
return value