diff options
author | Matt Caswell <matt@openssl.org> | 2018-05-02 16:08:27 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-05-11 14:20:57 +0100 |
commit | f478c8a7c0229feb9f446df68e9940e8782edd91 (patch) | |
tree | 8b842967d54883f904851ac68453fa9472935450 /apps | |
parent | 66fab92316c913c781b2a274900d9d1e6a206ed0 (diff) |
Don't set TCP_NODELAY on a UDP socket
This was preventing DTLS connections from being made from the command line.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6159)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c index 69f0f4f05e..d16108c706 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -146,7 +146,8 @@ int init_client(int *sock, const char *host, const char *port, } #endif - if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), BIO_SOCK_NODELAY)) { + if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai), + type == SOCK_STREAM ? BIO_SOCK_NODELAY : 0)) { BIO_closesocket(*sock); *sock = INVALID_SOCKET; continue; |