[backfire] firewall: merge r28527
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 22 Oct 2011 20:12:59 +0000 (20:12 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 22 Oct 2011 20:12:59 +0000 (20:12 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@28528 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/firewall/Makefile
package/firewall/files/lib/fw.sh

index 859b5541fa9c4aeaa5c24fa8ad75498dde95cc59..79554f99ddf644ab81c25fc5b4bc1cb5c5ae4472 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=firewall
 
 PKG_VERSION:=2
-PKG_RELEASE:=34.1
+PKG_RELEASE:=34.2
 
 include $(INCLUDE_DIR)/package.mk
 
index bf7156e8cefebd4499bbc0534d9fb00922e09188..a8a791149478badda041dd01c1fa36179afc6428 100644 (file)
@@ -211,12 +211,17 @@ fw_get_family_mode() {
        local _mode="$4"
 
        local _ipv4 _ipv6
-       [ -n "$FW_ZONES4$FW_ZONES6" ] && {
-               list_contains FW_ZONES4 $_zone && _ipv4=1 || _ipv4=0
-               list_contains FW_ZONES6 $_zone && _ipv6=1 || _ipv6=0
+       [ "$_zone" != "*" ] && {
+               [ -n "$FW_ZONES4$FW_ZONES6" ] && {
+                       list_contains FW_ZONES4 "$_zone" && _ipv4=1 || _ipv4=0
+                       list_contains FW_ZONES6 "$_zone" && _ipv6=1 || _ipv6=0
+               } || {
+                       _ipv4=$(uci_get_state firewall core "${_zone}_ipv4" 0)
+                       _ipv6=$(uci_get_state firewall core "${_zone}_ipv6" 0)
+               }
        } || {
-               _ipv4=$(uci_get_state firewall core ${_zone}_ipv4 0)
-               _ipv6=$(uci_get_state firewall core ${_zone}_ipv6 0)
+               _ipv4=1
+               _ipv6=1
        }
 
        case "$_hint:$_ipv4:$_ipv6" in