Commit graph

386 commits

Author SHA1 Message Date
George Thessalonikefs
2569b12b9c - Fix to stop possible loops in the tcp reuse code (write_wait list
and tcp_wait list). Based on analysis and patch from Prad Seniappan
  and Karthik Umashankar.
2022-10-07 11:25:36 +02:00
Yorgos Thessalonikefs
c4e51a4cfe
PROXYv2 downstream support (#760) 2022-10-03 15:29:47 +02:00
W.C.A. Wijngaards
cd22fdc28d - Fix #728: alloc_reg_obtain() core dump. Stop double
alloc_reg_release when serviced_create fails.
2022-08-01 16:45:41 +02:00
George Thessalonikefs
e5f66b4902 - For #668: relocate and make code more portable. 2022-07-04 12:46:17 +02:00
George Thessalonikefs
0f4c4c1163 Merge branch 'IP_BIND_ADDRESS_NO_PORT' of https://github.com/crrodriguez/unbound into crrodriguez-IP_BIND_ADDRESS_NO_PORT 2022-07-04 11:15:58 +02:00
George Thessalonikefs
b816318106 - Fix #704: [FR] Statistics counter for number of outgoing UDP queries
sent; introduces 'num.query.udpout' to the 'unbound-control stats'
  command.
2022-06-29 10:51:54 +02:00
W.C.A. Wijngaards
11d077c826 - Fix some lint type warnings. 2022-05-20 15:32:27 +02:00
Cristian Rodríguez
6a4ea692d4 Set IP_BIND_ADDRESS_NO_PORT on outbound tcp sockets
When bound to a local address the kernel does not know if the socket
will listen() or connect() and must reserve a port inmediately after
bind() effectively limiting the random port range to ~32k.
when IP_BIND_ADDRESS_NO_PORT is set, the kernel delays source port
allocation until the time the complete 4-tuple is known allowing
a much larger number of combinations
2022-04-23 23:08:45 +00:00
W.C.A. Wijngaards
a746d9693a - Fix that address not available is squelched from the logs for
udp connect failures. It is visible on verbosity 4 and more.
2022-02-18 09:03:56 +01:00
gthess
358e3a5963
Merge pull request #616 from NLnetLabs/bugfix/ratelimit
Update ratelimit logic
2022-02-02 11:16:04 +01:00
George Thessalonikefs
a60bbd12ed -Fix review comment for use-after-free when failing to send UDP out. 2022-01-31 11:27:35 +01:00
George Thessalonikefs
3086335724 - Introduce ratelimit-backoff and ip-ratelimit-backoff options for more
aggressive rate limiting.
2022-01-30 00:36:29 +01:00
George Thessalonikefs
f857af873e - Update ratelimit code for recent serviced_query changes and more
accurate ratelimit calculation.
2022-01-29 23:49:38 +01:00
gthess
ddc3c754b0
Merge pull request #612 from NLnetLabs/tcp-race-condition
TCP race condition
2022-01-25 17:26:30 +01:00
George Thessalonikefs
5c85615515 - Fix #588: Unbound 1.13.2 crashes due to p->pc is NULL in
serviced_udp_callback.
2022-01-25 17:15:37 +01:00
George Thessalonikefs
4573629fc4 - Mark waiting_tcp and serviced_query as being in the
cb_and_decommission stage to signal later code about their state;
  prevents premature item deletion.
2022-01-25 09:46:16 +01:00
George Thessalonikefs
c3c0186658 - Add serviced_query timer to send upstream queries outside of the mesh
flow to prevent race conditions.
2022-01-25 00:01:43 +01:00
George Thessalonikefs
773d1f2911 - Make sure callback changes for EDNS are not lost. 2022-01-14 15:18:43 +01:00
George Thessalonikefs
de1e91fc7f - Fix EDNS to upstream where the same option could be attached more than
once.
- Add a region to serviced_query for allocations.
2022-01-14 13:55:34 +01:00
George Thessalonikefs
a97604737b - Fix prematurely terminated TCP queries when a reply has the same ID. 2022-01-11 10:00:45 +01:00
Wouter Wijngaards
9645228f03
Merge pull request #570 from rex4539/typos
Fix typos
2021-11-29 11:39:48 +01:00
Dimitris Apostolou
c21d6af617
Fix typos 2021-11-13 16:56:15 +02:00
TCY16
8205c87a96 complete renaming of the modules edns list 2021-11-08 11:50:29 +01:00
Tom Carpay
89d7476539 split edns_data.opt_list in opt_list_in and opt_list_out
opt_list_in for parsed (incoming) edns options, and
opt_list_out for outgoing (to be encoded) edns options
2021-11-01 12:48:40 +00:00
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