mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Undo 1.100 which caused problems on platforms other than Linux.
This commit is contained in:
@@ -2486,14 +2486,11 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr)
|
||||
|
||||
LOCK(&sock->lock);
|
||||
|
||||
if (sock->type == isc_sockettype_tcp) {
|
||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR,
|
||||
(void *)&on, sizeof on) < 0) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"setsockopt(%d) failed",
|
||||
sock->fd);
|
||||
/* Press on... */
|
||||
}
|
||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
|
||||
sizeof on) < 0) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed",
|
||||
sock->fd);
|
||||
/* Press on... */
|
||||
}
|
||||
if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
|
||||
UNLOCK(&sock->lock);
|
||||
|
Reference in New Issue
Block a user