firewall: insert rules at the beginning of chains again while maintaining non reversed order, fixes wrong ordering introduced by r18015
SVN-Revision: 19946
This commit is contained in:
parent
b3f90f939b
commit
f96ecd026d
1 changed files with 4 additions and 1 deletions
|
@ -294,8 +294,11 @@ fw_rule() {
|
|||
[ -n "$src" -a -z "$dest" ] && ZONE=zone_$src
|
||||
[ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
|
||||
[ -n "$dest" ] && TARGET=zone_${dest}_$target
|
||||
|
||||
eval 'RULE_COUNT=$((++RULE_COUNT_'$ZONE'))'
|
||||
|
||||
add_rule() {
|
||||
$IPTABLES -A $ZONE \
|
||||
$IPTABLES -I $ZONE $RULE_COUNT \
|
||||
${proto:+-p $proto} \
|
||||
${icmp_type:+--icmp-type $icmp_type} \
|
||||
${src_ip:+-s $src_ip} \
|
||||
|
|
Loading…
Reference in a new issue