[package] firewall: add icmp_type option to specify the icmp type in rule sections...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 3 Aug 2009 22:24:48 +0000 (22:24 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 3 Aug 2009 22:24:48 +0000 (22:24 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17115 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/firewall/Makefile
package/firewall/files/uci_firewall.sh

index 61da9bed19fc1bddcf8ed835f7b16d869b669cec..7dcc2f573968b38aeff3abe3434ef54e1ee4af7d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=firewall
 
 PKG_VERSION:=1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 include $(INCLUDE_DIR)/package.mk
 
index 263a33d153569a0e008c94733583fa86123b820a..b71b25de7c184097e4798c5bc99102721fbe7c31 100755 (executable)
@@ -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} \