diff --git a/Shorewall2/shorewall b/Shorewall2/shorewall index 8d48e2c0f..331b4e636 100755 --- a/Shorewall2/shorewall +++ b/Shorewall2/shorewall @@ -1096,7 +1096,7 @@ case "$1" in # # The 'awk' hack compensates for a bug in iptables-save (actually in libipt_policy.so) and can be removed when that bug is fixed. # - if iptables-save | awk 'BEGIN {sline=""; }; /^-j/ { print sline $0; next }; /-m policy/ { sline=$0; next }; {print ; sline="" }' >> /var/lib/shorewall/restore-$$ ; then + if iptables-save | awk 'BEGIN {sline=""; }; /^-j/ { print sline $0; next }; /-m policy.*-j/ { print $0; next }; /-m policy/ { sline=$0; next }; {print ; sline="" }' >> /var/lib/shorewall/restore-$$ ; then echo __EOF__ >> /var/lib/shorewall/restore-$$ mv -f /var/lib/shorewall/restore-$$ $RESTOREPATH chmod +x $RESTOREPATH