Exit POSTROUTING early if a mark is restored

This commit is contained in:
Tom Eastep 2011-04-04 08:19:58 -07:00
parent 10cc400cfd
commit 3b0da84b8d

View File

@ -1339,6 +1339,7 @@ sub setup_simple_traffic_shaping() {
if ( $ipp2p ) {
insert_rule1 $mangle_table->{tcpost} , 0 , '-m mark --mark 0/' . in_hex( $globals{TC_MASK} ) . ' -j CONNMARK --restore-mark --ctmask ' . in_hex( $globals{TC_MASK} );
insert_rule1 $mangle_table->{tcpost} , 1 , '-m mark ! --mark 0/' . in_hex( $globals{TC_MASK} ) . ' -j RETURN';
add_rule $mangle_table->{tcpost} , '-m mark ! --mark 0/' . in_hex( $globals{TC_MASK} ) . ' -j CONNMARK --save-mark --ctmask ' . in_hex( $globals{TC_MASK} );
}
}