From e6ea8f11992e22cc73d7f6a5380cea31ce11d179 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 27 Jul 2006 22:28:53 +0000 Subject: [PATCH] put back the correct logic, as the change dated July 11th 2006 added bad behaviour and a socket leak --- lib/hostip6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hostip6.c b/lib/hostip6.c index 7ea632a..c8bbdb5 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -244,7 +244,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, /* see if we have an IPv6 stack */ s = socket(PF_INET6, SOCK_DGRAM, 0); - if (s != CURL_SOCKET_BAD) { + if (s == CURL_SOCKET_BAD) { /* Some non-IPv6 stacks have been found to make very slow name resolves * when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if * the stack seems to be a non-ipv6 one. */ -- 2.7.4