Commit graph

346 commits

Author SHA1 Message Date
W.C.A. Wijngaards
78e9b8949c Merge branch 'master' into stream-reuse
Resolved comm_point_start_listening conflict for socket close.
2020-10-21 09:54:03 +02:00
W.C.A. Wijngaards
531ce9e85c Fixup for clear of tcp handler structure. 2020-10-19 13:36:53 +02:00
W.C.A. Wijngaards
68c57314c4 - Fix to set the tcp handler event toggle flag back to default when
the handler structure is reused.
2020-10-19 12:55:43 +02:00
W.C.A. Wijngaards
ab9d732796 - Log ip address when http session recv fails, eg. due to tls fail. 2020-10-19 11:06:55 +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
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
Ralph Dolmans
a3be2b73b6 Properly handle http_endpoint malloc failure. 2020-09-10 13:05:55 +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
W.C.A. Wijngaards
8b43b94b22 Merge branch 'master' into stream-reuse 2020-07-22 09:53:57 +02:00
Ralph Dolmans
14a0433470 - Merge PR #234 - Ensure proper alignment of cmsg buffers by Jérémie
Courrèges-Anglas.
- Fix PR #234 log_assert sizeof to use union buffer.
2020-07-17 13:07:03 +02:00
W.C.A. Wijngaards
766005a356 stream reuse, in callbacks, removed whitespace. 2020-07-13 15:45:16 +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
9914b7216b stream reuse, remove debug output 2020-07-10 16:06:17 +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
e95edd3d36 debug prints in verbose output. 2020-07-09 13:41:50 +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
cfe009a31c tcp read and write handling of write events in netevent for tcp and ssl. 2020-06-26 16:05:15 +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
39a50f30a3 tcp callback handle timeout event for read and reuse keepalive. 2020-06-25 14:26:29 +02:00
Ralph Dolmans
0fbfce4c99 - Add DoH tests 2020-06-24 14:04:34 +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
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
Jeremie Courreges-Anglas
8175161059 Ensure proper alignment of cmsg buffers
The cmsg macros expect a control message buffer to be aligned like
a struct cmsghdr.  The current layout around those stack-allocated
buffers probably provides the required alignment (usually 4 bytes).
Use a union to enforce proper alignment, in case future changes modify
the stack layout.

Spotted when chasing an unrelated bug with Otto Moerbeek (@omoerbeek).
2020-05-10 17:23:33 +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
Willem Toorop
af0bd5b0b4 Send tcp_req_info->spool_buffer as dnstap CLIENT_RESPONSE
When tcp_req_info exists. This fixes that dnstap CLIENT_RESPONSE messages did not contain the response message when answering on statful transport for uncached responses.
2020-03-30 12:19:17 +02:00
Willem Toorop
9d9eee8402 Fix uncached CLIENT_RESPONSE'es on stateful transports
Because repinfo->c->buffer does not contain the response when the it did not came from cache.
Only after tcp_req_info_send_reply is called, is the response on the buffer which is used to fill the dnstap protobuf's.
2020-03-30 11:39:07 +02:00
W.C.A. Wijngaards
25a88d6d54 dnstap io, check peer verification in dtstream dtio_ssl_handshake. 2020-02-12 15:23:58 +01:00
W.C.A. Wijngaards
dc31cf3652 dnstap unbound-dnstap-sock, read from TLS. 2020-01-31 14:03:28 +01:00
W.C.A. Wijngaards
6c0a863584 - Fix to silence the tls handshake errors for broken pipe and reset
by peer, unless verbosity is set to 2 or higher.
2020-01-28 14:32:06 +01:00
Havard Eidnes
dc0b1699e5 In tcp_callback_writer(), don't disable time-out when changing to read. 2019-11-26 00:02:34 +01:00
W.C.A. Wijngaards
3a49e683ed - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
W.C.A. Wijngaards
3907876eac - Fix Unrequired Checks, reported by X41 D-Sec. 2019-11-20 14:05:54 +01:00
W.C.A. Wijngaards
d05d6b959a - fixes for splint cleanliness, long vs int in SSL set_mode. 2019-11-13 15:16:27 +01:00
W.C.A. Wijngaards
05b9f4fd28 - Fix #71: fix openssl error squelch commit compilation error. 2019-09-04 08:44:19 +02:00
W.C.A. Wijngaards
1089fd6dc1 - squelch DNS over TLS errors 'ssl handshake failed crypto error'
on low verbosity, they show on verbosity 3 (query details), because
  there is a high volume and the operator cannot do anything for the
  remote failure.  Specifically filters the high volume errors.
