summaryrefslogtreecommitdiff
path: root/sbin/unwind
AgeCommit message (Collapse)Author
2024-06-30Clearify "force" and "preference" interaction.Florian Obser
Problem reported by Kirill A. Korinsky OK kn
2024-06-29Disable the shared cache between resolvers for now.Florian Obser
Since the latest libunbound update the frontend process would segfault about once a day on one of my MX servers with what looks like a use-after-free deep inside of libunbound. Maybe we are poking too much at internals and the shared cache is too much of a hack. #ifdef for now to ease investigation, but it is possible that this code just has to go.
2024-06-14sync to unbound 1.20.0Florian Obser
heavy lifting by sthen
2024-05-21remove prototypes with no matching function and externs with no varJonathan Gray
partly checked by millert@
2024-05-10Keep probing upstream servers.Florian Obser
(lib)unbound might mark many servers down in case of a network issue. This is something that can easily happen for unwind(8). Problem pointed out by Kirill A. Korinsky in unbound(8). https://github.com/NLnetLabs/unbound/issues/362 OK sthen
2024-05-09ctime(3) and ctime_r(3) can fail when timestamps are way off.Florian Obser
Add missing error checks to all calls under sbin/ Input kettenis, millert OK millert
2024-04-28gmtime(3) / locatime(3) can fail when timestamps are way off.Florian Obser
Add missing error checks to all calls under sbin/ Input & OK millert
2024-04-13sync to unbound 1.19.3Florian Obser
heavy lifting by & OK sthen
2024-02-25Let some missing missing RFC 1918 reverse zones through.Florian Obser
Problem spotted and diff from Einfach Jemand (rru.142 at gmail), thanks! OK phessler, jca
2024-02-13Fix for CVE-2023-50387 and CVE-2023-50868.Florian Obser
Both can be used to cause high CPU load and potentially denial of service with specifically crafted DNSSEC responses. This is a sync with unbound(8).
2023-12-14Use imsg_get_fd() to access the fd passed with the imsg.Claudio Jeker
Go ahead florian@ OK tb@
2023-09-15Improve handling of ENOBUFS by not running in a tight loop forever.Florian Obser
This cherry-picks upstream git commit 0ee44ef384593ed0382d1ce6048d5a9c9440b45c. Issue reported by landry@, which could be traced back to a buggy WiFi driver that would constantly return ENOBUFS. This in turn lead unwind(8) enter a tight loop through poll / sendto without making any progress and burning 100% cpu. OK sthen I missed to commit this file when commiting to unbound. Pointed out by tb, thanks!
2023-09-14satisfy non-c99 compilersTheo de Raadt
2023-09-12Revert accidentally committed debugging codeTheo Buehler
confirmed by florian
2023-09-11Improve handling of ENOBUFS by not running in a tight loop forever.Florian Obser
This cherry-picks upstream git commit 0ee44ef384593ed0382d1ce6048d5a9c9440b45c. Issue reported by landry@, which could be traced back to a buggy WiFi driver that would constantly return ENOBUFS. This in turn lead unwind(8) enter a tight loop through poll / sendto without making any progress and burning 100% cpu. OK sthen
2023-09-05Fix indentation, found with -Wmisleading-indentation.Florian Obser
Already commited upstream.
2023-09-05Prevent warnings from -Wmissing-prototypesFlorian Obser
https://github.com/NLnetLabs/unbound/pull/931
2023-09-05Fix built.Florian Obser
The api changed to handle cookies and extended error codes. Passing in NULL for config_file disables cookie handling so we do not need to pass a valid comm_reply, NULL will do.
2023-09-05sync to unbound 1.18.0; heavy lifting by sthenFlorian Obser
2023-04-30avoid use after freeJonathan Gray
ok florian@
2023-04-18If rcode is SERVFAIL, there is no need to look at the packet.Florian Obser
This pulls the check for rcode up, before we check if the answer packet has sensible length. Since we are not touching the packet at all, we don't care about the size and don't need to log if the size is wrong from a DNS perspective. With asr error reporting improved in the previous commit, this probably gets rid of all "bad packet: too short" messages. OK semarie
2023-04-18Improve asr error handling.Florian Obser
When an upstream nameserver is not available asr is not synthesizing a SERVFAIL rcode (duh), but sets ar_errno. When we need SERVFAIL further down,we need to set the rcode ourselves. While here, don't complain about a too short packet when asr already told us that resolving did not work out in check_dns64_done. OK semarie
2023-02-21some nameserver proposal bits:Jason McIntyre
unwind.8: point to resolvd(8) for autoconf sources unwind.conf.5: order preferred list by order of preference resolvd.8: reformat to read better route.8: no need to discuss unwind in the nameserver command umb.4 + sppp.4: note the sending of nameserver proposals the umb/sppp text is from claudio tobhe confirmed iked sending proposals when configured to do so much assistance and ok: florian claudio
2023-02-15Use correct order of arguments for shutdown(2).Florian Obser
Luckily routesock would never be <= 2 so shutdown would always failing with EINVAL and not shutting down random other sockets. The kernel was just uselessly piling up route messages that we were never reading. This mistake first showed up in slaacd(8) and then was copied to the other daemons. Reported & fixed by Josiah Frentsos (jfrent at tilde.team), thanks! OK kn
2023-02-08unwind: add two missing void to function definitionsTheo Buehler
Silences -Wstrict-prototype warnings seen with clang 15 on amd64 and arm64. ok florian
2023-02-07home.arpa is a special-use domain, internally answered by libunbound.Florian Obser
Let it through to forwarders like we do with AS112 domains because home.arpa might be useful in the local network. Issue reported by Ryan Kavanagh (rak at rak.ac), thanks! Input & OK tb
2023-01-03do not mention dhclient as a dhcp route message senderTheo de Raadt
2022-11-29Ignore late check results for resolvers we no longer use.Florian Obser
Since we no longer use that specific resolver there is also no need to re-check it. tb pointed out that prev_state might be used uninitialized in this case. OK tb
2022-11-27Plug leak of tmp in case allocation of pq->abuf failsTheo Buehler
ok florian
2022-11-27KNF nit: place brace correctlyTheo Buehler
ok florian
2022-11-25Do not crash when a tcp query is larger than the length fieldAlexander Bluhm
indicated. Found by kn with amap. Input bluhm. OK deraadt, tb, otto, kn from florian@
2022-11-13Sync config.h, we have ed25519 support now.Florian Obser
2022-10-22sync to unbound 1.17.0; heavy lifting by sthenFlorian Obser
2022-09-23Sync to libunbound 1.16.3Florian Obser
2022-08-30sync to libunbound 1.16.2; heavy lifting by sthenFlorian Obser
2022-08-29Dynamically link these /sbin daemons: dhcpleased, mountd, nfsd, pflogd,Theo de Raadt
resolvd, slaacd, unwind. The mitigation story is way better: syscalls are in a randomly located libc, and every syscall stub is randomly located inside that due to random relinking. As opposed to fixed offset inside a release binary. There is one known consequence: /usr nfs mounting must use statically configured IP addresses. ok kettenis florian, others
2022-06-18sync to libunbound 1.16.0; heavy lifting by sthenFlorian Obser
2022-06-18We were a bit too enthusiastic when we copied libunbound and some otherFlorian Obser
helper functions from unbound(8). Delete unused shared memory functions that the unbound(8) daemon uses for statistics gathering. While here get rid of daemon.h which is unused, too. With this we can remove the hack in config.h to pretend we don't have shmget to prevent linker errors which makes syncing with unbound(8) easier.
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-03-13parse_packet() is used by unbound to parse response packets, notFlorian Obser
queries. There is no need to do all this work just to get access to the query id and flags. OK bket, sthen
2022-03-12Probe for DNS64 presence with an absolute name so that asr doesn't addFlorian Obser
search domains and retry.
2022-03-03Use LDNS_RCODE define; no functional changeFlorian Obser
2022-03-01Update to libunbound 1.15.0; heavy lifting by sthen in unbound(8).Florian Obser
Upstream renamed parse_edns_from_pkt to parse_edns_from_query_pkt and added two arguments (config_file and comm_point) that we don't use, adjust callers in frontend accordingly.
2022-03-01Upstream renamed parse_extract_edns toFlorian Obser
parse_extract_edns_from_response_msg and parse_edns_from_pkt to parse_edns_from_query_pkt in libunbound 1.14.0. Both funktions work equally well for us but it would look weird to use the "from_response_msg" function on the query so switch to parse_edns_from_pkt in preparation for the libunbound update. testing & OK sthen
2022-01-09unwind/unbound: prepare for opaque DSA and RSA.Theo Buehler
Use the OpenSSL 1.1 codepath using accessors that have been available since LibreSSL 2.7 instead of reaching into the structs. ok sthen
2021-12-18Make sure we receive what we expect over imsg.Florian Obser
Instead of repairing potential garbage ensure that we receive proper C strings. Inspired by a similar diff by deraadt@ for ldapd.
2021-12-13including sys/cdefs.h manually started as a result of netbsd trying toTheo de Raadt
macro-build a replacement for sccsid, and was done without any concern for namespace damage. Unfortunately this practice started infecting other code as others were unaware they didn't need the file. ok millert guenther
2021-11-19Sync to unbound to allow interface names as scope-id in IPv6Florian Obser
link-local addresses. With this dns proposals from slaacd with link-local addresses from slaacd(8) are wroking. Requested by & OK kn
2021-11-16Validate RTM_PROPOSAL in resolver not frontendKlemens Nanni
The resolver is the actual consumer and shouldn't trust the frontend. Fold the IPv4/IPv6 specific checks thanks to the previous commit. Idea from florian OK florian
2021-11-16Simplify address family handling, ditch inet_ntop(3)Klemens Nanni
Reduce duplicate code and use getnameinfo(3) for IPv4 as well. This commit is the equivalent of sbin/resolvd/resolvd.c revision 1.21 "Simplify address family handling, ditch inet_ntop(3)". OK florian