mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Order rules in iptables-restore input differently
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5603 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
04f13cf86b
commit
d650bc1df9
@ -1235,6 +1235,8 @@ sub insertnatjump( $$$$ ) {
|
||||
}
|
||||
}
|
||||
|
||||
my @builtins = qw(PREROUTING INPUT FORWARD OUTPUT POSTROUTING);
|
||||
|
||||
sub create_netfilter_load() {
|
||||
emit 'setup_netfilter()';
|
||||
emit '{';
|
||||
@ -1242,16 +1244,23 @@ sub create_netfilter_load() {
|
||||
|
||||
for my $table qw/raw nat mangle filter/ {
|
||||
emit "*$table";
|
||||
|
||||
my @chains;
|
||||
|
||||
for my $chain ( @builtins ) {
|
||||
my $chainref = $chain_table{$table}{$chain};
|
||||
if ( $chainref ) {
|
||||
emit ":$chain $chainref->{policy} [0:0]";
|
||||
push @chains, $chainref;
|
||||
}
|
||||
}
|
||||
|
||||
for my $chain ( grep $chain_table{$table}{$_}->{referenced} , ( sort keys %{$chain_table{$table}} ) ) {
|
||||
my $chainref = $chain_table{$table}{$chain};
|
||||
if ( $chainref->{builtin} ) {
|
||||
emit ":$chainref->{name} $chainref->{policy} [0:0]";
|
||||
} else {
|
||||
unless ( $chainref->{builtin} ) {
|
||||
emit ":$chainref->{name} - [0:0]";
|
||||
push @chains, $chainref;
|
||||
}
|
||||
|
||||
push @chains, $chainref;
|
||||
}
|
||||
|
||||
for my $chainref ( @chains ) {
|
||||
|
Loading…
Reference in New Issue
Block a user