2
0
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:
Ondřej Surý
2020-12-02 21:54:25 +01:00
parent 1d066e4bc5
commit 4adeaab73d
5 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>