From 668cb6deda41ee4ffde055278551d90f984d9de4 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 11 Dec 2018 07:37:39 -0800 Subject: [PATCH] Make 'status -i' work when there are no providers Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index cc88c03e5..3be59c522 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -1917,18 +1917,18 @@ sub setup_providers() { push_indent; + emit "undo_routing"; + emit "restore_default_route $config{USE_DEFAULT_RT}"; + if ( $pseudoproviders ) { emit ''; emit "start_$providers{$_}->{what}_$_" for @providers; - emit ''; } - emit "undo_routing"; - emit "restore_default_route $config{USE_DEFAULT_RT}"; - my $standard_routes = @{$providers{main}{routes}} || @{$providers{default}{routes}}; if ( $config{NULL_ROUTE_RFC1918} ) { + emit ''; setup_null_routing; emit "\nrun_ip route flush cache" unless $standard_routes; }