forked from extern/shorewall_code
More cosmetic changes regarding zone exclusion lists
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9090 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
400443317f
commit
a1f5736d0d
@ -1637,7 +1637,6 @@ sub generate_matrix() {
|
|||||||
#
|
#
|
||||||
start_matrix;
|
start_matrix;
|
||||||
|
|
||||||
my $exclusion_seq = 1;
|
|
||||||
my %chain_exclusions;
|
my %chain_exclusions;
|
||||||
my %policy_exclusions;
|
my %policy_exclusions;
|
||||||
my @interfaces = ( all_interfaces );
|
my @interfaces = ( all_interfaces );
|
||||||
|
@ -372,6 +372,7 @@ sub zone_report()
|
|||||||
my $hostref = $zoneref->{hosts};
|
my $hostref = $zoneref->{hosts};
|
||||||
my $type = $zoneref->{type};
|
my $type = $zoneref->{type};
|
||||||
my $optionref = $zoneref->{options};
|
my $optionref = $zoneref->{options};
|
||||||
|
my $exclusions = $zoneref->{exclusions};
|
||||||
|
|
||||||
$type = $ipzone if $type eq 'ip';
|
$type = $ipzone if $type eq 'ip';
|
||||||
|
|
||||||
@ -402,6 +403,18 @@ sub zone_report()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $exclusions ) {
|
||||||
|
for ( @$exclusions ) {
|
||||||
|
if ( $family == F_IPV4 ) {
|
||||||
|
progress_message_nocompress " !$_";
|
||||||
|
} else {
|
||||||
|
my $host = $_;
|
||||||
|
$host =~ s/\|/:</;
|
||||||
|
progress_message_nocompress " !$host>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unless ( $printed ) {
|
unless ( $printed ) {
|
||||||
fatal_error "No bridge has been associated with zone $zone" if $type eq 'bport' && ! $zoneref->{bridge};
|
fatal_error "No bridge has been associated with zone $zone" if $type eq 'bport' && ! $zoneref->{bridge};
|
||||||
warning_message "*** $zone is an EMPTY ZONE ***" unless $type eq 'firewall';
|
warning_message "*** $zone is an EMPTY ZONE ***" unless $type eq 'firewall';
|
||||||
@ -462,8 +475,14 @@ sub dump_zone_contents()
|
|||||||
if ( @$exclusions ) {
|
if ( @$exclusions ) {
|
||||||
$entry .= ' exclude';
|
$entry .= ' exclude';
|
||||||
|
|
||||||
for my $host ( @$exclusions ) {
|
for ( @$exclusions ) {
|
||||||
$entry .= " $host";
|
if ( $family == F_IPV4 ) {
|
||||||
|
$entry .= " $_";
|
||||||
|
} else {
|
||||||
|
my $host = $_;
|
||||||
|
$host =~ s/\|/:</;
|
||||||
|
$entry .= " $host>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user