Changeset 23143


Ignore:
Timestamp:
2010-09-28T13:38:31+02:00 (6 years ago)
Author:
jow
Message:

[package] firewall: fix chain selection logic, option dest must be ignored for notrack targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/firewall/files/lib/core_rule.sh

    r23141 r23143  
    3737        local table=f 
    3838        local chain=input 
    39         if [ "$rule_target" == "NOTRACK" ]; then 
     39        local target="${rule_target:-REJECT}" 
     40        if [ "$target" == "NOTRACK" ]; then 
    4041                table=r 
    4142                chain="zone_${rule_src}_notrack" 
    42         elif [ -n "$rule_src" ]; then 
    43                 chain="zone_${rule_src}${rule_dest:+_forward}" 
     43        else 
     44                [ -n "$rule_src" ] && chain="zone_${rule_src}${rule_dest:+_forward}" 
     45                [ -n "$rule_dest" ] && target="zone_${rule_dest}_${target}" 
    4446        fi 
    45  
    46         local target="${rule_target:-REJECT}" 
    47         [ -n "$dest" ] && target="zone_${rule_dest}_${target}" 
    4847 
    4948        local mode 
Note: See TracChangeset for help on using the changeset viewer.