From 87f63b71608808595d6759cb9cc63539bc499ce2 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 9 Mar 2016 14:17:40 -0800 Subject: [PATCH] Allow USE_DEFAULT_RT with NetworkManager Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 681308c1a..415901145 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -6829,14 +6829,12 @@ sub get_interface_gateway ( $;$ ) { my $interface = get_physical $logical; my $variable = interface_gateway( $interface ); - my $routine = $config{USE_DEFAULT_RT} ? 'detect_dynamic_gateway' : 'detect_gateway'; - $global_variables |= ALL_COMMANDS; if ( interface_is_optional $logical ) { - $interfacegateways{$interface} = qq([ -n "\$$variable" ] || $variable=\$($routine $interface)); + $interfacegateways{$interface} = qq([ -n "\$$variable" ] || $variable=\$(detect_gateway $interface)); } else { - $interfacegateways{$interface} = qq([ -n "\$$variable" ] || $variable=\$($routine $interface) + $interfacegateways{$interface} = qq([ -n "\$$variable" ] || $variable=\$(detect_gateway $interface) [ -n "\$$variable" ] || startup_error "Unable to detect the gateway through interface $interface"); }