forked from extern/shorewall_code
Prevent duplicate 'filter' rules when combining two interface chains
into the same zone forwarding chain. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8a0dc9f0f6
commit
c6e9de65f1
@ -899,7 +899,19 @@ sub move_rules( $$ ) {
|
||||
|
||||
}
|
||||
|
||||
splice @{$rules}, 0, 0, @filtered2;
|
||||
#
|
||||
# Restore the filters originally in chain2 but drop duplicates of those from $chain1
|
||||
#
|
||||
FILTER:
|
||||
while ( @filtered2 ) {
|
||||
$filtered = pop @filtered2;
|
||||
|
||||
for ( $rule = 0; $rule < $filtered1; $rule++ ) {
|
||||
$filtered2--, next FILTER if ${$rules}[$rule] eq $filtered;
|
||||
}
|
||||
|
||||
unshift @{$rules}, $filtered;
|
||||
}
|
||||
|
||||
$chain2->{filtered} = $filtered1 + $filtered2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user