mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Add FreeBSD connection timeout socket option
On FreeBSD, the option to configure connection timeout is called TCP_KEEPINIT, use it to configure the connection timeout there. This also fixes the dangling socket problems in the unit test, so re-enable them.
This commit is contained in:
@@ -2283,6 +2283,10 @@ isc__nm_socket_dontfrag(uv_os_sock_t fd, sa_family_t sa_family) {
|
||||
#define TIMEOUT_TYPE unsigned int
|
||||
#define TIMEOUT_DIV 1
|
||||
#define TIMEOUT_OPTNAME TCP_USER_TIMEOUT
|
||||
#elif defined(TCP_KEEPINIT)
|
||||
#define TIMEOUT_TYPE int
|
||||
#define TIMEOUT_DIV 1000
|
||||
#define TIMEOUT_OPTNAME TCP_KEEPINIT
|
||||
#endif
|
||||
|
||||
isc_result_t
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#if HAVE_CMOCKA && defined(__linux__)
|
||||
#if HAVE_CMOCKA
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#if HAVE_CMOCKA && defined(__linux__)
|
||||
#if HAVE_CMOCKA
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#if HAVE_CMOCKA && defined(__linux__)
|
||||
#if HAVE_CMOCKA
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#if HAVE_CMOCKA && defined(__linux__)
|
||||
#if HAVE_CMOCKA
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
|
Reference in New Issue
Block a user