Commit Graph

118 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
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
George Thessalonikefs
f857af873e - Update ratelimit code for recent serviced_query changes and more
accurate ratelimit calculation.
2022-01-29 23:49:38 +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
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
ab318a8b95 - Add unittest for tcp_reuse functions. 2021-07-24 01:15:00 +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
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
George Thessalonikefs
45328d37b1 - Fix compiler warning for signed/unsigned comparison for
max_reuse_tcp_queries.
2021-04-28 16:15:52 +02: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
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
Willem Toorop
48ecf95108 Merge branch 'master' into features/padding 2021-01-22 10:29:50 +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
91bec32cdc For TCP store picked outgoing interface and pass it. 2020-12-09 11:34:39 +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
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
Wouter Wijngaards
ead06af086 Merge branch 'master' into stream-reuse 2020-11-24 08:20:07 +01:00
W.C.A. Wijngaards
9cc8aa1ddf - Option to toggle udp-connect, default is enabled. 2020-11-23 11:06:53 +01:00
W.C.A. Wijngaards
6b97cb1dd1 stream reuse, up connection reuse time to 60 seconds. 2020-11-23 10:36:22 +01:00
W.C.A. Wijngaards
4445d9c5aa stream reuse, fix review comments. 2020-11-23 09:44:56 +01:00
W.C.A. Wijngaards
2eb39abbaf - Fix that reuse_tcp_close_oldest sets item_on_lru_list to 0.
- Fix to add assertions to reuse_tcp_select_id and unit test.
- Fix that if no tcp buffers then pending tcp query stops.
2020-10-21 09:49:55 +02:00
W.C.A. Wijngaards
2932d530c1 stream reuse, send queries one by one when upstream refuses multiple queries,
by closing the connection.
2020-07-27 16:59:46 +02:00
W.C.A. Wijngaards
9b583d2331 stream reuse, the id for pending stored in waiting_tcp structure, because
there can be multiple messages waiting for reply.
2020-07-09 13:58:44 +02:00
W.C.A. Wijngaards
d033ce6c23 tcp callback function refactor, split read and timeout event setup, leave
unused queries that are already sent to track their reply on the query
pipeline, when serviced query is deleted deal with the write wait list,
2020-06-25 17:23:46 +02:00
W.C.A. Wijngaards
39a50f30a3 tcp callback handle timeout event for read and reuse keepalive. 2020-06-25 14:26:29 +02:00
W.C.A. Wijngaards
75da272afe reuse tcp id_cmp function. clear list and tree after delete. clear when
decommisioned. callbacks when closed for lru space, and when closed because
not kept open.
2020-06-24 16:28:42 +02:00
W.C.A. Wijngaards
8ca34be36a fix reuse tcp crash, use addr in reuse struct, free leaked tcp entries. 2020-06-24 10:09:49 +02:00
W.C.A. Wijngaards
4b6e41e3de fix documentation for waiting_tcp pkt NULL setting. 2020-06-19 17:37:23 +02:00
W.C.A. Wijngaards
a1babfff1e add bool if on tcp waiting list, so that pkt can be stored.
remove pkt args from outnet_tcp_take_into_use, use w.pkt.
2020-06-19 17:31:36 +02:00
W.C.A. Wijngaards
a695ba447c set timeout to wait for reuse
add comm_point indicator for write events for reuse stream writes.
2020-06-09 16:15:03 +02:00
W.C.A. Wijngaards
0f3c638193 find reuse find tcp loop code for multiple connections to the same destination
find spare id value in reused connection.
2020-06-03 12:10:31 +02:00
W.C.A. Wijngaards
d1904bd509 tree key addr 2020-05-26 16:27:45 +02:00
W.C.A. Wijngaards
aad363ddd1 rename next,prev to lru_next,lru_prev for clarity. 2020-05-26 13:41:07 +02:00
W.C.A. Wijngaards
1a6cc6e5dc fixup lru list presence boolean. 2020-05-26 08:46:36 +02:00
W.C.A. Wijngaards
a83f5d7260 Merge branch 'master' into stream-reuse 2020-05-20 15:39:50 +02:00
gthess
334498d9b9
Merge pull request #221 from NLnetLabs/more-SNI
More SNI support on TLS
2020-04-17 11:37:47 +02:00
George Thessalonikefs
e430e95d30 - Add SNI support on more TLS connections (fixes #193).
- Add SNI support to unbound-anchor.
2020-04-16 14:39:05 +02:00
George Thessalonikefs
e18ab07c62 - Add doxygen documentation for DSCP. 2020-04-16 13:58:35 +02:00
Willem Toorop
4f78b37c61 Down- and upstream padding a la RFC7830 & RFC8467 2020-04-02 18:34:03 +02:00
Yaroslav K
cfddbcb5be add setting IP DiffServ Codepoint (DSCP, previously TOS) on sockets 2020-03-23 19:37:43 +00:00
Florian Obser
5aaa5e253d Allow the kernel to provide random source ports.
On some operating systems, for example OpenBSD since some decades, the
kernel binds to a random source port if asked for any port (port
number 0). There is no need to replicate this functionality in
userland.
2020-02-20 14:54:06 +01:00
W.C.A. Wijngaards
57aefd102e Stream reuse branch, for TCP and TLS stream reuse.
This is for upstream pipes and using them again for the next query.

Signposted code for reuse_tcp structure in outside_network.h
2020-01-16 17:12:32 +01:00
W.C.A. Wijngaards
af11b54071 Review changes for the XoT branch
With doc, SSL setup function, and function parameter doc.
2019-04-29 10:25:19 +02:00
Willem Toorop
48ad6477eb AXFR over TLS
Enable by specifying an auth name, like this:
```
auth-zone:
        name: nlnetlabs.nl
        master: 185.49.140.60#ns.nlnetlabs.nl
```
2019-03-24 10:43:57 +01:00
Ralph Dolmans
f30fe71395 - Get ready for the DNS flag day: remove EDNS lame procedure, do not re-query
without EDNS after timeout.


git-svn-id: file:///svn/unbound/trunk@5037 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-16 10:23:13 +00:00
Wouter Wijngaards
6fefbb4115 - Fix fail to reject dead peers in forward-zone, with ssl-upstream.
git-svn-id: file:///svn/unbound/trunk@4670 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-02 06:36:02 +00:00
Wouter Wijngaards
c16a32d2be fix doxygen comments.
git-svn-id: file:///svn/unbound/trunk@4632 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:16:10 +00:00