forked from extern/shorewall_code
Tighten editing of LENGTH column(s)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
05f025e422
commit
c112f20e17
@ -4156,8 +4156,17 @@ sub do_helper( $ ) {
|
|||||||
sub do_length( $ ) {
|
sub do_length( $ ) {
|
||||||
my $length = $_[0];
|
my $length = $_[0];
|
||||||
|
|
||||||
|
return '' if $length eq '-';
|
||||||
|
|
||||||
require_capability( 'LENGTH_MATCH' , 'A Non-empty LENGTH' , 's' );
|
require_capability( 'LENGTH_MATCH' , 'A Non-empty LENGTH' , 's' );
|
||||||
$length ne '-' ? "-m length --length $length " : '';
|
|
||||||
|
fatal_error "Invalid LENGTH ($length)" unless $length =~/^(\d+)(:(\d+))$/;
|
||||||
|
|
||||||
|
if ( supplied $3 ) {
|
||||||
|
fatal_error "First length must be < second length" unless $1 < $2;
|
||||||
|
}
|
||||||
|
|
||||||
|
"-m length --length $length ";
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user