aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2008-08-26 07:23:29 +0000
committerJohn Crispin <blogic@openwrt.org>2008-08-26 07:23:29 +0000
commit1d44d1a5ba914d549aba0577ff70a4ab13e8cb5c (patch)
treed9346865c45e719712da4e728c9b40c02581a86a /package
parentfa363c178e7c91fd7cdb1ebeee59a507e58afdba (diff)
downloadupstream-1d44d1a5ba914d549aba0577ff70a4ab13e8cb5c.tar.gz
upstream-1d44d1a5ba914d549aba0577ff70a4ab13e8cb5c.tar.bz2
upstream-1d44d1a5ba914d549aba0577ff70a4ab13e8cb5c.zip
use proto instead of protocol in uci firewall
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12391 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/firewall/files/firewall.config2
-rwxr-xr-xpackage/firewall/files/uci_firewall.sh10
2 files changed, 6 insertions, 6 deletions
diff --git a/package/firewall/files/firewall.config b/package/firewall/files/firewall.config
index 073169013d..fe5d38d2b9 100755
--- a/package/firewall/files/firewall.config
+++ b/package/firewall/files/firewall.config
@@ -50,7 +50,7 @@ config forwarding
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
-# option protocol tcp
+# option proto tcp
# include a file with users custom iptables rules
#config include
diff --git a/package/firewall/files/uci_firewall.sh b/package/firewall/files/uci_firewall.sh
index ff82f8bf0b..e1c4d4d673 100755
--- a/package/firewall/files/uci_firewall.sh
+++ b/package/firewall/files/uci_firewall.sh
@@ -211,7 +211,7 @@ fw_redirect() {
local src_mac
local dest_ip
local dest_port
- local protocol
+ local proto
config_get src $1 src
config_get src_ip $1 src_ip
@@ -220,20 +220,20 @@ fw_redirect() {
config_get src_mac $1 src_mac
config_get dest_ip $1 dest_ip
config_get dest_port $1 dest_port
- config_get protocol $1 protocol
+ config_get proto $1 proto
[ -z "$src" -o -z "$dest_ip" ] && { \
echo "redirect needs src and dest_ip"; return ; }
- [ -n "$dest_port" -a -z "$protocol" ] && { \
+ [ -n "$dest_port" -a -z "$proto" ] && { \
echo "dport may only be used it proto is defined"; return; }
$IPTABLES -A zone_${src}_prerouting -t nat \
- ${protocol:+-p $protocol} \
+ ${proto:+-p $proto} \
${src_ip:+-s $src_ip} \
${src_port:+--sport $src_port} \
${src_dport:+--dport $src_dport} \
${src_mac:+-m mac --mac-source $src_mac} \
-j DNAT --to-destination $dest_ip${dest_port:+:$dest_port}
$IPTABLES -I zone_${src}_forward 1 \
- ${protocol:+-p $protocol} \
+ ${proto:+-p $proto} \
-d $dest_ip \
${src_ip:+-s $src_ip} \
${src_port:+--sport $src_port} \