Allow single characters in fqdn (Dave Alden)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1548 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
Ton Voon 2006-12-12 08:56:01 +00:00
parent 8f253be7a4
commit fc6caed01c

View file

@ -60,7 +60,7 @@ sub is_hostname {
} else {
return 0;
}
} elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*\.?$/) {
} elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]*(\.[a-zA-Z0-9][-a-zA-Z0-9]*)*\.?$/) {
return 1;
} else {
return 0;