forked from extern/shorewall_code
Fix TC_ENABLED=Shared
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
551f93762d
commit
76fc55d750
@ -1456,6 +1456,8 @@ sub process_traffic_shaping() {
|
|||||||
|
|
||||||
$device = physical_name $device;
|
$device = physical_name $device;
|
||||||
|
|
||||||
|
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
||||||
|
|
||||||
my $dev = chain_base( $device );
|
my $dev = chain_base( $device );
|
||||||
|
|
||||||
emit( '',
|
emit( '',
|
||||||
@ -1466,8 +1468,6 @@ sub process_traffic_shaping() {
|
|||||||
|
|
||||||
push_indent;
|
push_indent;
|
||||||
|
|
||||||
unless ( $config{TC_ENABLED} eq 'Shared' ) {
|
|
||||||
|
|
||||||
emit "if interface_is_up $device; then";
|
emit "if interface_is_up $device; then";
|
||||||
|
|
||||||
push_indent;
|
push_indent;
|
||||||
@ -1589,7 +1589,6 @@ sub process_traffic_shaping() {
|
|||||||
emit '';
|
emit '';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
emit '';
|
emit '';
|
||||||
|
|
||||||
@ -1609,6 +1608,7 @@ sub process_traffic_shaping() {
|
|||||||
pop_indent;
|
pop_indent;
|
||||||
emit "}\n";
|
emit "}\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1625,7 +1625,9 @@ sub process_tc() {
|
|||||||
# it can call the appropriate 'setup_x_tc" function when the device is
|
# it can call the appropriate 'setup_x_tc" function when the device is
|
||||||
# enabled.
|
# enabled.
|
||||||
|
|
||||||
\%tcdevices;
|
my %empty;
|
||||||
|
|
||||||
|
$config{TC_ENABLED} eq 'Shared' ? \%empty : \%tcdevices;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1640,7 +1642,6 @@ sub setup_traffic_shaping() {
|
|||||||
|
|
||||||
emit "setup_${dev}_tc";
|
emit "setup_${dev}_tc";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1756,7 +1757,7 @@ sub setup_tc() {
|
|||||||
append_file $globals{TC_SCRIPT};
|
append_file $globals{TC_SCRIPT};
|
||||||
} else {
|
} else {
|
||||||
process_tcpri if $config{TC_ENABLED} eq 'Simple';
|
process_tcpri if $config{TC_ENABLED} eq 'Simple';
|
||||||
setup_traffic_shaping;
|
setup_traffic_shaping unless $config{TC_ENABLED} eq 'Shared';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $config{TC_ENABLED} ) {
|
if ( $config{TC_ENABLED} ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user