Commit 8c4cf5d2 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Merge branch 'ondrej/little-socket-fixes' into 'main'

Various little fixes in the old socket code

See merge request !4253
parents 442a4596 96ac91a1
Pipeline #54096 failed with stages
in 45 minutes and 17 seconds
......@@ -2018,7 +2018,6 @@ set_sndbuf(void) {
socklen_t len;
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
#if defined(ISC_PLATFORM_HAVEIPV6)
if (fd == -1) {
switch (errno) {
case EPROTONOSUPPORT:
......@@ -2033,7 +2032,6 @@ set_sndbuf(void) {
break;
}
}
#endif /* if defined(ISC_PLATFORM_HAVEIPV6) */
if (fd == -1) {
return;
}
......@@ -2348,8 +2346,6 @@ again:
#endif /* IPV6_RECVPKTINFO */
#endif /* defined(USE_CMSG) */
set_ip_dontfrag(sock);
#if defined(SET_RCVBUF)
optlen = sizeof(size);
if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, (void *)&size,
......@@ -2416,6 +2412,8 @@ again:
#endif /* ifdef IP_RECVTOS */
#endif /* defined(USE_CMSG) || defined(SET_RCVBUF) || defined(SET_SNDBUF) */
set_ip_dontfrag(sock);
setup_done:
inc_stats(manager->stats, sock->statsindex[STATID_OPEN]);
if (sock->active == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment