Commit 28933f9d authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent 5b2342d3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);