Changeset 28527


Ignore:
Timestamp:
2011-10-22T22:11:25+02:00 (5 years ago)
Author:
jow
Message:

[package] firewall: fix possible expansion of "*" when rules with "option src *" are processed

Location:
trunk/package/firewall
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/firewall/Makefile

    r28525 r28527  
    1010 
    1111PKG_VERSION:=2 
    12 PKG_RELEASE:=36 
     12PKG_RELEASE:=37 
    1313 
    1414include $(INCLUDE_DIR)/package.mk 
  • trunk/package/firewall/files/lib/fw.sh

    r28525 r28527  
    212212 
    213213        local _ipv4 _ipv6 
    214         [ -n "$FW_ZONES4$FW_ZONES6" ] && { 
    215                 list_contains FW_ZONES4 $_zone && _ipv4=1 || _ipv4=0 
    216                 list_contains FW_ZONES6 $_zone && _ipv6=1 || _ipv6=0 
     214        [ "$_zone" != "*" ] && { 
     215                [ -n "$FW_ZONES4$FW_ZONES6" ] && { 
     216                        list_contains FW_ZONES4 "$_zone" && _ipv4=1 || _ipv4=0 
     217                        list_contains FW_ZONES6 "$_zone" && _ipv6=1 || _ipv6=0 
     218                } || { 
     219                        _ipv4=$(uci_get_state firewall core "${_zone}_ipv4" 0) 
     220                        _ipv6=$(uci_get_state firewall core "${_zone}_ipv6" 0) 
     221                } 
    217222        } || { 
    218                 _ipv4=$(uci_get_state firewall core ${_zone}_ipv4 0) 
    219                 _ipv6=$(uci_get_state firewall core ${_zone}_ipv6 0) 
     223                _ipv4=1 
     224                _ipv6=1 
    220225        } 
    221226 
Note: See TracChangeset for help on using the changeset viewer.