Commit graph

2126 commits

Author SHA1 Message Date
W.C.A. Wijngaards
adaf5dab49 - Fix that https is set up as enabled when the port is listed in
interface-automatic-ports. Also for the set up of quic it is
  enabled when listed there.
2025-10-02 10:16:06 +02:00
W.C.A. Wijngaards
feeebc95f8 - Fix for #1344: Fix that respip and dns64 can be enabled at the
same time, the client info is copied for attach_sub and add_sub
  calls. That makes respip work on dns64 synthesized answers, and
  also makes RPZ work with DNS64. The order for the modules is
  module-config: "respip dns64 validator iterator".
2025-09-30 11:28:15 +02:00
Yorgos Thessalonikefs
499a3a7a61
Fix #1346: [FR] Please allow back TLS 1.2. (#1349)
* 'tls-use-system-policy-versions' is introduced to allow Unbound to use
  any system available TLS version when serving TLS.

* Apply suggestions from code review

---------

Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2025-09-29 12:03:56 +02:00
Yorgos Thessalonikefs
35f6fd47fb - Test for nonstring attribute in configure and add
nonstring attribute annotations.
2025-09-26 16:23:55 +02:00
Yorgos Thessalonikefs
e2bf773089 Merge branch 'features/no-ttl-zero-cacherep' 2025-09-19 14:56:04 +02:00
Yorgos Thessalonikefs
bc61034f60
code review: use proper roundrobin index
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2025-09-17 12:19:20 +02:00
Yorgos Thessalonikefs
2dd821c257 - Too many quotes for the EDE message debug printout. 2025-09-17 11:27:16 +02:00
Yorgos Thessalonikefs
c3a8d5251f - Small debug output improvement when attaching an EDE. 2025-09-15 12:06:49 +02:00
Yorgos Thessalonikefs
73e408f1d0 A few changes for TTL processing:
- Cached messages that reach 0 TTL are considered expired. This prevents
  Unbound itself from issuing replies with TTL 0 and possibly causing a
  thundering herd at the last second. Upstream replies of TTL 0 still
  get the usual pass-through but they are not considered for caching
  from Unbound or any of its caching modules.
- 'serve-expired-reply-ttl' is changed and is now capped by the original
  TTL value of the record to try and make some sense when replying
  with expired records.
- TTL decoding was updated to adhere to RFC8767 section 4 where a set
  high-order bit means the value is positive instead of 0.
2025-09-15 10:03:35 +02:00
Yorgos Thessalonikefs
d521135f66 Merge branch 'master' into features/no-ttl-zero-cacherep 2025-09-12 15:24:06 +02:00
W.C.A. Wijngaards
85e916e7e0 - Fix indentation in tcp-mss option parsing. 2025-09-02 17:12:14 +02:00
W.C.A. Wijngaards
af96824642 - Fix #1324: Memory leak in 'msgparse.c' in
'parse_edns_options_from_query(...)'.
2025-09-02 17:10:42 +02:00
Yorgos Thessalonikefs
44da5eee66 - Limit the number of consecutive reads on an HTTP/2 session.
Thanks to Gal Bar Nahum for exposing the possibility of infinite
  reads on the session.
