Just reset provider bits in FORWARD chain

This commit is contained in:
Tom Eastep 2010-07-05 09:46:24 -07:00
parent b445b4fdd9
commit f977631af9
2 changed files with 4 additions and 2 deletions

View File

@ -435,7 +435,7 @@ sub add_a_provider( ) {
}
if ( $mark ne '-' ) {
my $mask = have_capability 'FWMARK_RT_MASK' ? "/$globals{PROVIDER_MASK}" : '';
my $mask = have_capability 'FWMARK_RT_MASK' ? '/' . in_hex $globals{PROVIDER_MASK} : '';
emit ( "qt \$IP -$family rule del fwmark ${mark}${mask}" ) if $config{DELETE_THEN_ADD};

View File

@ -1385,7 +1385,9 @@ sub setup_tc() {
add_jump $mangle_table->{OUTPUT} , 'tcout', 0, $mark_part;
if ( have_capability( 'MANGLE_FORWARD' ) ) {
add_rule( $mangle_table->{FORWARD}, '-j MARK --set-mark 0' ) if $config{FORWARD_CLEAR_MARK};
my $mask = have_capability 'EXMARK' ? have_capability 'FWMARK_RT_MASK' ? '/' . in_hex $globals{PROVIDER_MASK} : '' : '';
add_rule( $mangle_table->{FORWARD}, "-j MARK --set-mark 0${mask}" ) if $config{FORWARD_CLEAR_MARK};
add_jump $mangle_table->{FORWARD} , 'tcfor', 0;
add_jump $mangle_table->{POSTROUTING} , 'tcpost', 0;
}