mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +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);
|
LOCK(&sock->lock);
|
||||||
|
|
||||||
if (sock->type == isc_sockettype_tcp) {
|
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
|
||||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR,
|
sizeof on) < 0) {
|
||||||
(void *)&on, sizeof on) < 0) {
|
UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed",
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
sock->fd);
|
||||||
"setsockopt(%d) failed",
|
/* Press on... */
|
||||||
sock->fd);
|
|
||||||
/* Press on... */
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
|
if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
|
||||||
UNLOCK(&sock->lock);
|
UNLOCK(&sock->lock);
|
||||||
|
Reference in New Issue
Block a user