Commit graph

1039 commits

Author SHA1 Message Date
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
61922ce9da - Clean the fix for out of order TCP processing limits on number
of queries.  It was tested to work.
2020-10-19 13:39:02 +02:00
Ralph Dolmans
a433a25ba3
Merge pull request #329 from NLnetLabs/nochunk-region
local-zone regional allocations outside of chunk
2020-10-19 11:21:30 +02:00
W.C.A. Wijngaards
a3e2bfbb0c - Fix #330: [Feature request] Add unencrypted DNS over HTTPS support.
This adds the option http-notls-downstream: yesno to change that,
  and the dohclient test code has the -n option.
2020-10-19 10:24:03 +02:00
W.C.A. Wijngaards
f81d0ac047 - Fix that the out of order TCP processing does not limit the
number of outstanding queries over a connection.
2020-10-16 17:26:58 +02:00
Ralph Dolmans
1d11f470df - local-zone regional allocations outside of chunk to prevent large
chunk per small local-zone allocations.
2020-10-16 17:12:08 +02:00
George Thessalonikefs
d55084ea9e - Fix that if there are reply callbacks for the given rcode, those
are called per reply and a new message created if that was modified
  by the call.
- Pass the comm_reply information to the inplace_cb_reply* functions
  during the mesh state and update the documentation on that.
2020-10-15 17:17:59 +02:00
W.C.A. Wijngaards
edc8f363a7 Changelog note for #326 and changes:
- DoH content length, simplify code, remove declaration after
  statement and fix cast warning.
2020-10-15 08:22:42 +02:00
netblue30
b1a50720e5 DoH: implement content-lenght header field 2020-10-14 11:32:14 -04:00
W.C.A. Wijngaards
890c8deb0f - Free up auth zone parse region after use for lookup of host 2020-10-14 14:20:16 +02:00
W.C.A. Wijngaards
f0c19be06f - Fix that if there are on reply callbacks, those are called per
reply and a new message created if that was modified by the call.
2020-10-14 14:03:04 +02:00
W.C.A. Wijngaards
a9e13f3590 - Fix that if there are on reply callbacks, those are called per
reply and a new message created if that was modified by the call.
2020-10-14 14:01:47 +02:00
W.C.A. Wijngaards
72032a95bb - Fix for python reply callback to see mesh state reply_list member,
it only removes it briefly for the commpoint call so that it does
  not drop it and attempt to modify the reply list during reply.
2020-10-14 10:06:28 +02:00
W.C.A. Wijngaards
a87f05be7b - Fix #319: potential memory leak on config failure, in rpz config. 2020-10-08 09:11:54 +02:00
Ralph Dolmans
eb799026ff Replace edns-client-tag with edns-client-string option 2020-09-30 23:17:53 +02:00
Ralph Dolmans
7da369e85a - Add edns-client-tag-opcode option 2020-09-23 12:09:48 +02:00
Ralph Dolmans
4ae823fbc2 Merge branch 'master' into doh 2020-09-16 18:38:51 +02:00
Ralph Dolmans
42a35ac26e - Final round of DoH review feedback processing. 2020-09-16 18:25:02 +02:00
W.C.A. Wijngaards
47a5dc8cae - Refactor to use sock_strerr shorthand function. 2020-08-31 09:12:01 +02:00
W.C.A. Wijngaards
a6dc0743b4 - Merge PR #293: Add missing prototype. Also refactor to use the new
shorthand function to clean up the code.
2020-08-31 08:41:34 +02:00
Florian Obser
2460737490 Add missing prototype. 2020-08-28 17:31:14 +02:00
W.C.A. Wijngaards
12c0cf7cee - Review fix, doxygen and assign null in case of error free. 2020-08-27 15:27:05 +02:00
W.C.A. Wijngaards
b5a237424b Please doxygen, quote the characters to stop it from parsing a doxygen command. 2020-08-27 15:12:46 +02:00
W.C.A. Wijngaards
f6a527c25a - Similar to NSD PR#113, implement that interface names can be used,
eg. something like interface: eth0 is resolved at server start and
  uses the IP addresses for that named interface.
