Allow USE_DEFAULT_RT with NetworkManager

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-09 14:17:40 -08:00
parent 617218f8ea
commit 87f63b7160

View File

@ -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");
}