2019-09-03 09:47:27 +02:00
W.C.A. Wijngaards
af6c5dea43 - Fix another spoolbuf storage code point, in prefetch. 2019-06-12 08:32:45 +02:00
W.C.A. Wijngaards
a95f5fd5cb - Squelch log messages from tcp send about connection reset by peer.
They can be enabled with verbosity at higher values for diagnosing
  network connectivity issues.
2019-05-13 10:39:39 +02:00
Wouter Wijngaards
ab6f1d0fc7 - Fix tls write event for read state change to re-call SSL_write and
not resume the TLS handshake.


git-svn-id: file:///svn/unbound/trunk@5159 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-15 11:52:21 +00:00
Wouter Wijngaards
c8a56bfa8f - Squelch SSL read and write connection reset by peer and broken pipe
messages.  Verbosity 2 and higher enables them.


git-svn-id: file:///svn/unbound/trunk@5158 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 15:04:32 +00:00
Wouter Wijngaards
c6369e9ffa - Fix that auth zone fails over to next master for timeout in tcp.
git-svn-id: file:///svn/unbound/trunk@5155 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 13:41:53 +00:00
Wouter Wijngaards
348cbab016 - Fix to reinit event structure for accepted TCP (and TLS) sockets.
git-svn-id: file:///svn/unbound/trunk@5148 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-05 14:11:28 +00:00
Wouter Wijngaards
a777329b7f - Fix spelling error in log output for event method.
git-svn-id: file:///svn/unbound/trunk@5147 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-04 14:28:39 +00:00
Wouter Wijngaards
225534e5ab - Fix #4227: pair event del and add for libevent for tcp_req_info.
git-svn-id: file:///svn/unbound/trunk@5122 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-25 15:48:27 +00:00
Wouter Wijngaards
f11d6653d6 - Fix that tcp for auth zone and outgoing does not remove and
then gets the ssl read again applied to the deleted commpoint.


git-svn-id: file:///svn/unbound/trunk@5074 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 12:46:15 +00:00
Wouter Wijngaards
f5dcd84d27 Fix reread of buffer data, better, also for TCP.
git-svn-id: file:///svn/unbound/trunk@5045 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 14:14:12 +00:00
Wouter Wijngaards
be4583ac84 - Fix that multiple dns fragments can be carried in one TLS frame.
git-svn-id: file:///svn/unbound/trunk@5043 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 13:41:13 +00:00
Wouter Wijngaards
dd19026e91 - Initial commit for out-of-order processing for TCP and TLS.
git-svn-id: file:///svn/unbound/trunk@5032 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-11 14:12:27 +00:00
Wouter Wijngaards
611e37aa2d (On the patch)
- make depend, yacc, lex, doc, headers.  And log the limit exceeded
  message only on high verbosity, so as to not spam the logs when
  it is busy.


git-svn-id: file:///svn/unbound/trunk@4841 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:48:49 +00:00
Wouter Wijngaards
586b811b87 - Patch to implement tcp-connection-limit from Jim Hague (Sinodun).
This limits the number of simultaneous TCP client connections
  from a nominated netblock.
And a simple test for TCP connection limit.


