mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 04:11:22 +01:00
Eliminate the 'tproxy' chain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
9e743451f6
commit
a05b3afd7f
@ -163,7 +163,7 @@ my @tcclasses;
|
|||||||
my %tcclasses;
|
my %tcclasses;
|
||||||
|
|
||||||
my %restrictions = ( tcpre => PREROUTE_RESTRICT ,
|
my %restrictions = ( tcpre => PREROUTE_RESTRICT ,
|
||||||
tproxy => PREROUTE_RESTRICT ,
|
PREROUTING => PREROUTE_RESTRICT ,
|
||||||
tcpost => POSTROUTE_RESTRICT ,
|
tcpost => POSTROUTE_RESTRICT ,
|
||||||
tcfor => NO_RESTRICT ,
|
tcfor => NO_RESTRICT ,
|
||||||
tcin => INPUT_RESTRICT ,
|
tcin => INPUT_RESTRICT ,
|
||||||
@ -315,7 +315,7 @@ sub process_tc_rule( ) {
|
|||||||
fatal_error "Invalid MARK ($originalmark)" unless $format == 2;
|
fatal_error "Invalid MARK ($originalmark)" unless $format == 2;
|
||||||
fatal_error "Invalid DIVERT specification( $cmd/$rest )" if $rest;
|
fatal_error "Invalid DIVERT specification( $cmd/$rest )" if $rest;
|
||||||
|
|
||||||
$chain = 'tproxy';
|
$chain = 'PREROUTING';
|
||||||
|
|
||||||
$mark = in_hex( $globals{TPROXY_MARK} ) . '/' . in_hex( $globals{TPROXY_MARK} );
|
$mark = in_hex( $globals{TPROXY_MARK} ) . '/' . in_hex( $globals{TPROXY_MARK} );
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ sub process_tc_rule( ) {
|
|||||||
|
|
||||||
fatal_error "Invalid TPROXY specification( $cmd/$rest )" if $rest;
|
fatal_error "Invalid TPROXY specification( $cmd/$rest )" if $rest;
|
||||||
|
|
||||||
$chain = 'tproxy';
|
$chain = 'PREROUTING';
|
||||||
|
|
||||||
$cmd =~ /TPROXY\((.+?)\)$/;
|
$cmd =~ /TPROXY\((.+?)\)$/;
|
||||||
|
|
||||||
@ -1964,7 +1964,6 @@ sub setup_tc() {
|
|||||||
if ( $config{MANGLE_ENABLED} ) {
|
if ( $config{MANGLE_ENABLED} ) {
|
||||||
ensure_mangle_chain 'tcpre';
|
ensure_mangle_chain 'tcpre';
|
||||||
ensure_mangle_chain 'tcout';
|
ensure_mangle_chain 'tcout';
|
||||||
ensure_mangle_chain 'tproxy';
|
|
||||||
|
|
||||||
if ( have_capability( 'MANGLE_FORWARD' ) ) {
|
if ( have_capability( 'MANGLE_FORWARD' ) ) {
|
||||||
ensure_mangle_chain 'tcfor';
|
ensure_mangle_chain 'tcfor';
|
||||||
@ -2103,8 +2102,6 @@ sub setup_tc() {
|
|||||||
clear_comment;
|
clear_comment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_jumps( $mangle_table->{PREROUTING}, $mangle_table->{tproxy} ) unless @{$mangle_table->{tproxy}{rules}};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $config{MANGLE_ENABLED} ) {
|
if ( $config{MANGLE_ENABLED} ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user