summaryrefslogtreecommitdiffstats
path: root/web/attachments/199141-is_hostname.diff
blob: 8d6e498cee467efe92af717e74edaf07124c2e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: plugins-scripts/utils.pm.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/utils.pm.in,v
retrieving revision 1.9
diff -u -r1.9 utils.pm.in
--- plugins-scripts/utils.pm.in	19 Oct 2006 18:44:53 -0000	1.9
+++ plugins-scripts/utils.pm.in	20 Oct 2006 15:57:37 -0000
@@ -76,7 +76,7 @@
 
 sub is_hostname {
 	my $host1 = shift;
-	if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) {
+	if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/) {
 		return 1;
 	}else{
 		return 0;