git-svn-id: file:///svn/unbound/trunk@4835 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 11:57:42 +00:00
Wouter Wijngaards
1f148e632f remove unused variable
git-svn-id: file:///svn/unbound/trunk@4822 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 13:36:45 +00:00
Wouter Wijngaards
900cd200a2 more comments (from commit messages).
git-svn-id: file:///svn/unbound/trunk@4812 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:00:57 +00:00
Wouter Wijngaards
e3f08cb2a2 - Implement progressive backoff of TCP idle/keepalive timeout.
git-svn-id: file:///svn/unbound/trunk@4806 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:20:15 +00:00
Wouter Wijngaards
3dbdde7fed - Add edns-tcp-keepalive and edns-tcp-keepalive timeout options
and implement option in client responses.


git-svn-id: file:///svn/unbound/trunk@4804 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:18:34 +00:00
Wouter Wijngaards
007123ee2c - Sort out test runs when the build directory isn't the project
root directory.
- Add config tcp-idle-timeout (default 30s). This applies to
  client connections only; the timeout on TCP connections upstream
  is unaffected.


git-svn-id: file:///svn/unbound/trunk@4802 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:15:12 +00:00
Wouter Wijngaards
6792d2d036 - Fix windows tcp and tls spin on events.
git-svn-id: file:///svn/unbound/trunk@4696 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-28 12:30:34 +00:00
Wouter Wijngaards
d32fb26adb - Fix close events for tcp only.
git-svn-id: file:///svn/unbound/trunk@4695 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-25 10:41:24 +00:00
Wouter Wijngaards
d4ba7731ad - Fix that tcp sticky events are removed for closed fd on windows.
git-svn-id: file:///svn/unbound/trunk@4694 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-25 10:02:06 +00:00
Wouter Wijngaards
261bf354b7 - Use accept4 to speed up incoming TCP (and TLS) connections,
available on Linux and FreeBSD.


git-svn-id: file:///svn/unbound/trunk@4686 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-23 13:55:09 +00:00
Wouter Wijngaards
16b6619dfa - Fix windows to not have sticky TLS events for TCP.
- Fix read of DNS over TLS length and data in one read call.


git-svn-id: file:///svn/unbound/trunk@4680 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-07 08:31:17 +00:00
Wouter Wijngaards
2be98b581a - Combine write of tcp length and tcp query for dns over tls.
git-svn-id: file:///svn/unbound/trunk@4601 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 08:10:25 +00:00
Wouter Wijngaards
5919273709 - Fix #3582: Squelch address already in use log when reuseaddr option
causes same port to be used twice for tcp connections.


git-svn-id: file:///svn/unbound/trunk@4559 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-05 15:45:34 +00:00
Wouter Wijngaards
9f88892190 - Fix nettle compile.
git-svn-id: file:///svn/unbound/trunk@4555 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 13:03:54 +00:00
Wouter Wijngaards
da06b1c76c auth zone review fixes
git-svn-id: file:///svn/unbound/trunk@4534 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 14:09:57 +00:00
Wouter Wijngaards
54bd1fdd62 - tls-cert-bundle option in unbound.conf enables TLS authentication.
git-svn-id: file:///svn/unbound/trunk@4532 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 10:35:09 +00:00
Wouter Wijngaards
d19f3c8c07 - auth zone url config.
git-svn-id: file:///svn/unbound/trunk@4525 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 16:11:27 +00:00
Wouter Wijngaards
427836884e auth zone http work.
git-svn-id: file:///svn/unbound/trunk@4524 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 15:14:51 +00:00
Wouter Wijngaards
1ad34fe7ae auth zone work.
git-svn-id: file:///svn/unbound/trunk@4523 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 14:37:36 +00:00
Wouter Wijngaards
ad89368b4e auth zone work.
git-svn-id: file:///svn/unbound/trunk@4521 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 11:59:30 +00:00
Wouter Wijngaards
5b41e86d51 auth zone review.
git-svn-id: file:///svn/unbound/trunk@4520 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 10:43:58 +00:00
Wouter Wijngaards
db766ce064 fix for doxygen and lint.
git-svn-id: file:///svn/unbound/trunk@4518 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 10:00:10 +00:00
Wouter Wijngaards
75eb720ab5 auth zone work on http feature.
git-svn-id: file:///svn/unbound/trunk@4517 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-07 16:10:31 +00:00
Wouter Wijngaards
6f88df1fc8 authzone work.
git-svn-id: file:///svn/unbound/trunk@4380 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-19 15:11:20 +00:00
Wouter Wijngaards
7d17a926ac - Spelling fixes, from Phil Porada.
git-svn-id: file:///svn/unbound/trunk@4344 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:29:28 +00:00
Wouter Wijngaards
ffc2f687cf - Fix to reclaim tcp handler when it is closed due to dnscrypt buffer
allocation failure.


