INN commit: trunk/scripts (inncheck.in)
INN Commit
rra at isc.org
Thu Jul 7 08:23:30 UTC 2011
Date: Thursday, July 7, 2011 @ 01:23:30
Author: iulius
Revision: 9226
inncheck: check for require_ssl and CIDR notations
inncheck was looking for require-ssl instead of require_ssl; and it wasn't
accepting IPv6 addresses in CIDR notation at all.
Patch from Florian Schlichting.
Modified:
trunk/scripts/inncheck.in
-------------+
inncheck.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Modified: inncheck.in
===================================================================
--- inncheck.in 2011-07-06 21:55:44 UTC (rev 9225)
+++ inncheck.in 2011-07-07 08:23:30 UTC (rev 9226)
@@ -166,9 +166,10 @@
my $ipv4_cidr = "$ip(?:$dot$ip){0,3}\\/[1-3]?\\d";
my $ipv4_wildmat = '[\d\[\]\*]+(?:\.[\d\[\]\*]+){0,3}';
my $ipv6 = '[\da-f:.]+'; # e.g. ::ffff:192.168.0.10
+my $ipv6_cidr = '[\da-f:.]+(?:\\/1?\d?\d)?'; # matches $ipv6 as well
my $hostname = '[\w-]+|[\w.-]+\.[a-zA-Z]{2,}'; # hostname, FQDN
my $hostnameRE = "(?:$hostname|$ipv4|$ipv6)";
-my $hostblockRE = '(?:(?:[-\w\[\]\*\?]+\.)?'."(?:$hostname)|$ipv4_wildmat|$ipv4_cidr|$ipv6)"; # Assumption: wildmat chars only in leftmost subdomain part
+my $hostblockRE = '(?:(?:[-\w\[\]\*\?]+\.)?'."(?:$hostname)|$ipv4_wildmat|$ipv4_cidr|$ipv6_cidr)"; # Assumption: wildmat chars only in leftmost subdomain part
my %type_regex = (
'boolean' => '^(?:true|false)$', # innfeed.conf doesn't allow other
'floating-point number' => '^\d+\.\d+$', # no exponents
@@ -915,7 +916,7 @@
'default' => 'string',
'default-domain'=> 'string',
'key' => 'string',
- 'require-ssl' => 'boolean',
+ 'require_ssl' => 'boolean',
'perl_access' => 'path',
'python_access' => 'path',
'python_dynamic'=> 'path',
More information about the inn-committers
mailing list