- Fix for #882: small changes, date updated in Copyright for

util/timeval_func.c and util/timeval_func.h. Man page entries and
  example entry.
This commit is contained in:
W.C.A. Wijngaards 2023-04-26 13:49:33 +02:00
parent 7081b0340f
commit 144f29638c
6 changed files with 39 additions and 3 deletions

View File

@ -1,3 +1,12 @@
26 April 2023: Wouter
- Merge #882 from vvfedorenko: Features/dropqueuedpackets, with
sock-queue-timeout option that drops packets that have been in the
socket queue for too long. Added statistics num.queries_timed_out
and query.queue_time_us.max that track the socket queue timeouts.
- Fix for #882: small changes, date updated in Copyright for
util/timeval_func.c and util/timeval_func.h. Man page entries and
example entry.
19 April 2023: Wouter
- Fix for #878: Invalid IP address in unbound.conf causes Segmentation
Fault on OpenBSD.

View File

@ -274,6 +274,10 @@ server:
# Timeout for EDNS TCP keepalive, in msec.
# edns-tcp-keepalive-timeout: 120000
# UDP queries that have waited in the socket buffer for a long time
# can be dropped. Default is 0, disabled. In seconds, such as 3.
# sock-queue-timeout: 0
# Use systemd socket activation for UDP, TCP, and control sockets.
# use-systemd: no

View File

@ -398,6 +398,14 @@ as a cache response was sent.
.I threadX.num.expired
number of replies that served an expired cache entry.
.TP
.I threadX.num.queries_timed_out
number of queries that are dropped because they waited in the UDP socket buffer
for too long.
.TP
.I threadX.query.queue_time_us.max
The maximum wait time for packets in the socket buffer, in microseconds. This
is only reported when sock-queue-timeout is enabled.
.TP
.I threadX.num.recursivereplies
The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries.
.TP
@ -462,6 +470,12 @@ summed over threads.
.I total.num.expired
summed over threads.
.TP
.I total.num.queries_timed_out
summed over threads.
.TP
.I total.query.queue_time_us.max
the maximum of the thread values.
.TP
.I total.num.recursivereplies
summed over threads.
.TP

View File

@ -505,6 +505,14 @@ configured, and finally to 0 if the number of free buffers falls below
A minimum actual timeout of 200 milliseconds is observed regardless of the
advertised timeout.
.TP
.B sock\-queue\-timeout: \fI<sec>\fR
UDP queries that have waited in the socket buffer for a long time can be
dropped. Default is 0, disabled. The time is set in seconds, 3 could be a
good value to ignore old queries that likely the client does not need a reply
for any more. This could happen if the host has not been able to service
the queries for a while, i.e. Unbound is not running, and then is enabled
again. It uses timestamp socket options.
.TP
.B tcp\-upstream: \fI<yes or no>
Enable or disable whether the upstream queries use TCP only for transport.
Default is no. Useful in tunneling scenarios. If set to no you can specify

View File

@ -1,7 +1,7 @@
/*
* util/timeval_func.c - helpers to work with struct timeval values.
*
* Copyright (c) 2007, NLnet Labs. All rights reserved.
* Copyright (c) 2023, NLnet Labs. All rights reserved.
*
* This software is open source.
*
@ -39,6 +39,7 @@
* This file contains helpers to manipulate struct timeval values.
*/
#include "config.h"
#include "timeval_func.h"
/** subtract timers and the values do not overflow or become negative */

View File

@ -1,7 +1,7 @@
/*
* util/timeval)func.h - definitions of helpers for strcut timeval values.
* util/timeval_func.h - definitions of helpers for struct timeval values.
*
* Copyright (c) 2007, NLnet Labs. All rights reserved.
* Copyright (c) 2023, NLnet Labs. All rights reserved.
*
* This software is open source.
*