git-svn-id: file:///svn/unbound/trunk@4309 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-22 13:40:44 +00:00
Wouter Wijngaards
f78e04a12c - Add an explicit type cast for TCP FASTOPEN fix.
git-svn-id: file:///svn/unbound/trunk@4205 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-06 07:59:32 +00:00
Wouter Wijngaards
401e456a17 - Fix fastopen EPIPE fallthrough to perform connect.
git-svn-id: file:///svn/unbound/trunk@4203 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-01 09:06:14 +00:00
Wouter Wijngaards
627299f5e4 - If MSG_FASTOPEN gives EPIPE fallthrough to try normal tcp write.
git-svn-id: file:///svn/unbound/trunk@4201 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-31 11:09:15 +00:00
Ralph Dolmans
89c2383c71 - Fix #1252: more indentation inconsistencies.
git-svn-id: file:///svn/unbound/trunk@4125 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-18 09:00:52 +00:00
Wouter Wijngaards
86f0baf146 - make depend, autoconf, remove warnings about statement before var.
git-svn-id: file:///svn/unbound/trunk@4066 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:09:06 +00:00
Wouter Wijngaards
7c9584e408 - #1217. DNSCrypt support, with --enable-dnscrypt, libsodium and then
enabled in the config file from Manu Bretelle.


git-svn-id: file:///svn/unbound/trunk@4065 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 14:55:31 +00:00
Wouter Wijngaards
41fccf9fe4 more helpful error message.
git-svn-id: file:///svn/unbound/trunk@3996 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-26 11:07:52 +00:00
Wouter Wijngaards
c010e93d4a - Fix to rename internally used types from _t to _type, because _t
type names are reserved by POSIX.
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3989 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 10:25:41 +00:00
Wouter Wijngaards
bf46530c5a - use sendmsg instead of sendto for TFO.
git-svn-id: file:///svn/unbound/trunk@3827 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-03 06:20:26 +00:00
Wouter Wijngaards
42f14e7c4d - Fix #802: workaround for function parameters that are "unused"
without log_assert.


git-svn-id: file:///svn/unbound/trunk@3823 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-22 07:05:52 +00:00
Wouter Wijngaards
5a03642d50 Fixup declaration after statement warning
git-svn-id: file:///svn/unbound/trunk@3816 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 11:17:38 +00:00
Wouter Wijngaards
95e9dff362 - TCP Fast open patch from Sara Dickinson.
git-svn-id: file:///svn/unbound/trunk@3814 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 07:06:34 +00:00
Wouter Wijngaards
61b9ea24a8 - Fix tcp timeouts in tv.usec.
git-svn-id: file:///svn/unbound/trunk@3795 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-16 07:21:07 +00:00
Wouter Wijngaards
c9495c33a7 - If more than half of tcp connections are in use, a shorter timeout
is used (200 msec, vs 2 minutes) to pressure tcp for new connects.


