forked from extern/shorewall_code
Finish code re-org
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
92894a7482
commit
9d0bff62fa
Shorewall/Perl/Shorewall
File diff suppressed because it is too large
Load Diff
@ -39,11 +39,12 @@ use Shorewall::Proc;
|
||||
use Shorewall::Proxyarp;
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Raw;
|
||||
use Shorewall::Misc;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw( compiler );
|
||||
our @EXPORT_OK = qw( $export );
|
||||
our $VERSION = '4.4_12';
|
||||
our $VERSION = '4.4_16';
|
||||
|
||||
our $export;
|
||||
|
||||
@ -67,6 +68,7 @@ sub initialize_package_globals() {
|
||||
Shorewall::Rules::initialize($family);
|
||||
Shorewall::Proxyarp::initialize($family);
|
||||
Shorewall::IPAddrs::initialize($family);
|
||||
Shorewall::Misc::initialize($family);
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -873,6 +873,32 @@ sub setup_mac_lists( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Helper functions for generate_matrix()
|
||||
#-----------------------------------------
|
||||
#
|
||||
# Return the target for rules from $zone to $zone1.
|
||||
#
|
||||
sub rules_target( $$ ) {
|
||||
my ( $zone, $zone1 ) = @_;
|
||||
my $chain = rules_chain( ${zone}, ${zone1} );
|
||||
my $chainref = $filter_table->{$chain};
|
||||
|
||||
return $chain if $chainref && $chainref->{referenced};
|
||||
return 'ACCEPT' if $zone eq $zone1;
|
||||
|
||||
assert( $chainref );
|
||||
|
||||
if ( $chainref->{policy} ne 'CONTINUE' ) {
|
||||
my $policyref = $filter_table->{$chainref->{policychain}};
|
||||
assert( $policyref );
|
||||
return $policyref->{name} if $policyref ne $chainref;
|
||||
return $chainref->{policy} eq 'REJECT' ? 'reject' : $chainref->{policy};
|
||||
}
|
||||
|
||||
''; # CONTINUE policy
|
||||
}
|
||||
|
||||
#
|
||||
# Generate rules for one destination zone
|
||||
#
|
||||
|
1457
Shorewall/Perl/Shorewall/Rules.pm
Normal file
1457
Shorewall/Perl/Shorewall/Rules.pm
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user