Commit graph

362 commits

Author SHA1 Message Date
W.C.A. Wijngaards
ad45e9b89e - Fix for #431: Squelch permission denied errors for udp connect,
and udp send, they are visible at higher verbosity settings.
2021-08-13 09:27:58 +02:00
W.C.A. Wijngaards
3ed5b62578 - Fix verbose printout failure in tcp reuse unit test. 2021-08-02 16:06:36 +02:00
George Thessalonikefs
ad2bd61ed4 - Remove redundant log_assert and fix error messages. 2021-07-26 16:12:55 +02:00
George Thessalonikefs
de73af2da2 - stream reuse, do not explicitly wait for a free pending_tcp if a reuse
could be used.
2021-07-26 10:47:20 +02:00
George Thessalonikefs
ab318a8b95 - Add unittest for tcp_reuse functions. 2021-07-24 01:15:00 +02:00
George Thessalonikefs
1b7358e85c - stream reuse, move log_assert to the correct location. 2021-07-23 20:51:14 +02:00
George Thessalonikefs
e1fdac7205 - stream reuse, clean links on structs that are unlinked from a list. 2021-07-23 18:45:48 +02:00
George Thessalonikefs
0c74d6abba - Fix for #411, #439, #469: stream reuse, fix loop in the free
pending_tcp list.
2021-07-23 18:25:06 +02:00
George Thessalonikefs
5b4555954a - Fix for #411, #439, #469: stream reuse, fix outnet deletion for all
non-free pending_tcp.
2021-07-23 18:05:57 +02:00
George Thessalonikefs
224571256d - Fix for #411, #439, #469: stream reuse, fix LRU list when reuse is
already in the tree.
2021-07-23 18:00:24 +02:00
George Thessalonikefs
f9ad139c08 - Fix for #411, #439, #469: stream reuse, fix linking when touching the
tcp_reuse LRU list.
2021-07-23 17:51:42 +02:00
George Thessalonikefs
e2221f3388 - More log_assert for stream reuse operations. 2021-07-23 17:50:28 +02:00
George Thessalonikefs
ca4d68c64c - Introduce 'http-user-agent:' and 'hide-http-user-agent:' options. 2021-07-16 14:32:18 +02:00
W.C.A. Wijngaards
f693cbc90b Revert "- With hide-version unbound also omits the version from http headers."
This reverts commit 9d4644b125.
2021-07-16 14:02:55 +02:00
W.C.A. Wijngaards
9d4644b125 - With hide-version unbound also omits the version from http headers. 2021-07-16 13:45:41 +02:00
George Thessalonikefs
ff6b527184 - Fix for #411, #439, #469: Reset the DNS message ID when moving queries
between TCP streams.
- Refactor for uniform way to produce random DNS message IDs.
2021-05-19 15:07:32 +02:00
W.C.A. Wijngaards
90d0f8bc19 - Fix to squelch tcp socket bind failures when the interface is gone. 2021-05-04 16:21:42 +02:00
George Thessalonikefs
71f311dbe1 - Fix for #367: only attempt to get the interface for queries
that are no longer on the tcp_waiting_list.
2021-05-04 14:45:01 +02:00
André Cruz
e07f973938
Allow configuration of TCP timeout while waiting for response
This allows us to configure how long Unbound will wait for a response
on a TCP connection.
2021-04-28 16:20:46 +01:00
André Cruz
75875d4d1c
Allow configuration of persistent TCP connections
Added 2 new options to configure previously hardcoded
values: max-reuse-tcp-queries and tcp-reuse-timeout. These
allow fine-grained control over how unbound uses persistent
TCP connections to authority servers.
2021-04-21 13:50:45 +01:00
W.C.A. Wijngaards
7396eff7af - Fix for #411: Depth protect for crash on deleted element timeout. 2021-04-08 13:47:06 +02:00
W.C.A. Wijngaards
269c168f7e - Debug output for #411 and #439: printout internal error and details. 2021-03-05 13:54:26 +01:00
W.C.A. Wijngaards
1bdae426ee - Workaround for #439: prevent loops in the reuse rbtree. 2021-03-05 13:46:36 +01:00
Wouter Wijngaards
209dc32624
Merge pull request #367 from NLnetLabs/dnstap-log-local-addr
DNSTAP log local address
2021-02-25 11:58:36 +01:00
W.C.A. Wijngaards
04b4f515a7 Fix comment item. 2021-02-25 08:50:02 +01:00
W.C.A. Wijngaards
40fbc3fa8a - Fix #431: Squelch permission denied errors for tcp connect 2021-02-22 08:24:04 +01:00
W.C.A. Wijngaards
f5339ec7e5 Merge branch 'master' into dnstap-log-local-addr 2021-02-18 13:12:09 +01:00
George Thessalonikefs
a8485d58ca - Attempt to fix NULL keys in the reuse_tcp tree; relates to #411. 2021-02-01 16:57:56 +01:00
Willem Toorop
ca2139bf3d Some review nits from George 2021-01-25 15:13:54 +01:00
Willem Toorop
48ecf95108 Merge branch 'master' into features/padding 2021-01-22 10:29:50 +01:00
George Thessalonikefs
08968baec1 - Fix error cases when udp-connect is set and send() returns an error
(modified patch from Xin Li @delphij).
2020-12-16 17:11:41 +01:00
W.C.A. Wijngaards
1f7d1a00ff Fix for #368: dnstap does not log the DNS message ID for FORWARDER_QUERY 2020-12-10 08:19:07 +01:00
W.C.A. Wijngaards
e25f80799a Fix use after free. 2020-12-09 14:13:46 +01:00
W.C.A. Wijngaards
9ea58b5bc0 Fix for tcp outgoing to have local address logged 2020-12-09 14:02:00 +01:00
W.C.A. Wijngaards
af96ff157e Fix leak of socket mem on failure and fix if tcp has to wait we
do not know the interface at the time.  Later when it knows the
interface we do not have 'sq' with the zone name.
2020-12-09 13:52:49 +01:00
W.C.A. Wijngaards
2baa748bc7 Use port_if pointer instead of wrong UDP local addr 2020-12-09 12:13:50 +01:00
W.C.A. Wijngaards
6ce577c4d9 Use stored TCP address for callback. 2020-12-09 12:07:16 +01:00
W.C.A. Wijngaards
91bec32cdc For TCP store picked outgoing interface and pass it. 2020-12-09 11:34:39 +01:00
W.C.A. Wijngaards
159bf52384 Fix that it passes the actual UDP address instead of first
and pass NULL to make tcp log compile.
2020-12-09 11:27:33 +01:00
W.C.A. Wijngaards
31cedb47cb Remove unused whitespace, add missing header change, make it compile 2020-12-09 11:13:58 +01:00
W.C.A. Wijngaards
bdfa65c6ab Import the patches from the files in the tarball in
issue #365 https://github.com/NLnetLabs/unbound/files/5659923/patches.tar.gz
from iruzanov.  The merge conflicts are fixed, but no changes are made
to the patched code.
2020-12-09 11:00:51 +01:00
W.C.A. Wijngaards
5906811ff1 - Fix #358: Squelch udp connect 'no route to host' errors on low
verbosity.
2020-12-01 09:09:13 +01:00
W.C.A. Wijngaards
e4bdc527ba - Fix assertion failure on double callback when iterator loses
interest in query at head of line that then has the tcp stream
  not kept for reuse.
2020-11-30 09:41:33 +01:00
W.C.A. Wijngaards
67d541d690 - Fix compile warnings for windows. 2020-11-27 10:01:55 +01:00
W.C.A. Wijngaards
8ffdbc2714 - Fix when use free buffer to initialize rbtree for stream reuse. 2020-11-27 09:57:08 +01:00
W.C.A. Wijngaards
3fb0493d3f - Clear readagain upon decommission of pending tcp structure. 2020-11-26 12:23:18 +01:00
W.C.A. Wijngaards
e50152aa1f - Fix readagain and writeagain callback functions for comm point
cleanup.
2020-11-25 13:46:28 +01:00
W.C.A. Wijngaards
d05c259458 - Attempt fix for libevent state in tcp reuse cases after a packet
is written.
2020-11-25 12:12:35 +01:00
W.C.A. Wijngaards
4b644b7965 - Better fix for reuse tree comparison for is-tls sockets. Where
the tree key identity is preserved after cleanup of the TLS state.
2020-11-25 10:22:11 +01:00
W.C.A. Wijngaards
15e8f5c6d4 - Fix udp-connect on FreeBSD, do send calls on connected UDP socket. 2020-11-25 09:55:01 +01:00