2025-08-29 15:35:32 +02:00
W.C.A. Wijngaards
ebfa09e04f - For #1318: Fix compile warnings for DoH compile on windows. 2025-08-22 10:04:00 +02:00
W.C.A. Wijngaards
752a3f7f52 - Fix to whitespace in dname_str. 2025-08-07 16:19:10 +02:00
W.C.A. Wijngaards
08d59c9a78 - Fix dname_str for printout of long names. Thanks to Jan Komissar
for the fix.
2025-08-07 09:45:02 +02:00
W.C.A. Wijngaards
3d7e847a5e - Fix to use assertions for consistency checks in #1309 reclaimed 2025-08-05 16:20:01 +02:00
W.C.A. Wijngaards
da6b735ed9 - Fix #1309: incorrectly reclaimed tcp handler can cause data
corruption and segfault.
2025-08-05 15:46:54 +02:00
W.C.A. Wijngaards
910288c0d1 - iana portlist updated. 2025-07-17 14:50:29 +02:00
W.C.A. Wijngaards
b6e52c0a52 - Fix #1303: [FR] Disable TLSv1.2. 2025-07-17 14:50:13 +02:00
W.C.A. Wijngaards
9fe92d1119 - Fix detection of SSL_CTX_set_tmp_ecdh function. 2025-07-11 15:47:59 +02:00
W.C.A. Wijngaards
1de9d6ec66 - Fix layout of comm_point_udp_ancil_callback. 2025-07-03 15:57:49 +02:00
W.C.A. Wijngaards
cb919d5126 - For #1300: implement sock-queue-timeout for FreeBSD as well. 2025-07-03 15:54:33 +02:00
Jose Luis Duran
41c55ffac1
Fix typos (#1299) 2025-07-02 10:50:49 +02:00
Yorgos Thessalonikefs
9201c75013 - Fix for consistent use of local zone CNAME alias for configured auth
zones. Now it also applies to downstream configured auth zones.
2025-06-17 15:03:29 +02:00
W.C.A. Wijngaards
e4cf7aeccf - Fix header return value description for skip_pkt_rrs and
parse_edns_from_query_pkt.
2025-06-12 12:17:01 +02:00
W.C.A. Wijngaards
a8aa1dbbe1 - Fix conditional expressions with parentheses for bitwise and. 2025-06-11 16:42:43 +02:00
W.C.A. Wijngaards
9f29292839 - Fix bitwise operators in conditional expressions with parentheses. 2025-06-11 15:46:31 +02:00
W.C.A. Wijngaards
1cc1e0b89e - iana portlist updated. 2025-06-05 11:11:56 +02:00
W.C.A. Wijngaards
565bce670c - Fix comment for the dname_remove_label_limit_len function. 2025-06-05 11:11:32 +02:00
W.C.A. Wijngaards
ff7dfd52a2 - Fix #1288: [FR] Improve fuzzing of unbound by adapting the netbound
program.
2025-05-21 12:41:54 +02:00
W.C.A. Wijngaards
1ef7b4a246 - Adjusted so-sndbuf default to 4m. 2025-05-13 15:31:05 +02:00
W.C.A. Wijngaards
03772d10fb - Change default for so-sndbuf to 1m, to mitigate a cross-layer
issue where the UDP socket send buffers are exhausted waiting
  for ARP/NDP resolution. Thanks to Reflyable for the report.
2025-05-13 15:04:32 +02:00
Yorgos Thessalonikefs
9152c914af - Fix #1282: log-destaddr fail on long ipv6 addresses. 2025-05-13 11:02:58 +02:00
W.C.A. Wijngaards
21e3278400 - Fix #1283: Unsafe usage of atoi() while parsing the configuration
file.
2025-05-12 14:57:42 +02:00
Yorgos Thessalonikefs
4e23523d1a
Fix auth nsec3 code (#1280)
- Fix NSEC3 code to not break on broken auth zones that include unsigned
  out of zone (above apex) data. Could lead to hang while trying to
  prove a wildcard answer.
  Reported by Dmitrii Kuvaiskii from Amazon Web Services.

- Tests for NSEC3 auth zones with out of zone data.
2025-05-12 14:26:47 +02:00
Yorgos Thessalonikefs
fcc21885e4
Auto-configure '-slabs' values (#1276)
- Auto-configure '-slabs' values to a power of 2 value close to num-threads
  by default for multi-threaded environments.

Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2025-04-29 15:21:47 +02:00
W.C.A. Wijngaards
db53ebb798 Merge branch 'branch-1.23.0' 2025-04-24 10:14:02 +02:00
W.C.A. Wijngaards
fe835f9d52 - Increase default to num-queries-per-thread: 2048, when unbound is
compiled with libevent. It makes saturation of the task queue more
  resource intensive and less practical. Thanks to Shiming Liu,
  Network and Information Security Lab, Tsinghua University for the
  report.
2025-04-16 12:03:08 +02:00
Yorgos Thessalonikefs
d6e8ac1289 Fix WSAPoll (#1265)
* Fix calling WSAPoll.

* fast_reload: explicitly set tcp_wouldblock on Windows when there is no
  command to read from the fast_reload thread.

* For poll(), also check for ENOMEM (Linux).

* Remove ifdefs for ENOMEM.
* Some systems return EAGAIN for poll.
2025-04-11 15:09:07 +02:00
Yorgos Thessalonikefs
75e8fd7539
Fix WSAPoll (#1265)
* Fix calling WSAPoll.

* fast_reload: explicitly set tcp_wouldblock on Windows when there is no
  command to read from the fast_reload thread.

* For poll(), also check for ENOMEM (Linux).

* Remove ifdefs for ENOMEM.
* Some systems return EAGAIN for poll.
2025-04-11 15:05:52 +02:00
W.C.A. Wijngaards
16ee7cf944 - Fix for print of connection type in log-replies for dot and doh. 2025-04-10 09:33:51 +02:00
W.C.A. Wijngaards
4f06e658d1 - Fix #1264: unbound 1.22.0 leaks memory when doing DoH. 2025-04-09 14:13:58 +02:00
Willem Toorop
a616437338
DNS Error Reporting (RFC 9567) (#902)
* v1 EDER poc

* remove superfluous edns_list_get_option function

* create an EDER configurable

* Hackathon 114

* Fixes for version -04

* Generated configparser and configlexer are not versioned in master anymore

* Remove NOERROR DNS Error Reporting; not part of final RFC.
* Use assigned IANA EDNS0 Option Code for Report-Channel.

* Fix buffer protection and agent domain validity

* Use DNS Error Reporting instead of the eder nickname

* Update documentation.

* Fix typo.

* Bail out early if ede is not present.

* Forget previous EDNS options from upstream; this is what was
  implicitly happening but not deterministacally.

* Don't report LDNS_EDE_OTHER and bail early if there is no reporting
  agent.

* Only do DNS error reporting when a client asked for something that
  went wrong.

* Add an error reporting agent in the parent that should be ignored.

* review feedback.

* fixup for fast reload

* Add 'num.dns_error_reports' to stats and test for it.

---------

Co-authored-by: TCY16 <tom@nlnetlabs.nl>
Co-authored-by: Yorgos Thessalonikefs <yorgos@nlnetlabs.nl>
2025-04-07 10:25:10 +02:00
W.C.A. Wijngaards
0e5d26807d - Fix nettle compile for warnings and ticket keys. 2025-04-04 10:30:22 +02:00
Yorgos Thessalonikefs
90243a694a
Redis read-only replica support (#1019)
* Set version to 1.19.1 for point release.

* Initial work for Redis read-only replica support.

* Test for Redis replica.

* Documentation for the Redis replica timeouts.

* redis replica, rewrite set_timeout()

* clean merge.

* Add new options for fast reload.

* Apply suggestions from code review

Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>

* some more typos

---------

Co-authored-by: W.C.A. Wijngaards <wouter@nlnetlabs.nl>
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2025-04-04 10:20:47 +02:00
W.C.A. Wijngaards
cb5a019d9f - Fix parameter unused warning in net_help.c. 2025-04-03 15:21:16 +02:00
W.C.A. Wijngaards
9939d5cdb0 - Fix ub_event and include dnstap and win_svc headers. 2025-04-03 10:59:41 +02:00
W.C.A. Wijngaards
5f91d5f74c - Fix wait-limit-netblock and wait-limit-cookie-netblock config parse
to allow two arguments.
2025-04-03 09:53:27 +02:00
W.C.A. Wijngaards
ba18abcd35 - Fix that ub_event has the facility to deal with callbacks for
fast reload, doq, windows-stop and dnstap.
- Fix fast reload test to check if pid exists before acting on it.
2025-04-02 16:25:58 +02:00