aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-01-08 23:37:27 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-01-08 23:43:45 +0100
commit28933f9d304657ab8341380d00f9ecbe86cb9e6f (patch)
treec20e78456dc6281b99660c47ff5b63df853a01eb
parent5b2342d3772ab5b06cf7c9575300e378852710bf (diff)
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
-rw-r--r--lib/connect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 05666ebb6..f04cce7e3 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -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);