forked from extern/shorewall_code
Don't require a MARK value on the default class.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
a87a981a2e
commit
bd959884cc
@ -855,7 +855,7 @@ sub validate_tc_device( ) {
|
|||||||
pfifo => $pfifo,
|
pfifo => $pfifo,
|
||||||
tablenumber => 1 ,
|
tablenumber => 1 ,
|
||||||
redirected => \@redirected,
|
redirected => \@redirected,
|
||||||
default => 0,
|
default => undef,
|
||||||
nextclass => 2,
|
nextclass => 2,
|
||||||
qdisc => $qdisc,
|
qdisc => $qdisc,
|
||||||
guarantee => 0,
|
guarantee => 0,
|
||||||
@ -998,6 +998,7 @@ sub validate_tc_class( ) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
|
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
|
||||||
|
$markval = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $parentclass != 1 ) {
|
if ( $parentclass != 1 ) {
|
||||||
@ -1114,9 +1115,11 @@ sub validate_tc_class( ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unless ( $devref->{classify} || $occurs > 1 ) {
|
unless ( $devref->{classify} || $occurs > 1 ) {
|
||||||
|
if ( $mark ne '-' ) {
|
||||||
fatal_error "Missing MARK" if $mark eq '-';
|
fatal_error "Missing MARK" if $mark eq '-';
|
||||||
warning_message "Class NUMBER ignored -- INTERFACE $device does not have the 'classify' option" if $devclass =~ /:/;
|
warning_message "Class NUMBER ignored -- INTERFACE $device does not have the 'classify' option" if $devclass =~ /:/;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$tcref->{flow} = $devref->{flow} unless $tcref->{flow};
|
$tcref->{flow} = $devref->{flow} unless $tcref->{flow};
|
||||||
$tcref->{pfifo} = $devref->{pfifo} unless $tcref->{flow} || $tcref->{pfifo};
|
$tcref->{pfifo} = $devref->{pfifo} unless $tcref->{flow} || $tcref->{pfifo};
|
||||||
@ -1596,7 +1599,7 @@ sub process_traffic_shaping() {
|
|||||||
my $devnum = in_hexp $devref->{number};
|
my $devnum = in_hexp $devref->{number};
|
||||||
my $r2q = int calculate_r2q $devref->{out_bandwidth};
|
my $r2q = int calculate_r2q $devref->{out_bandwidth};
|
||||||
|
|
||||||
fatal_error "No default class defined for device $devname" unless $devref->{default};
|
fatal_error "No default class defined for device $devname" unless defined $devref->{default};
|
||||||
|
|
||||||
my $device = physical_name $devname;
|
my $device = physical_name $devname;
|
||||||
|
|
||||||
@ -1708,7 +1711,7 @@ sub process_traffic_shaping() {
|
|||||||
#
|
#
|
||||||
# add filters
|
# add filters
|
||||||
#
|
#
|
||||||
unless ( $devref->{classify} ) {
|
unless ( $mark eq '-' ) {
|
||||||
emit "run_tc filter add dev $device protocol all parent $devicenumber:0 prio " . ( $priority | 20 ) . " handle $mark fw classid $classid" if $tcref->{occurs} == 1;
|
emit "run_tc filter add dev $device protocol all parent $devicenumber:0 prio " . ( $priority | 20 ) . " handle $mark fw classid $classid" if $tcref->{occurs} == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user