mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-29 00:49:34 +01:00
Backport fixes; allow bang in accounting rules
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1336 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
45c76e36a7
commit
a546817aa6
@ -5,4 +5,6 @@ Changes since 2.0.2
|
||||
|
||||
2) Restore file now loads kernel modules.
|
||||
|
||||
3) Minor tweaks to the restore mechanism.
|
||||
3) Minor tweaks to the restore mechanism.
|
||||
|
||||
4) Allow "!" in accounting rules.
|
||||
|
@ -2238,8 +2238,8 @@ process_accounting_rule() {
|
||||
|
||||
ensurechain1 $chain
|
||||
|
||||
if iptables -A $chain $rule ; then
|
||||
[ "x$rule2" != x ] && run_iptables -A $jumpchain $rule2
|
||||
if iptables -A $chain $(fix_bang $rule) ; then
|
||||
[ -n "$rule2" ] && run_iptables2 -A $jumpchain $rule2
|
||||
progress_message " Accounting rule" $action $chain $source $dest $proto $port $sport Added
|
||||
else
|
||||
accounting_error
|
||||
@ -2730,7 +2730,7 @@ process_actions1() {
|
||||
case $temp in
|
||||
ACCEPT|REJECT|DROP)
|
||||
eval ${temp}_common=$xaction
|
||||
if ! list_search $xaction $USEDACTIONS; then
|
||||
if [ -n "$xaction" ] && ! list_search $xaction $USEDACTIONS; then
|
||||
USEDACTIONS="$USEDACTIONS $xaction"
|
||||
[ $COMMAND = check ] || createactionchain $xaction
|
||||
fi
|
||||
@ -5415,6 +5415,8 @@ define_firewall() # $1 = Command (Start or Restart)
|
||||
verify_os_version
|
||||
verify_ip
|
||||
|
||||
[ -d /var/lib/shorewall ] || mkdir -p /var/lib/shorewall
|
||||
|
||||
echo '#bin/sh' > /var/lib/shorewall/restore-$$
|
||||
save_command "# Restore base file generated $(date)"
|
||||
save_command ". /usr/share/shorewall/functions"
|
||||
@ -5952,7 +5954,7 @@ do_initialize() {
|
||||
determine_capabilities
|
||||
|
||||
[ -z "${STATEDIR}" ] && STATEDIR=/var/state/shorewall
|
||||
|
||||
|
||||
[ -d $STATEDIR ] || mkdir -p $STATEDIR
|
||||
|
||||
[ -z "$FW" ] && FW=fw
|
||||
|
@ -17,4 +17,4 @@ None.
|
||||
|
||||
New Features:
|
||||
|
||||
None.
|
||||
1) "!" is now allowed in accounting rules.
|
||||
|
Loading…
Reference in New Issue
Block a user