forked from extern/shorewall_code
Fix mark testing
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6171 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
ecc6c0bb5d
commit
278ab3bc8d
@ -886,11 +886,11 @@ sub do_test ( $$ )
|
||||
return '' unless $testval and $testval ne '-';
|
||||
|
||||
my $invert = $testval =~ s/^!// ? '! ' : '';
|
||||
my $match = $testval =~ s/:C$// ? '-m connmark ' : '-m mark ';
|
||||
my $match = $testval =~ s/:C$// ? "-m connmark ${invert}--mark" : "-m mark ${invert}--mark";
|
||||
|
||||
$testval .= '/0xFF' unless ( $testval =~ '/' );
|
||||
|
||||
"${invert}$match $testval ";
|
||||
"$match $testval ";
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -176,8 +176,6 @@ sub setup_providers() {
|
||||
fatal_error 'A non-empty COPY column requires that a routing table be specified in the DUPLICATE column' if $copy ne '-';
|
||||
}
|
||||
|
||||
$gateway = '-' unless $gateway;
|
||||
|
||||
if ( $gateway eq 'detect' ) {
|
||||
emitj ( "gateway=\$(detect_gateway $interface)\n",
|
||||
'if [ -n "$gateway" ]; then',
|
||||
@ -194,8 +192,6 @@ sub setup_providers() {
|
||||
emit "run_ip route add default dev $interface table $number";
|
||||
}
|
||||
|
||||
$mark = '-' unless $mark;
|
||||
|
||||
my $val = 0;
|
||||
|
||||
if ( $mark ne '-' ) {
|
||||
|
@ -176,7 +176,11 @@ sub process_tc_rule( $$$$$$$$$$ ) {
|
||||
$target = "$tccmd->{target} ";
|
||||
my $marktype = $tccmd->{mark};
|
||||
|
||||
$mark =~ s/^[!&]//;
|
||||
if ( $marktype == NOMARK ) {
|
||||
$mark = ''
|
||||
} else {
|
||||
$mark =~ s/^[|&]//;
|
||||
}
|
||||
|
||||
if ( $rest ) {
|
||||
fatal_error "Invalid MARK ($original_mark)" if $marktype == NOMARK;
|
||||
|
Loading…
Reference in New Issue
Block a user