From 2231f1e9da801df1cd814e31a8321f8a10417bc9 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 1 Dec 2011 11:23:22 -0800 Subject: [PATCH] Don't deprecate 'optional' for shared providers Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 7 +++++-- manpages/shorewall-providers.xml | 9 +++++---- manpages6/shorewall6-providers.xml | 7 +++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index b966c88a8..01b33888c 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -385,8 +385,11 @@ sub process_a_provider() { $loose = 1; $default_balance = 0; } elsif ( $option eq 'optional' ) { - warning_message q(The 'optional' provider option is deprecated - use the 'optional' interface option instead); - set_interface_option $interface, 'optional', 1; + unless ( $shared ) { + warning_message q(The 'optional' provider option is deprecated - use the 'optional' interface option instead); + set_interface_option $interface, 'optional', 1; + } + $optional = 1; } elsif ( $option =~ /^src=(.*)$/ ) { fatal_error "OPTION 'src' not allowed on shared interface" if $shared; diff --git a/manpages/shorewall-providers.xml b/manpages/shorewall-providers.xml index d2fb1fdcb..8a3bc0912 100644 --- a/manpages/shorewall-providers.xml +++ b/manpages/shorewall-providers.xml @@ -211,8 +211,8 @@ - optional - (deprecated) + optional (deprecated for use with + providers that do not share an interface) If the interface named in the INTERFACE column is not up @@ -220,8 +220,9 @@ If not specified, the value of the option for the INTERFACE in shorewall-interfaces(5) - is assumed. Use of that option is preferred to this - one. + is assumed. Use of that option is preferred to this one, + unless an address is provider in + the INTERFACE column. diff --git a/manpages6/shorewall6-providers.xml b/manpages6/shorewall6-providers.xml index dcfa6537f..66eade929 100644 --- a/manpages6/shorewall6-providers.xml +++ b/manpages6/shorewall6-providers.xml @@ -208,7 +208,8 @@ - optional + optional (deprecated for + use with providers that do not share an interface) If the interface named in the INTERFACE column is not up @@ -216,7 +217,9 @@ If not specified, the value of the option for the INTERFACE in shorewall6-interfaces(5) - is assumed. + is assumed. Use of that option is preferred to this one, + unless an address is provider in + the INTERFACE column.