Don't be specific when deleting IPv6 balanced/fallback default routes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-11-28 14:19:57 -08:00
parent 3e87e5004a
commit 5dcb684efc
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1575,7 +1575,7 @@ sub finish_providers() {
emit ( " run_ip route replace default scope global table $table \$DEFAULT_ROUTE" );
} else {
emit ( " if echo \$DEFAULT_ROUTE | grep -q 'nexthop.+nexthop'; then",
" qt \$IP -6 route delete default scope global table $table \$DEFAULT_ROUTE",
" while qt \$IP -6 route delete default table $table; do true; done",
" run_ip route add default scope global table $table \$DEFAULT_ROUTE",
' else',
" run_ip route replace default scope global table $table \$DEFAULT_ROUTE",
@ -1638,7 +1638,7 @@ sub finish_providers() {
if ( $family == F_IPV4 ) {
emit( " run_ip route replace default scope global table $default \$FALLBACK_ROUTE" );
} else {
emit( " run_ip route delete default scope global table $default \$FALLBACK_ROUTE" );
emit( " while qt \$IP -6 route delete default table $default; do true; done" );
emit( " run_ip route add default scope global table $default \$FALLBACK_ROUTE" );
}