firewall: consider zones referenced by redirects as conntracked (#7196)
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 15 Jul 2010 22:08:02 +0000 (22:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 15 Jul 2010 22:08:02 +0000 (22:08 +0000)
SVN-Revision: 22216

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

index abc6020434a9009fea0cad8178bebacb90be0cda..7c324fcf16ce49e1771c27f5f7367c5b3386611a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=firewall
 
 PKG_VERSION:=1
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 include $(INCLUDE_DIR)/package.mk
 
index 8d7538201b97882d9236b02a66c4a3c0ec41651a..be1d437a6af90c883267074fc8530f8db8b52acf 100755 (executable)
@@ -356,6 +356,9 @@ fw_redirect() {
        [ -z "$src" -o -z "$dest_ip" ] && { \
                echo "redirect needs src and dest_ip"; return ; }
 
+       find_item "$src" $CONNTRACK_ZONES || \
+               append CONNTRACK_ZONES "$src"
+
        src_port_first=${src_port%-*}
        src_port_last=${src_port#*-}
        [ "$src_port_first" != "$src_port_last" ] && { \
@@ -391,6 +394,7 @@ fw_redirect() {
                        ${src_mac:+-m mac --mac-source $src_mac} \
                        -j ACCEPT
        }
+
        [ "$proto" == "tcpudp" -o -z "$proto" ] && {
                proto=tcp
                add_rule