Preserve dynamic blacklist during stop/clear/restore

This commit is contained in:
Tom Eastep 2010-09-16 12:17:04 -07:00
parent 44665775b2
commit 1c870b532a

View File

@ -2394,6 +2394,17 @@ EOF
case $COMMAND in
stop|clear|restore)
if chain_exists dynamic; then
EOF
if ( $family == F_IPV4 ) {
emit( ' ${IPTABLES}-save -t filter | grep \'^-A dynamic\' > ${VARDIR}/.dynamic' );
} else {
emit( ' ${IP6TABLES}-save -t filter | grep \'^-A dynamic\' > ${VARDIR}/.dynamic' );
}
emit <<'EOF';
fi
;;
*)
set +x