diff options
-rw-r--r-- | lib/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c index 604bb2a1a..bcc1ed74a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -857,7 +857,7 @@ singleipconnect(struct connectdata *conn, addr.family = ai->ai_family; addr.socktype = conn->socktype; - addr.protocol = ai->ai_protocol; + addr.protocol = conn->socktype==SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol; addr.addrlen = ai->ai_addrlen; if(addr.addrlen > sizeof(struct Curl_sockaddr_storage)) |