2020-08-27 14:53:33 +02:00
Ralph Dolmans
f5d8861bbf - process review feedback 2020-08-27 12:28:17 +02:00
W.C.A. Wijngaards
49019ba3a9 Review fix: defense check of qdcount in debug output. 2020-08-25 16:07:25 +02:00
W.C.A. Wijngaards
a83fc176cc Review fix: remove unused variables. 2020-08-25 13:16:46 +02:00
W.C.A. Wijngaards
2fade6f970 Merge branch 'master' into dlv-removal 2020-08-06 14:20:42 +02:00
Ralph Dolmans
74ec8a758b
Merge pull request #272 from NLnetLabs/edns-client-tag
Add EDNS client tag functionality
2020-08-05 16:07:49 +02:00
George Thessalonikefs
764a0dc765 - Improve error log message when inserting rpz RR. 2020-08-04 12:49:43 +02:00
W.C.A. Wijngaards
c0c722cd97 DLV removal 2020-08-04 09:05:09 +02:00
W.C.A. Wijngaards
7a211e5a07 stream reuse, fix tls close by upstream after timeout write event handling. 2020-07-30 17:51:13 +02:00
W.C.A. Wijngaards
444681af9d stream reuse, defensible wait add and debug log with details for requeue. 2020-07-27 17:12:23 +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
Ralph Dolmans
2fe398f4bf EDNS client tags - insert configured tags into tree 2020-07-24 16:00:13 +02:00
Ralph Dolmans
16029281a8 Start of EDNS client tags implementation. 2020-07-23 17:17:44 +02:00
W.C.A. Wijngaards
f1c4a4d515 stream reuse, fix cleanup with streams in the connection table. 2020-07-22 15:20:58 +02:00
W.C.A. Wijngaards
2d20edb39f stream reuse, free up elements that are connected in outside network delete. 2020-07-22 10:30:50 +02:00
W.C.A. Wijngaards
8b43b94b22 Merge branch 'master' into stream-reuse 2020-07-22 09:53:57 +02:00
W.C.A. Wijngaards
63b92ea1e8 Merge branch 'master' into infra-keep-probing 2020-07-22 09:53:30 +02:00
W.C.A. Wijngaards
b7b5952c3a - Fix lock dependency cycle in rpz zone config setup. 2020-07-17 17:15:55 +02:00
W.C.A. Wijngaards
a7776a15e5 stream reuse, make reuse possible straight away after first query to address. 2020-07-13 16:11:52 +02:00
W.C.A. Wijngaards
b71695e8bb stream reuse, update lru when reuse elements are used with lru touch routine. 2020-07-13 15:59:23 +02:00
W.C.A. Wijngaards
19a35fb839 stream reuse, write and read again if more data can go over the channel,
this amortizes the event loop mechanism for busy channels, for performance.
2020-07-13 15:16:59 +02:00
W.C.A. Wijngaards
7a69ff4182 fix that ssl_handle_it() uses tcp_is_reading in tcp_write_and_read mode.
fix that netevent tcp_write_and_read mode does not close due to error from
assert that not both write and read happen at the same time.
2020-07-10 15:37:30 +02:00
W.C.A. Wijngaards
e431676457 stream reuse, fix bad id in reply errors. 2020-07-10 15:13:16 +02:00
W.C.A. Wijngaards
46a364be8e stream reuse, neater code for tree by id and use callback routine for timer. 2020-07-09 16:50:57 +02:00
W.C.A. Wijngaards
ad6fa1eb45 stream reuse, comment improved 2020-07-09 16:37:40 +02:00
W.C.A. Wijngaards
d87774c3c6 stream reuse, fix decommission to first remove from tree and then do the
callbacks and then delete the element.
2020-07-09 16:34:48 +02:00
W.C.A. Wijngaards
79f315f480 stream reuse, fix double callback and double delete, items are in the tree. 2020-07-09 15:47:24 +02:00
W.C.A. Wijngaards
8201d1422b stream reuse, fix to put id number in waiting tcp packet. 2020-07-09 15:35:32 +02:00
W.C.A. Wijngaards
b1ea8273f0 stream reuse, fix to not keep stream when it is in error and closed.
stream reuse, fix to stop listening on the fd before rw mode change.
stream reuse, fix waiting tcp id value stored before tree insert.
stream reuse, fix to not double delete pend.query.
2020-07-09 14:29:56 +02:00
W.C.A. Wijngaards
4e44e8663d stream reuse, fix to return key pointer from reuse_tcp_by_id_find. 2020-07-09 14:06:21 +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
734a248284 stream reuse, check incoming messages from rbtree in outnet_tcp_cb when
read a reply, and call that callback and remove that entry.
2020-07-09 13:49:36 +02:00
W.C.A. Wijngaards
ccc9e0749c stream reuse toggle write and read to only read mode when write is done.
tcp callback from stream read without entry linked.
2020-07-09 13:41:03 +02:00
W.C.A. Wijngaards
d89a45d1e1 in outnet_tcptimer: pick up callbacks and clean the struct pending for
use again in tcp_free list; then perform the callbacks in a cleaner state
for reentry into the outside network code.  Delete callbacks afterwards.
2020-07-09 10:28:47 +02:00
W.C.A. Wijngaards
80f21f48c5 Merge branch 'master' into stream-reuse 2020-07-09 08:55:19 +02:00
W.C.A. Wijngaards
abe7a01bf5 Merge branch 'master' into infra-keep-probing 2020-07-09 08:55:01 +02:00
W.C.A. Wijngaards
06d33f61c1 - Fix tcp req info drop due to size call into mesh accounting
removal of mesh state during mesh send reply.
2020-06-30 17:22:43 +02:00
W.C.A. Wijngaards
52774b6b20 - Review fix for number of detached states due to use of variable
after end of loop.
2020-06-30 16:35:48 +02:00
W.C.A. Wijngaards
84b0207956 - Fix for mesh accounting when rpz decides to drop a reply with a
tcp stream waiting for it.
2020-06-30 16:20:09 +02:00
W.C.A. Wijngaards
6f0c2956ac - Also move reply list clean for mesh callbacks to the scrip callback
can see the reply_info.
- Fix for mesh accounting if the reply list already empty to begin
  with.
