summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-10 20:23:40 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-10 20:35:02 +0100
commit07aa1e0459da67de3f0a866f2c7bc48193698597 (patch)
tree87aa9ab2eb7145a35ca799f2a8879653a098c56e /apps
parent1c37fd96d89f95202f2e54db8d2834cbf1fd8b88 (diff)
Don't assert protocol equality
It seems that some platforms' getaddrinfo don't fill in the ai_protocol field properly. On those, the assertion 'protocol == BIO_ADDRINFO_protocol(res)' will fail. Best to remove it. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/s_socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c
index b816cee37d..e345913b0d 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -176,8 +176,7 @@ int init_client(int *sock, const char *host, const char *port,
not get anything in the BIO_ADDRINFO chain that we haven't
asked for */
OPENSSL_assert((family == AF_UNSPEC || family == BIO_ADDRINFO_family(res))
- && (type == 0 || type == BIO_ADDRINFO_socktype(res))
- && (protocol == BIO_ADDRINFO_protocol(res)));
+ && (type == 0 || type == BIO_ADDRINFO_socktype(res)));
*sock = BIO_socket(BIO_ADDRINFO_family(ai), BIO_ADDRINFO_socktype(ai),
BIO_ADDRINFO_protocol(ai), 0);
@@ -255,8 +254,7 @@ int do_server(int *accept_sock, const char *host, const char *port,
not get anything in the BIO_ADDRINFO chain that we haven't
asked for */
OPENSSL_assert((family == AF_UNSPEC || family == BIO_ADDRINFO_family(res))
- && (type == 0 || type == BIO_ADDRINFO_socktype(res))
- && (protocol == BIO_ADDRINFO_protocol(res)));
+ && (type == 0 || type == BIO_ADDRINFO_socktype(res)));
asock = BIO_socket(BIO_ADDRINFO_family(res), BIO_ADDRINFO_socktype(res),
BIO_ADDRINFO_protocol(res), 0);