Allow non-experts to use the user bits in the fw mark

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-09-07 11:29:24 -07:00
parent 17d1caf8c5
commit 4b14924b99
2 changed files with 5 additions and 1 deletions

View File

@ -4855,7 +4855,7 @@ sub validate_mark( $ ) {
sub verify_small_mark( $ ) {
my $val = validate_mark ( (my $mark) = $_[0] );
fatal_error "Mark value ($mark) too large" if numeric_value( $mark ) > $globals{TC_MAX};
fatal_error "Mark value ($mark) too large" if numeric_value( $mark ) > $globals{SMALL_MASK};
$val;
}

View File

@ -5853,6 +5853,10 @@ sub get_configuration( $$$$ ) {
$globals{USER_MASK} = $globals{USER_BITS} = 0;
}
$val = $config{PROVIDER_OFFSET};
$globals{SMALL_MASK} = $val ? make_mask( $val ) : $globals{TC_MASK};
if ( supplied ( $val = $config{ZONE2ZONE} ) ) {
fatal_error "Invalid ZONE2ZONE value ( $val )" unless $val =~ /^[2-]$/;
} else {