fix multiple ipsets in an imatch

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-05-16 19:52:41 -07:00
parent cc07e74532
commit 6148c909f2

View File

@ -4707,10 +4707,10 @@ sub imatch_source_net( $;$\$ ) {
for $net ( @sets ) { for $net ( @sets ) {
fatal_error "Expected ipset name ($net)" unless $net =~ /^(!?)(\+?)[a-zA-Z][-\w]*(\[.*\])?/; fatal_error "Expected ipset name ($net)" unless $net =~ /^(!?)(\+?)[a-zA-Z][-\w]*(\[.*\])?/;
push @result, join( '', $1 ? '! ' : '', get_set_flags( $net, 'src' ) ); push @result , ( set => join( '', $1 ? '! ' : '', get_set_flags( $net, 'src' ) ) );
} }
return ( s => \@result ); return \@result;
} }
if ( $net =~ s/^!// ) { if ( $net =~ s/^!// ) {
@ -4806,7 +4806,7 @@ sub imatch_dest_net( $ ) {
push @result , ( set => join( '', $1 ? '! ' : '', get_set_flags( $net, 'dst' ) ) ); push @result , ( set => join( '', $1 ? '! ' : '', get_set_flags( $net, 'dst' ) ) );
} }
return ( set => \@result ); return \@result;
} }
if ( $net =~ s/^!// ) { if ( $net =~ s/^!// ) {