From 156313edd2840ac129e14941af217f7ce8abde1a Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 27 Sep 2016 11:47:37 -0700 Subject: [PATCH] Correctly handle down persistent interface during 'disable' Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index ab8df8a22..4abee1fb0 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -809,6 +809,10 @@ sub add_a_provider( $$ ) { push_indent; + emit( "if interface_is_up $physical; then" ); + + push_indent; + if ( $gatewaycase eq 'omitted' ) { if ( $tproxy ) { emit 'run_ip route add local ' . ALLIP . " dev $physical table $id"; @@ -862,7 +866,9 @@ sub add_a_provider( $$ ) { } } - emit( qq(\n), + pop_indent; + + emit( qq(fi\n), qq(rm -f \${VARDIR}/${physical}_enabled) );