summaryrefslogtreecommitdiff
path: root/package/firewall/files/uci_firewall.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-08-03 22:24:48 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-08-03 22:24:48 +0000
commit187e2ba9fc4715520ab909857bfbdca3158261ca (patch)
tree9882416328790f3e2c8632aa8c329c8de2883d45 /package/firewall/files/uci_firewall.sh
parentad4d3c72ddae50acb6234308b425c216859b742a (diff)
downloadmtk-20170518-187e2ba9fc4715520ab909857bfbdca3158261ca.zip
mtk-20170518-187e2ba9fc4715520ab909857bfbdca3158261ca.tar.gz
mtk-20170518-187e2ba9fc4715520ab909857bfbdca3158261ca.tar.bz2
firewall: add icmp_type option to specify the icmp type in rule sections, bump pkg revision (#5554)
SVN-Revision: 17115
Diffstat (limited to 'package/firewall/files/uci_firewall.sh')
-rwxr-xr-xpackage/firewall/files/uci_firewall.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/firewall/files/uci_firewall.sh b/package/firewall/files/uci_firewall.sh
index 263a33d..b71b25d 100755
--- a/package/firewall/files/uci_firewall.sh
+++ b/package/firewall/files/uci_firewall.sh
@@ -243,6 +243,7 @@ fw_rule() {
local dest_ip
local dest_port
local proto
+ local icmp_type
local target
local ruleset
@@ -254,6 +255,7 @@ fw_rule() {
config_get dest_ip $1 dest_ip
config_get dest_port $1 dest_port
config_get proto $1 proto
+ config_get icmp_type $1 icmp_type
config_get target $1 target
config_get ruleset $1 ruleset
@@ -276,6 +278,7 @@ fw_rule() {
add_rule() {
$IPTABLES -I $ZONE 1 \
${proto:+-p $proto} \
+ ${icmp_type:+--icmp-type $icmp_type} \
${src_ip:+-s $src_ip} \
${src_port:+--sport $src_port} \
${src_mac:+-m mac --mac-source $src_mac} \