Don't allow interior brackets in an address range.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-02-25 17:26:17 -08:00
parent 7006c62892
commit 1d4f189b5f

View File

@ -277,8 +277,10 @@ sub process_one_masq1( $$$$$$$$$$ )
$addr = $1;
if ( $addr =~ /^(.+)]-\[(.+)$/ ) {
if ( $addr =~ /^(.+)-(.+)$/ ) {
fatal_error "Correct address range syntax is '[<addr1>-<addr2>]'" if $addr =~ /]-\[/;
validate_range( $1, $2 );
$addr =~ s/]-\[/-/;
} else {
validate_address $addr, 0;
}