Changeset 17713


Ignore:
Timestamp:
2009-09-24T23:59:16+02:00 (7 years ago)
Author:
nbd
Message:

firewall: add sanity checks to zone default rules (patch from #5459)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/firewall/files/uci_firewall.sh

    r17415 r17713  
    5757        $IPTABLES -N zone_$1_REJECT 
    5858        $IPTABLES -N zone_$1_forward 
    59         $IPTABLES -A zone_$1_forward -j zone_$1_$5 
    60         $IPTABLES -A zone_$1 -j zone_$1_$3 
    61         $IPTABLES -A output -j zone_$1_$4 
     59        [ "$5" ] && $IPTABLES -A zone_$1_forward -j zone_$1_$5 
     60        [ "$3" ] && $IPTABLES -A zone_$1 -j zone_$1_$3 
     61        [ "$4" ] && $IPTABLES -A output -j zone_$1_$4 
    6262        $IPTABLES -N zone_$1_nat -t nat 
    6363        $IPTABLES -N zone_$1_prerouting -t nat 
Note: See TracChangeset for help on using the changeset viewer.