through and trying to bind failed v6 connects.
ok guenther
-/* $OpenBSD: tls_client.c,v 1.31 2015/10/08 20:13:45 guenther Exp $ */
+/* $OpenBSD: tls_client.c,v 1.32 2015/10/09 04:13:34 deraadt Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
}
/* It was resolved somehow; now try connecting to what we got */
+ s = -1;
for (res = res0; res; res = res->ai_next) {
s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (s == -1) {
}
freeaddrinfo(res0);
+ if (s == -1)
+ goto err;
+
if (servername == NULL)
servername = h;