mirror of https://github.com/openssl/openssl
Set protocol in init_client()
If TCP is being used, protocol = 0 is passed to init_client(), then protocol == IPPROTO_TCP fails when attempting to set BIO_SOCK_NODELAY. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17838)
This commit is contained in:
parent
1753559230
commit
54b6755702
|
@ -162,7 +162,7 @@ int init_client(int *sock, const char *host, const char *port,
|
|||
#endif
|
||||
|
||||
if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai),
|
||||
protocol == IPPROTO_TCP ? BIO_SOCK_NODELAY : 0)) {
|
||||
BIO_ADDRINFO_protocol(ai) == IPPROTO_TCP ? BIO_SOCK_NODELAY : 0)) {
|
||||
BIO_closesocket(*sock);
|
||||
*sock = INVALID_SOCKET;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue