From a05b3afd7f38a25d7d86171d1ae3bcbeffbb5cf6 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 11 May 2012 07:42:44 -0700 Subject: [PATCH] Eliminate the 'tproxy' chain Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index e78b5d9fb..085315fb7 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -163,7 +163,7 @@ my @tcclasses; my %tcclasses; my %restrictions = ( tcpre => PREROUTE_RESTRICT , - tproxy => PREROUTE_RESTRICT , + PREROUTING => PREROUTE_RESTRICT , tcpost => POSTROUTE_RESTRICT , tcfor => NO_RESTRICT , tcin => INPUT_RESTRICT , @@ -315,7 +315,7 @@ sub process_tc_rule( ) { fatal_error "Invalid MARK ($originalmark)" unless $format == 2; fatal_error "Invalid DIVERT specification( $cmd/$rest )" if $rest; - $chain = 'tproxy'; + $chain = 'PREROUTING'; $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; - $chain = 'tproxy'; + $chain = 'PREROUTING'; $cmd =~ /TPROXY\((.+?)\)$/; @@ -1964,7 +1964,6 @@ sub setup_tc() { if ( $config{MANGLE_ENABLED} ) { ensure_mangle_chain 'tcpre'; ensure_mangle_chain 'tcout'; - ensure_mangle_chain 'tproxy'; if ( have_capability( 'MANGLE_FORWARD' ) ) { ensure_mangle_chain 'tcfor'; @@ -2103,8 +2102,6 @@ sub setup_tc() { clear_comment; } - - delete_jumps( $mangle_table->{PREROUTING}, $mangle_table->{tproxy} ) unless @{$mangle_table->{tproxy}{rules}}; } if ( $config{MANGLE_ENABLED} ) {