summaryrefslogtreecommitdiff
path: root/usr.bin/dig/dighost.c
AgeCommit message (Collapse)Author
2024-08-29Update root hints.Florian Obser
b.root-servers.net renumbered on 2023-11-27. OK phessler, jsg, sthen, deraadt
2024-04-23correct indentation; no functional changeJonathan Gray
ok tb@
2020-12-21Rewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}.Florian Obser
Since this was the last user of those functions we can delete them. OK otto
2020-12-20Fix EDNS Client Subnet option (+subnet=)Florian Obser
This got broken when we introduced ecs_plen so that we can use natural socket types.
2020-12-20Fix IPv6 link-local address handling for nameservers to talk to asFlorian Obser
well as address to bind to. Reported by Jordan Geoghegan (jordan AT geoghegan.ca), thanks! Debugged by & initial fix by otto Input & OK otto
2020-09-15We have sockaddr_storage these days, get rid of isc_sockaddr_t.Florian Obser
OK beck, "beautiful" deraadt
2020-09-15The various sockaddr structures have length fields these days.Florian Obser
OK beck
2020-09-15we no longer need isc_netaddr_tFlorian Obser
OK beck, deraadt (who also OK'ed the previous two diffs)
2020-09-15rewrite generating of IPv6 reverse names, lets us get rid of byaddr.Florian Obser
OK beck
2020-09-15Fix botched conversion. This was not converted from parse_uint() whichFlorian Obser
took a maxlength of 10 but isc_parse_uint32 which took a base of 10 and unlimited lenght. Use a maxval of 128 for prefix lengths instead.
2020-09-14Mechanically replace isc_boolean_t with int.Florian Obser
OK deraadt
2020-09-14Bunch of dead stores and otherwise unused stuff lets us get rid ofFlorian Obser
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h dragged in. OK deraadt
2020-09-14Rewrite isc_time_microdiff() as uelapsed() and put it directlyFlorian Obser
into dig sources, lets us get rid of unix/time.{c,h} OK deraadt
2020-09-13Get rid of isc_parse_uint32() and replace it with strtonum.Florian Obser
While here use the standard strtonum error messages. input & OK beck, OK kn
2020-02-25use timingsafe_bcmp and get rid of now unused safe.cFlorian Obser
2020-02-25traditional nslookup would not fatal if the server name was undiscoverable.Theo de Raadt
change lower level code to return an error, and bump the fatal for host(1) upwards, then tweak nslookup to work nicely
2020-02-25reduce multiple newlinesJonathan Gray
2020-02-24Stop generating rdatastruct.h and put the dns_rdata_* structs forFlorian Obser
cname, ns, soa, and tsig directly into rdata.h
2020-02-24We only need to create cname, ns, soa and tsig structs.Florian Obser
OK jsg
2020-02-24We only need to fill a wire format buffer from soa and tsig structs.Florian Obser
OK jsg
2020-02-24We only need to free cname, ns, soa and tsig structs.Florian Obser
OK jsg
2020-02-24remove some uneeded includesJonathan Gray
2020-02-24We are always preserving the order of records.Florian Obser
This lets us remove compare_* and casecompare_* functions from RR types. OK jung
2020-02-23rmeove more unused functions and codeJoerg Jung
ok florian
2020-02-23We are not passing options to the message renderer.Florian Obser
OK millert
2020-02-21set function parameter list to voidJoerg Jung
ok millert florian
2020-02-21Read CLOCK_MONOTONIC when we need timestamps to compare and useFlorian Obser
time(3) for the wall clock. prodding & OK jung
2020-02-20Remove support for reading tsig keys from dnssec key pair.Florian Obser
This was accidentally broken some time ago. Arguably this was the least useful way of providing tsig keys to dig. ISC also removed generating tsig keys from dnssec-keygen in 9.13. To read the key from disk using the -k option it has to be provided as as a session key: key "keyname" { algorithm hmac-sha256; secret "[...]"; }; OK millert
2020-02-19simplify signal setup and remove block/unblock/is_running/reloadJoerg Jung
with input from florian ok millert florian
2020-02-16clock_gettime cannot fail if called correctly; unravel TIME_NOWFlorian Obser
indirections. (I'm not convinced that we always want to read CLOCK_REALTIME, in fact we probably want to almost always read CLOCK_MONOTONIC.) OK millert
2020-02-16Reduce interval indirection by setting struct members directly andFlorian Obser
using macros from sys/time.h OK millert
2020-02-16Replace isc_time_t and interval_t with struct timespec.Florian Obser
Input & OK millert
2020-02-16Now we are only using one timer type (once) and expires is always NULLFlorian Obser
so remove those struct members. OK millert
2020-02-15get path to resolv.conf from resolv.hFlorian Obser
2020-02-13+trace has the RD bit cleared however it asks the nameserver fromFlorian Obser
/etc/resolv.conf for a list of root name servers. Arguably corectly configured recursive nameservers should REFUSE to answer this question to prevent cache snooping. Upstream fixed this after the license change by sending the first query with RD set. We go a different route, built in a list of root name servers and ask them. Otherwise known as a priming query. This way +trace does not depend on any localy configured nameserver in /etc/resolv.conf "I have no other quibbles" deraadt@ input & OK sthen
2020-02-11remove uneeded #include linesJonathan Gray
ok florian@
2020-02-11Replace SIZE defines with sizeof.Florian Obser
While here replace memmove with memcpy, the arguments do not overlap. OK millert, deraadt
2020-02-11Remove #if 0 that has been there since the initial import in 2003.Florian Obser
2020-02-07Move dig(1) and needed DNS libraries into it's own source directory inFlorian Obser
usr.bin/dig. From the beginning when we started to remove unneeded nameserver code, it was our goal to extract dig functionality from the bind sources, for everyone's benefit as this is easier to reason about. In total we removed about 2/3 or over 300.000 lines of code. We kept the lib/ subdirectory layout but moved the content of bin/ to the top from the old bind source directory. Previous sources and history can be found in the src/usr.sbin/bind Attic. With & OK deraadt Proposed directory layout sounds good to sthen