Remove level of indirection for the 'super' property

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-13 12:23:33 -07:00
parent fecd091078
commit e3f2c49c7e
2 changed files with 8 additions and 8 deletions

View File

@ -4812,10 +4812,10 @@ sub match_ipsec_in( $$ ) {
my ( $zone , $hostref ) = @_;
my @match;
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 $optionsref = $zoneref->{options};
if ( $zoneref->{type} & IPSEC ) {
$match .= "ipsec $optionsref->{in_out}{ipsec}$optionsref->{in}{ipsec}";

View File

@ -116,8 +116,8 @@ use constant { IN_OUT => 1,
#
# %zones{<zone1> => {type => <zone type> FIREWALL, IP, IPSEC, BPORT;
# complex => 0|1
# options => { super => 0|1
# in_out => < policy match string >
# super => 0|1
# options => { in_out => < policy match string >
# in => < policy match string >
# out => < policy match string >
# }
@ -410,8 +410,8 @@ sub set_super( $ ); #required for recursion
sub set_super( $ ) {
my $zoneref = shift;
unless ( $zoneref->{options}{super} ) {
$zoneref->{options}{super} = 1;
unless ( $zoneref->{super} ) {
$zoneref->{super} = 1;
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 ) ,
in => parse_zone_option_list( $in_options , $type , $complex , IN ) ,
out => parse_zone_option_list( $out_options , $type , $complex , OUT ) ,
super => 0 ,
} ,
complex => ( $type & IPSEC || $complex ) ,
super => 0 ,
complex => ( $type & IPSEC || $complex ) ,
interfaces => {} ,
children => [] ,
hosts => {}