Merge pull request #1794 from dibdot/adblock
[project/luci.git] / applications / luci-app-firewall / luasrc / model / cbi / firewall / forward-details.lua
index c80a6d0..17a4948 100644 (file)
@@ -1,16 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
-
-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 2011 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 local sys = require "luci.sys"
 local dsp = require "luci.dispatcher"
@@ -84,7 +73,7 @@ o = s:option(Value, "src_ip",
        translate("Source IP address"),
        translate("Only match incoming traffic from this IP or range."))
 o.rmempty = true
-o.datatype = "neg(ip4addr)"
+o.datatype = "neg(ipmask4)"
 o.placeholder = translate("any")
 
 luci.sys.net.ipv4_hints(function(ip, name)
@@ -110,7 +99,7 @@ end)
 
 
 o.rmempty = true
-o.datatype = "neg(ip4addr)"
+o.datatype = "neg(ipmask4)"
 o.placeholder = translate("any")
 
 
@@ -130,7 +119,7 @@ o.template = "cbi/firewall_zonelist"
 o = s:option(Value, "dest_ip", translate("Internal IP address"),
        translate("Redirect matched incoming traffic to the specified \
                internal host"))
-o.datatype = "ip4addr"
+o.datatype = "ipmask4"
 
 luci.sys.net.ipv4_hints(function(ip, name)
        o:value(ip, "%s (%s)" %{ ip, name })