Code

Allow single characters in fqdn (Dave Alden)
authorTon Voon <tonvoon@users.sourceforge.net>
Tue, 12 Dec 2006 08:56:01 +0000 (08:56 +0000)
committerTon Voon <tonvoon@users.sourceforge.net>
Tue, 12 Dec 2006 08:56:01 +0000 (08:56 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1548 f882894a-f735-0410-b71e-b25c423dba1c

plugins-scripts/utils.pm.in

index 8449b544468403bc8191a85df701a5eed61a8e57..d68f30905f8c06782846ce32ddd03a037dc1cc06 100644 (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;