From a8f6d2f43848f04448805d7f6bdfaf3287a4a44f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 1 Jul 2014 06:52:58 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Apply=20Thibaut=20Ch=C3=A8ze's=20patch=20fo?= =?UTF-8?q?r=20DSCP=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index 5662ecb38..2bdfc0b84 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -423,7 +423,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) { function => sub () { require_capability 'DSCP_TARGET', 'The DSCP action', 's'; my $dscp = numeric_value( $params ); - $dscp = $dscpmap{$1} unless defined $dscp; + $dscp = $dscpmap{$params} unless defined $dscp; fatal_error( "Invalid DSCP ($params)" ) unless defined $dscp && $dscp <= 0x38 && ! ( $dscp & 1 ); $target = 'DSCP --set-dscp ' . in_hex( $dscp ); }, From 1a7cc9b86d53ae49adc08ad2b1a54a5705d2cc83 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 1 Jul 2014 06:54:54 -0700 Subject: [PATCH 2/2] Allow SAVE/RESTORE rules in the OUTPUT chain Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index 2bdfc0b84..5ef655206 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -562,7 +562,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) { RESTORE => { defaultchain => 0, - allowedchains => PREROUTING | FORWARD | POSTROUTING, + allowedchains => PREROUTING | FORWARD | OUTPUT | POSTROUTING, minparams => 0, maxparams => 1, function => sub () { @@ -591,7 +591,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$ ) { SAVE => { defaultchain => 0, - allowedchains => PREROUTING | FORWARD | POSTROUTING, + allowedchains => PREROUTING | FORWARD | OUTPUT | POSTROUTING, minparams => 0, maxparams => 1, function => sub () {