mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-21 12:11:05 +01:00
More wildcard optimization
This commit is contained in:
parent
7061997324
commit
708e7672a3
@ -173,6 +173,7 @@ our %mapbase;
|
|||||||
our $family;
|
our $family;
|
||||||
our $have_ipsec;
|
our $have_ipsec;
|
||||||
our $baseseq;
|
our $baseseq;
|
||||||
|
our $minroot;
|
||||||
|
|
||||||
use constant { FIREWALL => 1,
|
use constant { FIREWALL => 1,
|
||||||
IP => 2,
|
IP => 2,
|
||||||
@ -230,6 +231,7 @@ sub initialize( $ ) {
|
|||||||
%basemap = ();
|
%basemap = ();
|
||||||
%mapbase = ();
|
%mapbase = ();
|
||||||
$baseseq = 0;
|
$baseseq = 0;
|
||||||
|
$minroot = 0;
|
||||||
|
|
||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
%validinterfaceoptions = (arp_filter => BINARY_IF_OPTION,
|
%validinterfaceoptions = (arp_filter => BINARY_IF_OPTION,
|
||||||
@ -910,6 +912,13 @@ sub process_interface( $$ ) {
|
|||||||
$wildcard = 1;
|
$wildcard = 1;
|
||||||
$root = substr( $interface, 0, -1 );
|
$root = substr( $interface, 0, -1 );
|
||||||
$roots{$root} = $interface;
|
$roots{$root} = $interface;
|
||||||
|
my $len = length $root;
|
||||||
|
|
||||||
|
if ( $minroot ) {
|
||||||
|
$minroot = $len if $minroot > $len;
|
||||||
|
} else {
|
||||||
|
$minroot = $len;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$root = $interface;
|
$root = $interface;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user