Oto Šťáva [Wed, 31 Jul 2024 12:16:33 +0000 (14:16 +0200)]
daemon/proxyv2: fix client TCP/TLS + merge state structs
Firstly, this adds a missing assignment of `comm->proxy`, which would
cause the resolver not to know that a client asked via TCP/TLS, if the
proxy also asked via TCP/TLS.
Secondly, it merges `struct pl_proxyv2_sess_data` and
`struct pl_proxyv2_iter_data` into a single `struct pl_proxyv2_state`,
since they were practically the same. And it adds a bit of documentation
to the struct.
Oto Šťáva [Fri, 2 Aug 2024 13:43:04 +0000 (15:43 +0200)]
bench/bench_lru: make it build again, and check it in CI
It's not too important, but I just stumbled upon this and it looked like
nobody has touched it in a long time. Since it's not completely broken
(the fix is trivial), I decided to fix it and add it to CI to ensure
that we can still build it. Maybe `lru` will be used some more at some
point again in the future...
manager: secret for TLS session resumption via ticket
Create and set a secret for TLS session resumption via ticket that is the same for all running 'kresd' workers. This secret is only created if the user has not configured the secret themselves.
Vladimír Čunát [Mon, 22 Jul 2024 15:39:41 +0000 (17:39 +0200)]
release 6.0.8
NEWS changes:
- collect missing items
- reduce newlines; we'd need to change the layout around
- improve a link
- add packaging information
- move some things around a bit
Vladimír Čunát [Wed, 26 Jun 2024 13:05:54 +0000 (15:05 +0200)]
lib/rules: fix a bug in subnet computations
The problem mainly affected subnets not aligned on whole bytes,
but maybe also others. Reported:
https://lists.nic.cz/hyperkitty/list/knot-resolver-users@lists.nic.cz/message/6P2JPK72WMVLP45TDV42DTACEA2N5NW2/
I'm really sorry about this; no idea why I thought that the simple
multiplication would suffice.
Vladimír Čunát [Wed, 10 Jul 2024 16:15:35 +0000 (18:15 +0200)]
treewide nit: avoid NULL arithmetics
(u)intptr_t casts seem the best in terms of compliance:
https://stackoverflow.com/q/45220134/587396
Otherwise with clang 18 we can get warnings like
../$path:$line:$col: runtime error: applying non-zero offset $num to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../$path:$line:$col
Vladimír Čunát [Tue, 18 Jun 2024 08:24:17 +0000 (10:24 +0200)]
drop libknot 3.0.x support
- Upstream last maintained 3.0.x in summer 2022.
- Our packaging shouldn't be affected, neither the new one, nor OBS.
- If someone updates resolver, it shouldn't be too hard
to update libknot as well.
- Maintenance on resolver side still needed effort for kres-gen-30.lua
Aleš Mrázek [Fri, 17 May 2024 13:09:44 +0000 (15:09 +0200)]
manager: wait for 'policy-loader' to finish on the resolver startup
When starting the resolver, we wait for policy-loader until policy rules are successfully loaded into the cache where the rules are shared between kred workers. After that, other processes are started. Otherwise, the workers might start without the configured rules in the cache while they are already resolving DNS traffic.
Vladimír Čunát [Tue, 14 May 2024 09:03:59 +0000 (11:03 +0200)]
lib/rules: tweak how the read-only transactions work
Let's avoid reloading the RO transaction unless necessary.
For example, when normal config reload happens (one kresd at a time),
we most likely do *not* want to reload the rule DB prematurely.
Oto Šťáva [Tue, 18 Jun 2024 15:18:37 +0000 (17:18 +0200)]
daemon: use __attribute__((constructor)) for protolayer_globals
The `protolayer_globals` array can basically be treated as a constant by
most of the program and its initialization only uses compile-time-known
values. We basically only initialize parts of the array in different
files throughout the codebase to maintain separation of concerns, so
that each piece of Knot Resolver initializes the part that pertains to
it. Therefore, I believe that it is more ergonomic to just use
`__attribute__((constructor))` for these functions, so as not to pollute
`daemon/main.c` with these calls.
Jakub Ružička [Tue, 11 Jun 2024 16:19:39 +0000 (18:19 +0200)]
distro/pkg/deb: remove undefined shlib:Depends
This addresses dpkg-gencontrol warnings:
dpkg-gencontrol: warning: Depends field of package knot-resolver6-module-http: substitution variable ${shlibs:Depends} used, but is not defined
dpkg-gencontrol: warning: Depends field of package knot-resolver6-dev: substitution variable ${shlibs:Depends} used, but is not defined