mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 03:31:24 +02:00
Fix 'Shared' traffic shaping
This commit is contained in:
parent
997a697a65
commit
0e5dc41d31
@ -1331,7 +1331,6 @@ sub setup_traffic_shaping() {
|
||||
validate_tc_class while read_a_line;
|
||||
}
|
||||
|
||||
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||
for my $device ( @tcdevices ) {
|
||||
my $devref = $tcdevices{$device};
|
||||
my $defmark = in_hexp ( $devref->{default} || 0 );
|
||||
@ -1342,6 +1341,8 @@ sub setup_traffic_shaping() {
|
||||
|
||||
my $dev = chain_base( $device );
|
||||
|
||||
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||
|
||||
emit "if interface_is_up $device; then";
|
||||
|
||||
push_indent;
|
||||
@ -1417,6 +1418,7 @@ sub setup_traffic_shaping() {
|
||||
pop_indent;
|
||||
emit "fi\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $lastdevice = '';
|
||||
|
||||
@ -1447,6 +1449,7 @@ sub setup_traffic_shaping() {
|
||||
my $priority = $tcref->{priority} << 8;
|
||||
my $parent = in_hexp $tcref->{parent};
|
||||
|
||||
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||
if ( $lastdevice ne $device ) {
|
||||
if ( $lastdevice ) {
|
||||
pop_indent;
|
||||
@ -1497,15 +1500,15 @@ sub setup_traffic_shaping() {
|
||||
|
||||
save_progress_message_short qq(" TC Class $classid defined.");
|
||||
emit '';
|
||||
}
|
||||
|
||||
if ( $lastdevice ) {
|
||||
pop_indent;
|
||||
emit "fi\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process_tcfilters;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user