From 28933f9d304657ab8341380d00f9ecbe86cb9e6f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Jan 2014 23:37:27 +0100 Subject: 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 --- lib/connect.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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); -- cgit v1.2.3