git-svn-id: file:///svn/unbound/trunk@3794 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-15 14:41:23 +00:00
Wouter Wijngaards
2121961929 - TCP_TIMEOUT is specified in milliseconds.
git-svn-id: file:///svn/unbound/trunk@3793 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-15 14:23:43 +00:00
Wouter Wijngaards
3bcb955a07 - Fix libev usage of dispatch return value.
git-svn-id: file:///svn/unbound/trunk@3668 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 12:57:09 +00:00
Wouter Wijngaards
6a6cf23179 - Fixup backend2str for libev.
git-svn-id: file:///svn/unbound/trunk@3660 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 14:39:48 +00:00
Willem Toorop
e82aa87a2b One review comment and something I forgot :-(
git-svn-id: file:///svn/unbound/branches/ub_event@3648 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 16:01:09 +00:00
Willem Toorop
bcfbe0d9c4 User defined pluggable event mechanism (for review)
git-svn-id: file:///svn/unbound/branches/ub_event@3647 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 14:10:06 +00:00
Wouter Wijngaards
9eeb489243 - wait for sendto to drain socket buffers when they are full.
git-svn-id: file:///svn/unbound/trunk@3624 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-15 09:54:52 +00:00
Wouter Wijngaards
01d063c38b - Made netbsd sendmsg test nonfatal, in case of false positives.
git-svn-id: file:///svn/unbound/trunk@3610 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-27 07:44:47 +00:00
Wouter Wijngaards
5032f79224 - fix netbsd interface_automatic complain about unimplemented.
git-svn-id: file:///svn/unbound/trunk@3609 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 16:14:28 +00:00
Wouter Wijngaards
303fbcdc47 - Fix cmsg alignment for argument to sendmsg on NetBSD.
git-svn-id: file:///svn/unbound/trunk@3608 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 14:11:39 +00:00
Wouter Wijngaards
6484f6b9b8 - Squelch 'cannot assign requested address' log messages unless
verbosity is high, it was spammed after network down.


git-svn-id: file:///svn/unbound/trunk@3602 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-19 15:37:54 +00:00
Wouter Wijngaards
40c0bbf371 - Fix #660: Fix interface-automatic broken in the presence of
asymmetric routing.


git-svn-id: file:///svn/unbound/trunk@3383 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-02 10:02:01 +00:00
Wouter Wijngaards
b2bdce46be - rename ldns subdirectory to sldns to avoid name collision.
git-svn-id: file:///svn/unbound/trunk@3380 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 10:21:38 +00:00
Wouter Wijngaards
b87e7c90be - stats reports tcp usage, of incoming-num-tcp buffers.
git-svn-id: file:///svn/unbound/trunk@3353 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-05 15:23:14 +00:00
Wouter Wijngaards
8ccba42b1f - dnstap support, with a patch from Farsight Security, written by
Robert Edmonds. The --enable-dnstap needs libfstrm and protobuf-c.
  It is BSD licensed (see dnstap/dnstap.c).
  Building with --enable-dnstap needs pkg-config with this patch.
- Noted dnstap in doc/README and doc/CREDITS.


git-svn-id: file:///svn/unbound/trunk@3206 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-05 07:57:52 +00:00
Wouter Wijngaards
c19f818c52 - Fix #545: improved logging, the ip address of the error is printed
on the same log-line as the error.


git-svn-id: file:///svn/unbound/trunk@3112 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 14:40:20 +00:00
Matthijs Mekking
492a5ca681 only whitespace changes
git-svn-id: file:///svn/unbound/trunk@3088 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 13:54:19 +00:00
Wouter Wijngaards
2b90f38a70 And fix #551 REGENT to COPYRIGHT HOLDER in license in file headings.
git-svn-id: file:///svn/unbound/trunk@3079 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 13:28:39 +00:00
Wouter Wijngaards
361cc1f511 - made lint clean.
git-svn-id: file:///svn/unbound/trunk@3050 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 13:23:45 +00:00
Wouter Wijngaards
d3cbd76546 - Fix sldns to use sldns_ prefix for all ldns_ variables.
git-svn-id: file:///svn/unbound/trunk@3022 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 09:11:16 +00:00
Wouter Wijngaards
29e96e86c9 - separate ldns into core ldns inside ldns/ subdirectory. No more
--with-ldns is needed and unbound does not rely on libldns.


git-svn-id: file:///svn/unbound/trunk@2998 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:09:26 +00:00
Wouter Wijngaards
253d425ca8 - unbound-event.h is installed if configured --with-libevent. It
contains low-level library calls, that use libevent's event_base
  and an ldns_buffer for the wire return packet to perform async
  resolution in the client's eventloop.


git-svn-id: file:///svn/unbound/trunk@2970 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-26 08:34:14 +00:00
Wouter Wijngaards
f1fd2b53eb - Fix for 2038, with time_t instead of uint32_t.
git-svn-id: file:///svn/unbound/trunk@2939 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-20 12:23:42 +00:00
Wouter Wijngaards
18e488ec5d - Squelch sendto-permission denied errors when the network is
not connected, to avoid spamming syslog.


git-svn-id: file:///svn/unbound/trunk@2915 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-25 07:03:03 +00:00
Wouter Wijngaards
dc7d75bbed includes for compile with event2.
git-svn-id: file:///svn/unbound/trunk@2854 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-22 15:24:02 +00:00
Wouter Wijngaards
f2dc71b465 more header change for nss.
git-svn-id: file:///svn/unbound/trunk@2831 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-30 15:35:23 +00:00
Wouter Wijngaards
f37bd4f2ce - compile libunbound with libnss on Suse, passes regression tests.
git-svn-id: file:///svn/unbound/trunk@2710 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-04 12:33:32 +00:00
Wouter Wijngaards
42e23da129 Fix compilation without SSL.
git-svn-id: file:///svn/unbound/trunk@2698 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-22 09:11:41 +00:00
Wouter Wijngaards
ccf4099366 - work on --with-nss build option (for now, --with-libunbound-only).
git-svn-id: file:///svn/unbound/trunk@2690 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-20 15:11:53 +00:00
Wouter Wijngaards
6819016a83 fix warning
git-svn-id: file:///svn/unbound/trunk@2665 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-08 13:03:25 +00:00
Wouter Wijngaards
13a839d624 - Fix for accept spinning reported by OpenBSD.
git-svn-id: file:///svn/unbound/trunk@2663 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-08 12:08:55 +00:00
Wouter Wijngaards
57199f80c9 - Fix from code review, if EINPROGRESS not defined chain if statement differently.
git-svn-id: file:///svn/unbound/trunk@2636 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-28 15:06:59 +00:00
Wouter Wijngaards
9429092966 - Fix to squelch 'network unreachable' errors from tcp connect in
logs, high verbosity will show them.


git-svn-id: file:///svn/unbound/trunk@2634 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-23 09:01:46 +00:00
Wouter Wijngaards
e789dac9a1 - RT#2955. Fix for cygwin compilation.
git-svn-id: file:///svn/unbound/trunk@2617 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-13 10:42:22 +00:00
Wouter Wijngaards
a1c76554a2 - Makefile changed for BSD make compatibility.
git-svn-id: file:///svn/unbound/trunk@2544 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-10 18:44:06 +00:00
Wouter Wijngaards
a08cf3c4e5 fixup windows compile with ssl support.
git-svn-id: file:///svn/unbound/trunk@2540 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-08 14:27:16 +00:00
Wouter Wijngaards
115c36a94e support for ssl-upstream (works from unbound-control).
git-svn-id: file:///svn/unbound/trunk@2532 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 09:26:58 +00:00
Wouter Wijngaards
aa0536dcb5 - dns over ssl support, ssl-service-pem and ssl-service-key files
can be given and then TCP queries are serviced wrapped in SSL.


git-svn-id: file:///svn/unbound/trunk@2530 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-31 14:48:48 +00:00
Wouter Wijngaards
30602d5d59 - defense in depth against the above bug, an error is printed to log
instead of an assertion failure.


git-svn-id: file:///svn/unbound/trunk@2420 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-25 11:32:05 +00:00
Wouter Wijngaards
f8796f94f4 squelch 'tcp connect: bla' errors in logfile.
git-svn-id: file:///svn/unbound/trunk@2354 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-17 09:10:46 +00:00
Wouter Wijngaards
e430e8cef8 errno filtering better: sendto and sendmsg filtered in the same way. Also
ENETDOWN and ENETUNREACH for tcp (already had EHOSTDOWN and EHOSTUNREACH).


git-svn-id: file:///svn/unbound/trunk@2343 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 14:00:20 +00:00
Wouter Wijngaards
c9dbc9907a - silence 'tcp connect: broken pipe' at low verbosity.
git-svn-id: file:///svn/unbound/trunk@2341 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 13:15:23 +00:00
Wouter Wijngaards
98c4161631 code review.
git-svn-id: file:///svn/unbound/trunk@2327 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-02 10:03:18 +00:00
Wouter Wijngaards
fcf1157fa4 - Configure detects libev-4.00.
git-svn-id: file:///svn/unbound/trunk@2322 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-29 15:03:20 +00:00
Wouter Wijngaards
e5e0a1c857 Fix compile warning on mingw.
git-svn-id: file:///svn/unbound/trunk@2295 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-15 09:43:54 +00:00
Wouter Wijngaards
9d66b48885 - openbsd-lint fixes: acl_list_get_mem used if debug-alloc enabled.
iterator get_mem includes priv_get_mem.  delegpt nodup removed.
  listen_pushback, query_info_allocqname, write_socket, send_packet,
  comm_point_set_cb_arg and listen_resume removed.


git-svn-id: file:///svn/unbound/trunk@2222 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-20 13:30:41 +00:00
Wouter Wijngaards
f042f0dd5d - Neat function prototypes, unshadowed local declarations.
git-svn-id: file:///svn/unbound/trunk@2188 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-07 13:13:36 +00:00
Wouter Wijngaards
afc09709ad libev vs libevent printout.
git-svn-id: file:///svn/unbound/trunk@2160 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-22 07:57:52 +00:00
Wouter Wijngaards
6070d61076 - Fix TCPreply on systems with no writev, if just 1 byte could be sent.
git-svn-id: file:///svn/unbound/trunk@2149 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 09:40:36 +00:00
Wouter Wijngaards
109fbe2350 - Squelch log message: sendto failed permission denied for
255.255.255.255, it is visible in VERB_DETAIL (verbosity 2).


git-svn-id: file:///svn/unbound/trunk@2088 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 06:48:49 +00:00
Wouter Wijngaards
1085e72135 portability of CMSG_SPACE
git-svn-id: file:///svn/unbound/trunk@2081 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-16 08:41:08 +00:00
Wouter Wijngaards
6fb53c7c93 fix p_ancil
git-svn-id: file:///svn/unbound/trunk@2043 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 15:20:40 +00:00
Wouter Wijngaards
5dd34e6145 Check for SENDSRCADDR socket option.
git-svn-id: file:///svn/unbound/trunk@2041 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 15:11:58 +00:00
Wouter Wijngaards
50336bddbe Fix interface automatic to work for ipv6 on openbsd.
git-svn-id: file:///svn/unbound/trunk@2039 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 08:37:50 +00:00
Wouter Wijngaards
147d47eee7 Move includes to code files.
git-svn-id: file:///svn/unbound/trunk@2035 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 15:17:48 +00:00
Wouter Wijngaards
e8e24d3810 reopen and move of get_option to util.
git-svn-id: file:///svn/unbound/trunk@1989 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-18 16:40:22 +00:00
Wouter Wijngaards
ca9c1fa2a8 libevent-2.0 compatibility.
git-svn-id: file:///svn/unbound/trunk@1817 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 13:29:11 +00:00
Wouter Wijngaards
f1bd145b60 ignore transient sendto conditions.
git-svn-id: file:///svn/unbound/trunk@1731 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-20 08:35:13 +00:00
Wouter Wijngaards
43d9c09372 crosscompile with mingw32 works.
git-svn-id: file:///svn/unbound/trunk@1722 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-14 14:44:53 +00:00
Wouter Wijngaards
578c1632ce Windows handle leakage fixes: closesocket or else the networkstack leaks handles (for ever, even after closing the application), and use own mutex implementation (whee!).
git-svn-id: file:///svn/unbound/trunk@1622 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-29 15:23:08 +00:00