Finish SAME fix

This commit is contained in:
Tom Eastep 2010-09-12 11:22:35 -07:00
parent 113fcdde69
commit 825d249bf4

View File

@ -261,7 +261,7 @@ sub process_tc_rule( ) {
require_capability ('CONNMARK' , "SAVE/RESTORE Rules", '' ) if $tccmd->{connmark}; require_capability ('CONNMARK' , "SAVE/RESTORE Rules", '' ) if $tccmd->{connmark};
$target = "$tccmd->{target} "; $target = $tccmd->{target};
my $marktype = $tccmd->{mark}; my $marktype = $tccmd->{mark};
if ( $marktype == NOMARK ) { if ( $marktype == NOMARK ) {
@ -270,7 +270,7 @@ sub process_tc_rule( ) {
$mark =~ s/^[|&]//; $mark =~ s/^[|&]//;
} }
if ( $target eq 'sticky ' ) { if ( $target eq 'sticky' ) {
if ( $chain eq 'tcout' ) { if ( $chain eq 'tcout' ) {
$target = 'sticko'; $target = 'sticko';
} else { } else {
@ -278,9 +278,11 @@ sub process_tc_rule( ) {
} }
$restriction = DESTIFAC_DISALLOW; $restriction = DESTIFAC_DISALLOW;
ensure_mangle_chain( $target );
$sticky++; $sticky++;
} elsif ( $target eq 'IPMARK ' ) { } elsif ( $target eq 'IPMARK' ) {
my ( $srcdst, $mask1, $mask2, $shift ) = ('src', 255, 0, 0 ); my ( $srcdst, $mask1, $mask2, $shift ) = ('src', 255, 0, 0 );
require_capability 'IPMARK_TARGET', 'IPMARK', 's'; require_capability 'IPMARK_TARGET', 'IPMARK', 's';
@ -317,7 +319,7 @@ sub process_tc_rule( ) {
} }
$target = "IPMARK --addr $srcdst --and-mask $mask1 --or-mask $mask2 --shift $shift"; $target = "IPMARK --addr $srcdst --and-mask $mask1 --or-mask $mask2 --shift $shift";
} elsif ( $target eq 'TPROXY ' ) { } elsif ( $target eq 'TPROXY' ) {
require_capability( 'TPROXY_TARGET', 'Use of TPROXY', 's'); require_capability( 'TPROXY_TARGET', 'Use of TPROXY', 's');
fatal_error "Invalid TPROXY specification( $cmd/$rest )" if $rest; fatal_error "Invalid TPROXY specification( $cmd/$rest )" if $rest;
@ -340,7 +342,7 @@ sub process_tc_rule( ) {
$port = 0; $port = 0;
} }
$target .= "--on-port $port"; $target .= " --on-port $port";
if ( defined $ip && $ip ne '' ) { if ( defined $ip && $ip ne '' ) {
validate_address $ip, 1; validate_address $ip, 1;