1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 08:43:13 +02:00

ok at least ipv6 does not crash, but gotto fix byte order now ;)

This commit is contained in:
Bram Matthys
2005-09-22 00:45:04 +00:00
parent 2f876f353f
commit 342eb1bf7e
+4 -4
View File
@@ -214,12 +214,12 @@ u_int32_t ipv4_addr;
if ((status != 0) ||
#ifdef INET6
((he->h_length != 4) && (he->h_length != 6)))
((he->h_length != 4) && (he->h_length != 16)))
#else
(he->h_length != 4))
#endif
{
/* Failed: error code, or data length is not 4 (nor 6) */
/* Failed: error code, or data length is not 4 (nor 16) */
unrealdns_freeandremovereq(r);
proceed_normal_client_handshake(acptr, NULL);
return;
@@ -293,7 +293,7 @@ struct hostent *he2;
}
#ifdef INET6
if (((he->h_length != 4) && (he->h_length != 6)) || !he->h_addr_list[0])
if (((he->h_length != 4) && (he->h_length != 16)) || !he->h_addr_list[0])
#else
if ((he->h_length != 4) || !he->h_addr_list[0])
#endif
@@ -348,7 +348,7 @@ unsigned int alpha, beta;
#ifndef INET6
abort(); /* impossible */
#else
if (length != 6)
if (length != 16)
abort(); /* impossible */
memcpy(&alpha, (char *)binaryip + 8, sizeof(alpha));