From 31a01cdcc4d6bf721ccbbe6f87f503289834a5bb Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 24 Jul 2007 16:54:13 +0000 Subject: [PATCH] Fix problem with TC_ENABLED=No git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6948 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/releasenotes.txt | 7 +++++++ Shorewall-perl/Shorewall/Chains.pm | 2 +- Shorewall-perl/Shorewall/Tc.pm | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index fcea9f5d2..42eb0a94f 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -48,6 +48,13 @@ Problems corrected in 4.0.1. 'ipsec4' and the 'ipsec' option removed from the hosts file entry, the configuration worked properly. +5) If a CLASSID was specified in a tcrule and TC_ENABLED=No, then + Shorewall-perl produced the following: + + Compiling... + Use of uninitialized value in string ne at /usr/share/shorewall-perl/Shorewall/Tc.pm line 285, <$currentfile> line 18. + ERROR: Class Id 1:110 is not associated with device eth0 : /etc/shorewall/tcrules (line 18) + Other changes in Shorewall 4.0.1. 1) A new EXPAND_POLICIES option is added to shorewall.conf. The diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 0ef0e17f5..31e8feda2 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -171,7 +171,7 @@ our $filter_table; # # It is a layer violation to keep information about the rules file sections in this module but in Shorewall, the rules file # and the filter table are very closely tied. By keeping the information here, we avoid making several other modules dependent -# in Shorewall::Rules. +# on Shorewall::Rules. # our %sections; our $section; diff --git a/Shorewall-perl/Shorewall/Tc.pm b/Shorewall-perl/Shorewall/Tc.pm index aafd2844f..06a98b194 100644 --- a/Shorewall-perl/Shorewall/Tc.pm +++ b/Shorewall-perl/Shorewall/Tc.pm @@ -282,7 +282,7 @@ sub process_tc_rule( $$$$$$$$$$ ) { # # expand_rule() returns destination device if any # - fatal_error "Class Id $original_mark is not associated with device $result" if $classid && $device ne $result; + fatal_error "Class Id $original_mark is not associated with device $result" if $config{TC_ENABLED} eq 'internal' && $classid && $device ne $result; } progress_message " TC Rule \"$currentline\" $done";