Clear the DEFAULT table if no FALLBACK providers are up.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-05-20 09:00:22 -07:00
parent d8ec051114
commit ef974b5c8d

View File

@ -1152,10 +1152,15 @@ sub finish_providers() {
}
emit( " progress_message \"Fallback route '\$(echo \$FALLBACK_ROUTE | sed 's/\$\\s*//')' Added\"",
'else',
'#',
'# We don\'t have any \'fallback\' providers so we delete any default routes in the default table',
'#',
" while qt \$IP -$family route del default table " . DEFAULT_TABLE . '; do true; done',
'fi',
'' );
} elsif ( $config{USE_DEFAULT_RT} ) {
emit "qt \$IP -$family route del default table " . DEFAULT_TABLE;
emit "while qt \$IP -$family route del default table " . DEFAULT_TABLE . '; do true; done';
}
unless ( $config{KEEP_RT_TABLES} ) {