diff options
Diffstat (limited to 'applications/luci-firewall/luasrc/model')
-rw-r--r-- | applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua b/applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua index 660848cee6..5f7a69b255 100644 --- a/applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua +++ b/applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua @@ -35,7 +35,9 @@ s.template_addremove = "firewall/cbi_addforward" function s.create(self, section) local n = m:formvalue("_newfwd.name") local p = m:formvalue("_newfwd.proto") + local E = m:formvalue("_newfwd.extzone") local e = m:formvalue("_newfwd.extport") + local I = m:formvalue("_newfwd.intzone") local a = m:formvalue("_newfwd.intaddr") local i = m:formvalue("_newfwd.intport") @@ -43,8 +45,8 @@ function s.create(self, section) created = TypedSection.create(self, section) self.map:set(created, "target", "DNAT") - self.map:set(created, "src", "wan") - self.map:set(created, "dest", "lan") + self.map:set(created, "src", E or "wan") + self.map:set(created, "dest", I or "lan") self.map:set(created, "proto", (p ~= "other") and p or "all") self.map:set(created, "src_dport", e) self.map:set(created, "dest_ip", a) |