forked from extern/shorewall_code
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;
|
validate_tc_class while read_a_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
|
||||||
for my $device ( @tcdevices ) {
|
for my $device ( @tcdevices ) {
|
||||||
my $devref = $tcdevices{$device};
|
my $devref = $tcdevices{$device};
|
||||||
my $defmark = in_hexp ( $devref->{default} || 0 );
|
my $defmark = in_hexp ( $devref->{default} || 0 );
|
||||||
@ -1342,6 +1341,8 @@ sub setup_traffic_shaping() {
|
|||||||
|
|
||||||
my $dev = chain_base( $device );
|
my $dev = chain_base( $device );
|
||||||
|
|
||||||
|
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||||
|
|
||||||
emit "if interface_is_up $device; then";
|
emit "if interface_is_up $device; then";
|
||||||
|
|
||||||
push_indent;
|
push_indent;
|
||||||
@ -1417,6 +1418,7 @@ sub setup_traffic_shaping() {
|
|||||||
pop_indent;
|
pop_indent;
|
||||||
emit "fi\n";
|
emit "fi\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $lastdevice = '';
|
my $lastdevice = '';
|
||||||
|
|
||||||
@ -1447,6 +1449,7 @@ sub setup_traffic_shaping() {
|
|||||||
my $priority = $tcref->{priority} << 8;
|
my $priority = $tcref->{priority} << 8;
|
||||||
my $parent = in_hexp $tcref->{parent};
|
my $parent = in_hexp $tcref->{parent};
|
||||||
|
|
||||||
|
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||||
if ( $lastdevice ne $device ) {
|
if ( $lastdevice ne $device ) {
|
||||||
if ( $lastdevice ) {
|
if ( $lastdevice ) {
|
||||||
pop_indent;
|
pop_indent;
|
||||||
@ -1497,15 +1500,15 @@ sub setup_traffic_shaping() {
|
|||||||
|
|
||||||
save_progress_message_short qq(" TC Class $classid defined.");
|
save_progress_message_short qq(" TC Class $classid defined.");
|
||||||
emit '';
|
emit '';
|
||||||
}
|
|
||||||
|
|
||||||
if ( $lastdevice ) {
|
if ( $lastdevice ) {
|
||||||
pop_indent;
|
pop_indent;
|
||||||
emit "fi\n";
|
emit "fi\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
process_tcfilters;
|
process_tcfilters;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user