From f822afef9999326f6ab6af41b41582c78ca7acf4 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 26 Oct 2015 13:07:28 -0700 Subject: [PATCH] Issue warning if a persistent provider isn't optional Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index c777992db..d7f2dbc92 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -661,6 +661,10 @@ sub process_a_provider( $ ) { fatal_error 'A non-empty COPY column requires that a routing table be specified in the DUPLICATE column' unless $copy eq 'none'; } + if ( $persistent ) { + warning_message( "Provider $table is not optional -- the 'persistent' option is ignored" ), $persistent = 0 unless $optional; + } + $providers{$table} = { provider => $table, number => $number , id => $config{USE_RT_NAMES} ? $table : $number,