mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
Add safeguard against the other usage of SO_REUSEPORT
This commit is contained in:
@@ -4475,12 +4475,14 @@ isc_socket_bind(isc_socket_t *sock0, const isc_sockaddr_t *sockaddr,
|
|||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||||
"setsockopt(%d) failed", sock->fd);
|
"setsockopt(%d) failed", sock->fd);
|
||||||
}
|
}
|
||||||
|
#elif defined(__linux__) && defined(SO_REUSEPORT)
|
||||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT,
|
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT,
|
||||||
(void *)&on, sizeof(on)) < 0)
|
(void *)&on, sizeof(on)) < 0)
|
||||||
{
|
{
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||||
"setsockopt(%d) failed", sock->fd);
|
"setsockopt(%d) failed", sock->fd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* Press on... */
|
/* Press on... */
|
||||||
}
|
}
|
||||||
#ifdef AF_UNIX
|
#ifdef AF_UNIX
|
||||||
|
Reference in New Issue
Block a user