summaryrefslogtreecommitdiff
path: root/sbin/unwind
AgeCommit message (Collapse)Author
2020-01-20We can not share a cache between validating and resolving strategies.Florian Obser
The resolving only strategies mess up the negative cache by claiming DNSSEC related records do not exist which confuses the validating strategies. Found the hard way by kn@ and analysed by otto@ OK kn@
2019-12-23Ralph Dolmans from nlnetlabs points out that libunbound usesFlorian Obser
ub_event_pluggable.c instead of ub_event.c. ( https://github.com/NLnetLabs/unbound/issues/99 ) We have been the odd one out, so switch to ub_event_pluggable, too.
2019-12-20Try to bind to port 53 before opening the control socket.Florian Obser
The bind might fail if another daemon is running while the control socket opening will succeed. Then we end up with an overwritten control socket, unwind exiting and no control socket to the already running unwind. Found the hard way by deraadt OK deraadt, mestre, kn, pamela
2019-12-18Workaround unbound github issue #99.Florian Obser
https://github.com/NLnetLabs/unbound/issues/99 ub_ctx_delete would free the passed in event_base leading to use-after-free since libunbound never allocated the memory and unwind expects to continue using the event_base.
2019-12-18Update to libunbound 1.9.6Florian Obser
Heavy lifting by sthen with updating in-tree unbound(8).
2019-12-18Implement unwindctl status memory to show chache memory usage.Florian Obser
testing by otto & pamela as part of a larger diff
2019-12-18Rework unified cache handling to be able to unify key and neg caches.Florian Obser
testing by otto & pamela as part of a larger diff
2019-12-18Use neg and key cache from the passed in environment if initialized so thatFlorian Obser
unwind can share caches between strategies. testing by otto & pamela as part of a larger diff
2019-12-15Make this fit in 80 cols.Florian Obser
2019-12-15Allow more outgoing ports, the default 16 is pretty tight for theOtto Moerbeek
recursor. Also change strategy to not fetch addresses of nameservers pro-actively, it does not help a lot in typical unwind setups and consumes resources we would like to spend on actual resolving user queries. ok florian@
2019-12-14Be less aggressive pre-allocating memory; ok florian@Otto Moerbeek
2019-12-14Simplify resolve_done.Florian Obser
- check if this is an answer to a still running query up front, if not there is nothing more to do - get rid of the retry case, we can now just inline it - reduce indent by always calculating elapsed time for DOUBT_NXDOMAIN_SEC Triggered by, input and OK otto
2019-12-14No use to create resolvers we know are going to be dead; ok florian@Otto Moerbeek
2019-12-13Don't try dead resolvers; ok florian@Otto Moerbeek
2019-12-13print type as type and not as rcodeOtto Moerbeek
2019-12-13Revert two files committed by accidentOtto Moerbeek
2019-12-13Avoid leaks by using the _buf versions of sldns_wire2str_* functions.Otto Moerbeek
Also add some consistentcy checking to detect logic errors. ok @florian
2019-12-12Only create (and check) resolvers listed in preferences.Florian Obser
Unfortunately this required a fair amount of deck chair shuffling. Input & OK otto
2019-12-11Plug leaks related to running queue maintenance. ok florian@Otto Moerbeek
2019-12-10Plug two mem leaks in udp_receive() and zap unneeded allocations;Otto Moerbeek
ok florian@
2019-12-10Similar to doubting NXDOMAIN when we just switched networks we alsoFlorian Obser
need to doubt validation errors as we might find ourselves behind a captive portal. The hotspot at schiphol airport uses login.hotspotschiphol.nl: - it is NXDOMAIN on the public internet - hotspotschiphol.nl is signed and attests that login does not exist. - resolves to 1.1.1.5(!) when asking the dhcp nameservers - the dhcp nameservers pass DNSSEC records so validation works This resulted in unwind doing validation and answering SERVFAIL since the answer is bogus. Input & OK otto
2019-12-08Limit advertised UDP payload size to 1232 bytes to prevent PMTU /Florian Obser
fragmentation issues. OK otto
2019-12-08More compact two column format for first section of status display; useOtto Moerbeek
* to mark opportunistic DoT forwarders; ok florian
2019-12-08Turn opportunistic DoT into their own strategies.Florian Obser
This is beneficial since we prefer strategies according to their performance. Previously name servers were upgraded to opportunistic DoT if it was available even if the round trip times went through the roof and there was no way to got back to plain udp/53 DNS. To make up a bit of space in the unwindctl status output, name servers learned via DHCP or SLAAC are printed in a new subcommand. The status output will be further improved shortly. Input & OK otto
2019-12-06Log why an answer is bogus.Florian Obser
OK otto
2019-12-06Use the middle of the histogram bar in the median computationsOtto Moerbeek
instead of the right-hand side; ok florian@
2019-12-06Stop fiddling with openlog / closelog in libunbound. unwind handlesFlorian Obser
this. We need to find a way to properly upstream this. OK otto
2019-12-05be less verbose in debug logging; ok florian@Otto Moerbeek
2019-12-05Tell a little bit how "preference" works these days; ok florian@Otto Moerbeek
2019-12-04When we detect that a resolver strategy is not validating because theFlorian Obser
time is wrong enable a timer to check it again later. ntpd might have corrected the time. input & OK otto
2019-12-04Use NI_MAXHOST like everywhere else instead of a wrong number.Florian Obser
2019-12-04If we see a validated result, we can (must!) assume the resolver isOtto Moerbeek
validating; ok florian@
2019-12-03Cleanup query logging.Florian Obser
Debug log level 1 gives us basic query progress, level 2 writes out packages. looks good to otto
2019-12-03Cleanup check_resolver_done() debug logging.Florian Obser
Log answer packet only at debug level 2. looks good to otto
2019-12-03Add one more debug level and enable very detailed libunbound loggingFlorian Obser
with this. Currently only available as a command line flag (-vvv). With this we now have two debug levels available in unwind proper, to be used shortly. looks good to otto
2019-12-03No need to store "why_bogus" with the resolver, we are no longerFlorian Obser
showing it in unwindctl. But log it with level warn for check_resolver so that one can find out what's wrong with a resolver strategy. looks good to otto
2019-12-03Remove useless log_debug() calls.Florian Obser
Looks good to otto
2019-12-03No more status subcommands; ok florian@Otto Moerbeek
2019-12-02Save the computed median to avoid having it to compute it all the time;Otto Moerbeek
ok florian@
2019-12-02Use a unified cache in all libunbound based resolvers.Florian Obser
OK otto
2019-12-02increment refcount before doing the call to resolve(); ok florian@Otto Moerbeek
2019-12-02Add an "all" mode for status and a much more compact and readable histogramOtto Moerbeek
display; remove the why bogus status message; ok florian@
2019-12-01Add missing space between "accept" and "bogus"kn
2019-12-01Allow forcing specific domains to be resolved by specific resolvers;Otto Moerbeek
Handles typical split-horzizon setups. ok florian@
2019-11-30make sure we only pass normalized timevals for the next resolver interval;Otto Moerbeek
ok florian@
2019-11-30Not being able to create a resolver is not a fatal condition in unwind,Florian Obser
there might be others still working. Make sure check_resolver() handles this correctly.
2019-11-29Don't hand-roll TAILQ_CONCAT in a slow way.Florian Obser
Pointed out by & OK otto
2019-11-29While we learn how the "decaying" histogram works it's helpful to showFlorian Obser
it in unwindctl status output next to the all time histogram.
2019-11-28The happy eyeballs code computes a median to assess how well aOtto Moerbeek
resolver is doing. But circumstances can change, so decay the histogram data over time to slowly forget about that past. Uses fixed point arithmetic to avoid floating point. ok florian@
2019-11-28No more example file; ok florian@Otto Moerbeek