mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-04 08:55:51 +02:00
Remove level of indirection for the 'super' property
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
fecd091078
commit
e3f2c49c7e
@ -4812,10 +4812,10 @@ sub match_ipsec_in( $$ ) {
|
|||||||
my ( $zone , $hostref ) = @_;
|
my ( $zone , $hostref ) = @_;
|
||||||
my @match;
|
my @match;
|
||||||
my $zoneref = find_zone( $zone );
|
my $zoneref = find_zone( $zone );
|
||||||
my $optionsref = $zoneref->{options};
|
|
||||||
|
|
||||||
unless ( $optionsref->{super} || $zoneref->{type} == VSERVER ) {
|
unless ( $zoneref->{super} || $zoneref->{type} == VSERVER ) {
|
||||||
my $match = '--dir in --pol ';
|
my $match = '--dir in --pol ';
|
||||||
|
my $optionsref = $zoneref->{options};
|
||||||
|
|
||||||
if ( $zoneref->{type} & IPSEC ) {
|
if ( $zoneref->{type} & IPSEC ) {
|
||||||
$match .= "ipsec $optionsref->{in_out}{ipsec}$optionsref->{in}{ipsec}";
|
$match .= "ipsec $optionsref->{in_out}{ipsec}$optionsref->{in}{ipsec}";
|
||||||
|
@ -116,8 +116,8 @@ use constant { IN_OUT => 1,
|
|||||||
#
|
#
|
||||||
# %zones{<zone1> => {type => <zone type> FIREWALL, IP, IPSEC, BPORT;
|
# %zones{<zone1> => {type => <zone type> FIREWALL, IP, IPSEC, BPORT;
|
||||||
# complex => 0|1
|
# complex => 0|1
|
||||||
# options => { super => 0|1
|
# super => 0|1
|
||||||
# in_out => < policy match string >
|
# options => { in_out => < policy match string >
|
||||||
# in => < policy match string >
|
# in => < policy match string >
|
||||||
# out => < policy match string >
|
# out => < policy match string >
|
||||||
# }
|
# }
|
||||||
@ -410,8 +410,8 @@ sub set_super( $ ); #required for recursion
|
|||||||
sub set_super( $ ) {
|
sub set_super( $ ) {
|
||||||
my $zoneref = shift;
|
my $zoneref = shift;
|
||||||
|
|
||||||
unless ( $zoneref->{options}{super} ) {
|
unless ( $zoneref->{super} ) {
|
||||||
$zoneref->{options}{super} = 1;
|
$zoneref->{super} = 1;
|
||||||
set_super( $zones{$_} ) for @{$zoneref->{parents}};
|
set_super( $zones{$_} ) for @{$zoneref->{parents}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,9 +489,9 @@ sub process_zone( \$ ) {
|
|||||||
options => { in_out => parse_zone_option_list( $options , $type, $complex , IN_OUT ) ,
|
options => { in_out => parse_zone_option_list( $options , $type, $complex , IN_OUT ) ,
|
||||||
in => parse_zone_option_list( $in_options , $type , $complex , IN ) ,
|
in => parse_zone_option_list( $in_options , $type , $complex , IN ) ,
|
||||||
out => parse_zone_option_list( $out_options , $type , $complex , OUT ) ,
|
out => parse_zone_option_list( $out_options , $type , $complex , OUT ) ,
|
||||||
super => 0 ,
|
|
||||||
} ,
|
} ,
|
||||||
complex => ( $type & IPSEC || $complex ) ,
|
super => 0 ,
|
||||||
|
complex => ( $type & IPSEC || $complex ) ,
|
||||||
interfaces => {} ,
|
interfaces => {} ,
|
||||||
children => [] ,
|
children => [] ,
|
||||||
hosts => {}
|
hosts => {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user