mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Tiny optimizaiton in match_src_net
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8475 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2b67b46f02
commit
6c35bd9cc4
@ -1432,8 +1432,7 @@ sub match_source_net( $;$ ) {
|
|||||||
} elsif ( $net =~ /^(!?)\+/ ) {
|
} elsif ( $net =~ /^(!?)\+/ ) {
|
||||||
require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' );
|
require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' );
|
||||||
join( '', '-m set ', $1 ? '! ' : '', get_set_flags( $net, 'src' ) );
|
join( '', '-m set ', $1 ? '! ' : '', get_set_flags( $net, 'src' ) );
|
||||||
} elsif ( $net =~ /^!/ ) {
|
} elsif ( $net =~ s/^!// ) {
|
||||||
$net =~ s/!//;
|
|
||||||
validate_net $net, 1;
|
validate_net $net, 1;
|
||||||
"-s ! $net ";
|
"-s ! $net ";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user