summaryrefslogtreecommitdiffstats
path: root/package/firewall
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-22 20:11:25 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-22 20:11:25 +0000
commit6ef496f17a3020a24c4321befa6a060e1fad16dc (patch)
treececba7f13af2776b3d12c8ab53ac06fd231710cc /package/firewall
parent570749fed10a9c755bbf34eeb88f9ce8cdbdb0b5 (diff)
[package] firewall: fix possible expansion of "*" when rules with "option src *" are processed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28527 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall')
-rw-r--r--package/firewall/Makefile2
-rw-r--r--package/firewall/files/lib/fw.sh15
2 files changed, 11 insertions, 6 deletions
diff --git a/package/firewall/Makefile b/package/firewall/Makefile
index 749f04a4b..b0b946fd0 100644
--- a/package/firewall/Makefile
+++ b/package/firewall/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
PKG_VERSION:=2
-PKG_RELEASE:=36
+PKG_RELEASE:=37
include $(INCLUDE_DIR)/package.mk
diff --git a/package/firewall/files/lib/fw.sh b/package/firewall/files/lib/fw.sh
index bf7156e8c..a8a791149 100644
--- a/package/firewall/files/lib/fw.sh
+++ b/package/firewall/files/lib/fw.sh
@@ -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