diff --git a/lib/hostip6.c b/lib/hostip6.c index 8ddcd84b1a83ab0068f45e08b0562ad787b7c10d..8b3f6114660cb29e7e97a76882ebcc57a24ee3e4 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -204,7 +204,7 @@ bool Curl_ipvalid(struct SessionHandle *data) if(data->set.ip_version == CURL_IPRESOLVE_V6) { /* see if we have an IPv6 stack */ curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); - if (s != CURL_SOCKET_BAD) + if (s == CURL_SOCKET_BAD) /* an ipv6 address was requested and we can't get/use one */ return FALSE; sclose(s);