forked from extern/shorewall_code
Fix several issues with IPv6 tcfilters
This commit is contained in:
parent
27a2b32e9e
commit
953c0b48de
@ -280,7 +280,7 @@ sub decompose_net( $ ) {
|
||||
my $net = $_[0];
|
||||
|
||||
( $net, my $vlsm ) = validate_net( $net , 0 );
|
||||
( encodeaddr( $net) , $vlsm );
|
||||
( ( $family == F_IPV4 ? encodeaddr( $net) : $net ) , $vlsm );
|
||||
|
||||
}
|
||||
|
||||
@ -587,6 +587,15 @@ sub validate_6net( $$ ) {
|
||||
fatal_error "Invalid Network address ($_[0])" if $_[0] =~ '/' || ! defined $net;
|
||||
validate_6address $net, $allow_name;
|
||||
}
|
||||
|
||||
if ( defined wantarray ) {
|
||||
assert ( ! $allow_name );
|
||||
if ( wantarray ) {
|
||||
( $net , $vlsm );
|
||||
} else {
|
||||
"$net/$vlsm";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -806,7 +806,8 @@ sub validate_tc_class( ) {
|
||||
#
|
||||
$parentref = $tcref->{$parentclass};
|
||||
fatal_error "Unknown Parent class ($parentclass)" unless $parentref && $parentref->{occurs} == 1;
|
||||
fatal_error "The parent class ($parentclass) specifies UMAX and/or DMAX; it cannot serve as a parent" if $parentref->{dmax};
|
||||
fatal_error "The class ($parentclass) specifies UMAX and/or DMAX; it cannot serve as a parent" if $parentref->{dmax};
|
||||
fatal_error "The class ($parentclass) specifies flow; it cannot serve as a parent" if $parentref->{flow};
|
||||
$parentref->{leaf} = 0;
|
||||
$ratemax = $parentref->{rate};
|
||||
$ratename = q(the parent class's RATE);
|
||||
@ -980,7 +981,7 @@ sub process_tc_filter() {
|
||||
|
||||
if ( $dest ne '-' ) {
|
||||
my ( $net , $mask ) = decompose_net( $dest );
|
||||
$rule .= "\\\n match $ip dst $net/$mask";
|
||||
$rule .= "\\\n match $ip32 dst $net/$mask";
|
||||
}
|
||||
|
||||
if ( $tos ne '-' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user