2020-06-30 15:48:11 +02:00
W.C.A. Wijngaards
8ac054733b - Move reply list clean for serve expired mesh callback to after
the reply is sent, so that script callbacks have reply_info.
2020-06-30 13:41:26 +02:00
W.C.A. Wijngaards
64c8d18814 in tcp write callback routine dont reset read byte count if write and read.
in tcp write callback and write and read and write is done perform callback.
tcp connection is selected to not toggle readwrite and give closed callback.
2020-06-26 10:54:13 +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
dfb6d32189 outnet_tcp_cb: add assertion and return when write packets done is handled. 2020-06-25 16:29:37 +02:00
W.C.A. Wijngaards
cbcbd5fa07 pending_tcp_query: cleaner comments. 2020-06-25 16:22:43 +02:00
W.C.A. Wijngaards
c32c43f9f2 for tcp use_free_buffer write straight away on reuse connection, if possible 2020-06-25 16:11:46 +02:00
W.C.A. Wijngaards
34c063701e in outside_network.c: also log messages that end up on the waiting list.
with dnstap.
for tcp use_free_buffer reuse existing entry if second wait entry on the
same addr as the other waiting.
2020-06-25 16:05:25 +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
Ralph Dolmans
740da89578 Merge branch 'master' into doh 2020-06-24 14:18:47 +02:00
Ralph Dolmans
0fbfce4c99 - Add DoH tests 2020-06-24 14:04:34 +02:00
W.C.A. Wijngaards
4fe2122890 Merge branch 'master' into infra-keep-probing
Remade yacc and lex files.
2020-06-24 13:21:14 +02:00
W.C.A. Wijngaards
04d805b0eb reuse tcp lookup with correct address as key. 2020-06-24 12:57:15 +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
6f9310173d Fix grammar. 2020-06-23 17:32:33 +02:00
W.C.A. Wijngaards
c809bb9ece tcp reuse timeout event cleanup and callbacks. 2020-06-23 15:29:40 +02:00
W.C.A. Wijngaards
d96e718f80 fix crash on cleanup. 2020-06-19 18:04:12 +02:00
W.C.A. Wijngaards
0e0c57734a fix uninit after malloc for on_tcp_waiting_list. 2020-06-19 17:40:45 +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
d8b7b5ee27 fix to set pending pointer in reuse tcp structure
fix debug output of reuse tcp and test leak of process
2020-06-09 09:14:01 +02:00
W.C.A. Wijngaards
fd723aed27 tcp connection is stored and picked up for reuse
fix that comm_point_start_listening does not close the same fd that is started.
2020-06-03 17:24:26 +02:00
W.C.A. Wijngaards
7cc6a89e21 fix spare id random selection. 2020-06-03 14:23:06 +02:00
W.C.A. Wijngaards
150e1b0491 spare id random selection better. 2020-06-03 14:03:34 +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
d9afcae346 add debug printout 2020-06-03 09:38:02 +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
W.C.A. Wijngaards
711c0548f0 - For PR #93: windows compile warnings removal
- windows compile warnings removal for ip dscp option code.
2020-05-19 14:36:57 +02:00
W.C.A. Wijngaards
ba0f382eee - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
  used to make Unbound unresponsive.
2020-05-19 10:27:27 +02:00
W.C.A. Wijngaards
edcef18274 Merge branch 'master' of git://github.com/PMunch/unbound into PMunch-master
Fixed conflicts in Makefile.in and configparser.y
2020-05-15 14:52:53 +02:00
Ralph Dolmans
8fc2320b5c - Add mem.http.query_buffer and mem.http.response_buffer stats
- Add configurable limits for http-query-buffer-size and
  http-response-buffer-size
- Make http endpoint, max_streams, and TCP_NODELAY for HTTP sockets
  configurable.
2020-05-12 18:12:19 +02:00
Ralph Dolmans
e7601870cc Merge branch 'master' into doh 2020-05-07 17:12:26 +02:00
Ralph Dolmans
8dae5d9f81 - Add DNS-over-HTTPS support 2020-05-07 16:36:26 +02:00