X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-firewall%2Fluasrc%2Fmodel%2Fcbi%2Ffirewall%2Fzone-details.lua;h=7553504572bbf4cbe577e19e6960269586472464;hb=90de442347a54400d37ddb36ecb7a99e913d026a;hp=e5bcb34dae6dc9cd102da0bf21e9f3320dd59416;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;p=project%2Fluci.git diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua index e5bcb34da..755350457 100644 --- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua +++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua @@ -1,17 +1,6 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2010-2011 Jo-Philipp Wich - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -$Id$ -]]-- +-- Copyright 2008 Steven Barth +-- Copyright 2010-2011 Jo-Philipp Wich +-- Licensed to the public under the Apache License 2.0. local nw = require "luci.model.network" local fw = require "luci.model.firewall" @@ -32,7 +21,7 @@ nw.init(m.uci) local zone = fw:get_zone(arg[1]) if not zone then - luci.http.redirect(dsp.build_url("admin/network/firewall/zones")) + luci.http.redirect(ds.build_url("admin/network/firewall/zones")) return else m.title = "%s - %s" %{ @@ -71,7 +60,7 @@ s:tab("advanced", translate("Advanced Settings")) name = s:taboption("general", Value, "name", translate("Name")) name.optional = false name.forcewrite = true -name.datatype = "uciname" +name.datatype = "and(uciname,maxlength(11))" function name.write(self, section, value) if zone:name() ~= value then @@ -137,7 +126,7 @@ msrc = s:taboption("advanced", DynamicList, "masq_src", translate("Restrict Masquerading to given source subnets")) msrc.optional = true -msrc.datatype = "list(neg(or(uciname,hostname,ip4addr)))" +msrc.datatype = "list(neg(or(uciname,hostname,ipmask4)))" msrc.placeholder = "0.0.0.0/0" msrc:depends("family", "") msrc:depends("family", "ipv4") @@ -146,7 +135,7 @@ mdest = s:taboption("advanced", DynamicList, "masq_dest", translate("Restrict Masquerading to given destination subnets")) mdest.optional = true -mdest.datatype = "list(neg(or(uciname,hostname,ip4addr)))" +mdest.datatype = "list(neg(or(uciname,hostname,ipmask4)))" mdest.placeholder = "0.0.0.0/0" mdest:depends("family", "") mdest:depends("family", "ipv4")