mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-25 20:22:12 +02:00
Revert "Improve handling of mark ranges"
This reverts commit 62f480897e2476c3125c1c839a3e42a14f8d2596.
This commit is contained in:
parent
62f480897e
commit
807b9ca627
@ -231,12 +231,6 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
|
|||||||
my ( $option, $marktype ) = @_;
|
my ( $option, $marktype ) = @_;
|
||||||
my $and_or = $params =~ s/^([|&])// ? $1 : '';
|
my $and_or = $params =~ s/^([|&])// ? $1 : '';
|
||||||
|
|
||||||
if ( $option ) {
|
|
||||||
$target = join( ' ', $target, $option );
|
|
||||||
} else {
|
|
||||||
$target = join( ' ', $target, $and_or eq '|' ? '--or-mark' : $and_or ? '--and-mark' : '--set-mark' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $params =~ /-/ ) {
|
if ( $params =~ /-/ ) {
|
||||||
#
|
#
|
||||||
# A Mark Range
|
# A Mark Range
|
||||||
@ -266,6 +260,8 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
|
|||||||
$chain ||= $designator;
|
$chain ||= $designator;
|
||||||
$chain ||= $default_chain;
|
$chain ||= $default_chain;
|
||||||
|
|
||||||
|
$option = '--set-mark';
|
||||||
|
|
||||||
my $chainref = ensure_chain( 'mangle', $chain = $chainnames{$chain} );
|
my $chainref = ensure_chain( 'mangle', $chain = $chainnames{$chain} );
|
||||||
|
|
||||||
for ( my $packet = 0; $packet < $marks; $packet++, $markval += $increment ) {
|
for ( my $packet = 0; $packet < $marks; $packet++, $markval += $increment ) {
|
||||||
@ -290,7 +286,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
|
|||||||
$source ,
|
$source ,
|
||||||
$dest ,
|
$dest ,
|
||||||
'' ,
|
'' ,
|
||||||
join( ' ', $target, $option , join( '/', in_hex( $markval ) , $mask ) ) ,
|
"$target $option " . join( '/', in_hex( $markval ) , $mask ) ,
|
||||||
'',
|
'',
|
||||||
$target ,
|
$target ,
|
||||||
$exceptionrule );
|
$exceptionrule );
|
||||||
@ -321,6 +317,12 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $option ) {
|
||||||
|
$target = join( ' ', $target, $option );
|
||||||
|
} else {
|
||||||
|
$target = join( ' ', $target, $and_or eq '|' ? '--or-mark' : $and_or ? '--and-mark' : '--set-mark' );
|
||||||
|
}
|
||||||
|
|
||||||
( $mark, my $mask ) = split '/', $mark;
|
( $mark, my $mask ) = split '/', $mark;
|
||||||
|
|
||||||
if ( supplied $mask ) {
|
if ( supplied $mask ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user