mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
Correct handling of default chain when a mark range is specified.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
42dd8dfee9
commit
7e6fc3229d
@ -215,12 +215,12 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) {
|
||||
our $matches = '';
|
||||
our $params = '';
|
||||
our $done = 0;
|
||||
my $default_chain = 0;
|
||||
our $default_chain = 0;
|
||||
our $restriction = 0;
|
||||
our $exceptionrule = '';
|
||||
my $device = '';
|
||||
our $cmd;
|
||||
my $designator;
|
||||
our $designator;
|
||||
my $fw = firewall_zone;
|
||||
|
||||
sub handle_mark_param( $ ) {
|
||||
@ -253,6 +253,9 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) {
|
||||
|
||||
my $marks = ( ( $mark2val - $markval ) >> $shift ) + 1;
|
||||
|
||||
$chain ||= $designator;
|
||||
$chain ||= $default_chain;
|
||||
|
||||
my $chainref = ensure_chain( 'mangle', $chain = $chainnames{$chain} );
|
||||
|
||||
for ( my $packet = 0; $packet < $marks; $packet++, $markval += $increment ) {
|
||||
@ -367,9 +370,8 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) {
|
||||
minparams => 1,
|
||||
maxparams => 1,
|
||||
function => sub () {
|
||||
$chain = $designator || $default_chain;
|
||||
$target = 'CONNMARK';
|
||||
handle_mark_param('--set-mark');
|
||||
handle_mark_param('--set-mark' );
|
||||
},
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user