02635cd
diff -up perl-5.8.8/ext/Socket/Socket.xs.crr perl-5.8.8/ext/Socket/Socket.xs
02635cd
--- perl-5.8.8/ext/Socket/Socket.xs.crr	2005-07-08 17:56:17.000000000 +0200
02635cd
+++ perl-5.8.8/ext/Socket/Socket.xs	2008-03-19 14:24:02.000000000 +0100
02635cd
@@ -236,7 +236,8 @@ inet_aton(host)
02635cd
 		(*host != '\0') &&
02635cd
 		inet_aton(host, &ip_address);
02635cd
 
02635cd
-	if (!ok && (phe = gethostbyname(host))) {
02635cd
+	if (!ok && (phe = gethostbyname(host)) &&
02635cd
+		phe->h_addrtype == AF_INET && phe->h_length == 4) {
02635cd
 		Copy( phe->h_addr, &ip_address, phe->h_length, char );
02635cd
 		ok = 1;
02635cd
 	}