mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-17 19:38:52 -04:00
Add safeguard against the other usage of SO_REUSEPORT
(cherry picked from commit 1c672367a0)
This commit is contained in:
parent
110beba49c
commit
5d8d65bfdc
1 changed files with 2 additions and 0 deletions
|
|
@ -4477,12 +4477,14 @@ isc_socket_bind(isc_socket_t *sock0, const isc_sockaddr_t *sockaddr,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"setsockopt(%d) failed", sock->fd);
|
||||
}
|
||||
#elif defined(__linux__) && defined(SO_REUSEPORT)
|
||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT,
|
||||
(void *)&on, sizeof(on)) < 0)
|
||||
{
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"setsockopt(%d) failed", sock->fd);
|
||||
}
|
||||
#endif
|
||||
/* Press on... */
|
||||
}
|
||||
#ifdef AF_UNIX
|
||||
|
|
|
|||
Loading…
Reference in a new issue