]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: revert the use of IP*_RECVERR
authorDaniel Stenberg <daniel@haxx.se>
Tue, 26 Jul 2022 22:42:42 +0000 (00:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 27 Jul 2022 22:34:23 +0000 (00:34 +0200)
The options were added in #6341 and d13179d, but cause problems: Lots of
POLLIN event occurs but recvfrom read nothing.

Reported-by: Tatsuhiro Tsujikawa
Fixes #9209
Closes #9215

lib/connect.c

index 424197234c7e80ac3e4968007415de3c80ae27f5..68cfe72ef144f1f716100bf9491bb768ac6f8fcf 100644 (file)
@@ -1667,20 +1667,6 @@ CURLcode Curl_socket(struct Curl_easy *data,
   }
 #endif
 
-#if defined(__linux__) && defined(IP_RECVERR)
-  if(addr->socktype == SOCK_DGRAM) {
-    int one = 1;
-    switch(addr->family) {
-    case AF_INET:
-      (void)setsockopt(*sockfd, SOL_IP, IP_RECVERR, &one, sizeof(one));
-      break;
-    case AF_INET6:
-      (void)setsockopt(*sockfd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
-      break;
-    }
-  }
-#endif
-
   return CURLE_OK;
 }