From 04112647d3e527d3f4dd28894bda521e8d3cb1cf Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 14 Jan 2017 12:40:39 -0800 Subject: [PATCH] Correct provider/routefilter checking Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 2 +- Shorewall/Perl/lib.runtime | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 2a5062c0c..d06f4c256 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -616,7 +616,7 @@ sub process_a_provider( $ ) { fatal_error "MARK not allowed with 'tproxy'" if $mark ne '-'; fatal_error "'persistent' is not valid with 'tproxy" if $persistent; $mark = $globals{TPROXY_MARK}; - } elsif ( my $rf = $config{ROUTE_FILTER} || $interfaceref->{options}{routefilter} ) { + } elsif ( ( my $rf = ( $config{ROUTE_FILTER} eq 'on' ) ) || $interfaceref->{options}{routefilter} ) { if ( $config{USE_DEFAULT_RT} ) { if ( $rf ) { fatal_error "There may be no providers when ROUTE_FILTER=Yes and USE_DEFAULT_RT=Yes"; diff --git a/Shorewall/Perl/lib.runtime b/Shorewall/Perl/lib.runtime index 2aa0e1cdc..1c55f7958 100644 --- a/Shorewall/Perl/lib.runtime +++ b/Shorewall/Perl/lib.runtime @@ -349,7 +349,7 @@ replace_default_route() # $1 = USE_DEFAULT_RT case "$default_route" in *metric*) # - # Don't restore a default route with a metric unless USE_DEFAULT_RT=Yes. Otherwise, we only replace the one with metric 0 + # Don't restore a default route with a metric unless USE_DEFAULT_RT=Yes or =Exact. Otherwise, we only replace the one with metric 0 # [ -n "$1" ] && qt $IP -$g_family route replace $default_route && progress_message "Default Route (${default_route# }) restored" default_route=