From 342eb1bf7ef481ce3091b622192e495e1a4fc89c Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Thu, 22 Sep 2005 00:45:04 +0000 Subject: [PATCH] ok at least ipv6 does not crash, but gotto fix byte order now ;) --- src/res.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/res.c b/src/res.c index ae0a540e3..f2d257fbd 100644 --- a/src/res.c +++ b/src/res.c @@ -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));