mirror of
https://gitlab.com/shorewall/code.git
synced 2025-03-07 19:11:51 +01:00
Correct handling of {+-}0 in the TTL and HL tcrule actions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e1309b06b1
commit
cf130a7e16
@ -394,11 +394,11 @@ sub process_tc_rule( ) {
|
||||
}
|
||||
}
|
||||
|
||||
$cmd =~ /^TTL\(([-+]?\d+)\)$/;
|
||||
$cmd =~ /^TTL\(([-+]?(\d+))\)$/;
|
||||
|
||||
my $param = $1;
|
||||
|
||||
fatal_error "Invalid TTL specification( $cmd )" unless $param && ( $param = abs $param ) < 256;
|
||||
fatal_error "Invalid TTL specification( $cmd )" unless $2 && ( $param = abs $param ) < 256;
|
||||
|
||||
if ( $1 =~ /^\+/ ) {
|
||||
$target .= " --ttl-inc $param";
|
||||
@ -422,11 +422,11 @@ sub process_tc_rule( ) {
|
||||
}
|
||||
}
|
||||
|
||||
$cmd =~ /^HL\(([-+]?\d+)\)$/;
|
||||
$cmd =~ /^HL\(([-+]?(\d+))\)$/;
|
||||
|
||||
my $param = $1;
|
||||
|
||||
fatal_error "Invalid HL specification( $cmd )" unless $param && ( $param = abs $param ) < 256;
|
||||
fatal_error "Invalid HL specification( $cmd )" unless $2 && ( $param = abs $param ) < 256;
|
||||
|
||||
if ( $1 =~ /^\+/ ) {
|
||||
$target .= " --hl-inc $param";
|
||||
|
Loading…
Reference in New Issue
Block a user