From cd3a9854f8960c33f6adb187242c606ab94237aa Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 18 Feb 2012 08:22:16 -0800 Subject: [PATCH] Change ipset flags error to a warning Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index ccd989332..985390662 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -4313,8 +4313,13 @@ sub get_set_flags( $$ ) { } elsif ( $setname =~ /^(.*)\[((src|dst)(,(src|dst))*)\]$/ ) { $setname = $1; $options = $2; - my @OPTIONS = split /,/, $options; - fatal_error "Invalid flags ($options) for a " . $option eq 'src' ? 'SOURCE' : 'DEST' . ' column'; + + my @options = split /,/, $options; + my %typemap = ( src => 'Source', dst => 'Destination' ); + + for ( @options ) { + warning_messsage( "The '$_' ipset flag is used in a $typemap{$option} column" ), last unless $_ eq $option; + } } $setname =~ s/^\+//;