When TC_ENABLED=No, require providers to process tcrules

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-07-07 08:02:57 -07:00
parent aa652fda1b
commit 83a8c7eda3
2 changed files with 9 additions and 1 deletions

View File

@ -41,6 +41,7 @@ our @EXPORT = qw( process_providers
handle_optional_interfaces handle_optional_interfaces
compile_updown compile_updown
setup_load_distribution setup_load_distribution
have_providers
); );
our @EXPORT_OK = qw( initialize lookup_provider ); our @EXPORT_OK = qw( initialize lookup_provider );
our $VERSION = '4.4_24'; our $VERSION = '4.4_24';
@ -1321,6 +1322,10 @@ EOF
} }
sub have_providers() {
return our $providers;
}
sub setup_providers() { sub setup_providers() {
our $providers; our $providers;

View File

@ -2160,7 +2160,7 @@ sub setup_tc() {
setup_traffic_shaping if @tcdevices && $config{TC_ENABLED} ne 'Shared'; setup_traffic_shaping if @tcdevices && $config{TC_ENABLED} ne 'Shared';
} }
if ( $config{MANGLE_ENABLED} ) { if ( $config{TC_ENABLED} || have_providers ) {
our @tccmd = ( { match => sub ( $ ) { $_[0] eq 'SAVE' } , our @tccmd = ( { match => sub ( $ ) { $_[0] eq 'SAVE' } ,
target => 'CONNMARK --save-mark --mask' , target => 'CONNMARK --save-mark --mask' ,
mark => $config{TC_EXPERT} ? HIGHMARK : SMALLMARK, mark => $config{TC_EXPERT} ? HIGHMARK : SMALLMARK,
@ -2254,6 +2254,9 @@ sub setup_tc() {
clear_comment; clear_comment;
} }
}
if ( $config{MANGLE_ENABLED} ) {
if ( my $fn = open_file 'secmarks' ) { if ( my $fn = open_file 'secmarks' ) {