1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Curl_updateconninfo: don't do anything for UDP "connections"

getpeername() doesn't work for UDP sockets since they're not connected

Reported-by: Priyanka Shah
Bug: http://curl.haxx.se/mail/archive-2014-01/0016.html
This commit is contained in:
Daniel Stenberg 2014-01-08 23:37:27 +01:00
parent 5b2342d377
commit 28933f9d30

View File

@ -657,6 +657,10 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd)
struct Curl_sockaddr_storage ssloc;
struct SessionHandle *data = conn->data;
if(conn->socktype == SOCK_DGRAM)
/* there's no connection! */
return;
if(!conn->bits.reuse) {
len = sizeof(struct Curl_sockaddr_storage);