summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ndb
AgeCommit message (Collapse)Author
2023-01-04ndb/dns: allow specifying local ip addresses for serving dnscinap_lenrek
Allow specifying the local IP addresses that the UDP dns server will listen on when the -s flag is given.
2022-12-18ndb/dns: procgetname(): use /proc instead of #pcinap_lenrek
2022-12-12ndb/dns, ndb/cs: post to /srv instead of #scinap_lenrek
2022-12-10ndb/dns: don't try to resolve local dns serverscinap_lenrek
We should have found the ip addresses of our local dns servers from the cache or the database. Also, the rr->host is an ip address string and not a valid domain name so the query there makes no sense.
2021-11-03ndb/dns: use decimal encoding for txt rr string escapescinap_lenrek
rfc883 suggests to use decimal digits to escape txt rr strings, and unix dig appears to use the same. so change from octal to decimal.
2021-11-03ndb/dns: handle txt rr strings as binary, remove nullrr ndb codecinap_lenrek
txt and caa rr strings might contain binary control characters such as newlines and double quotes which mess up the output in ndb(6) format. so handle them as binary blobs internally and escape special characters as \DDD where D is a octal digit when printing. txtrr() will unescape them when reading into internal binary representation. remove the undocumented nullrr ndb attribute parsing code.
2021-11-03libndb: move mkptrname() into libndb to avoid duplicationcinap_lenrek
2021-11-01ndb/dnsquery: make ! bang work with reverse lookups, document in ndb(8)cinap_lenrek
2021-11-01ndb/dns: use correct attribute when serializing caa record in ndb formatcinap_lenrek
2021-11-01ndb/dnsdebug: dont duplicate rrfmt()cinap_lenrek
introduce our own RR* format %P for pretty printing and call %R format internally, then use it to print the rest of the line after the tab, prefixed with the padded output.
2021-11-01ndb/dns: fix ndb serialization of RR*cinap_lenrek
have todo multiple fmtprint() calls for idnname() as the buffer is shared. do not idnname() rp->os and rp->cpu, these are symbols. always quote txt= records.
2021-10-24ndb/dns: implement caa record type in ndbcinap_lenrek
this allows the caa records to be specified in ndb as: caa=<value> tag=<tag> flags=<flags> where tag defaults to "issue" and flags to 0 when omited.
2021-09-08ndb/dns: make dblookup() consistent with cachedb operation, bring back txtrr ↵cinap_lenrek
for compatibility - enforce same behaviour as cachedb server in dblookup(): - force Taaaa record type on ipv6= attributes, regardless of value - return Taaaa records for ip= attributes containing ipv6 values - return Ta records only for ip= attributes containing ipv4 values - for compatibility, bring back support for txtrr= type, but handle consistently
2021-09-08ndb/dnsdebug: make usage flags consistentcinap_lenrek
2021-09-08ndb/dns: fix wrong ndb attribute "txtrr" vs. "txt" for caching servercinap_lenrek
2021-02-19/sys/src/cmd/ndb/dns.h:sl
--- To: 9front@9front.org Date: Sun, 07 Feb 2021 14:56:39 +0100 From: kvik@a-b.xyz Subject: Re: [9front] transient dns errors cause smtp failure Reply-To: 9front@9front.org I think I found a reason for DNS failing on known good domains. /sys/src/cmd/ndb/dns.h:156,157 /* tune; was 60*1000; keep it short */ Maxreqtm= 8*1000, /* max. ms to process a request */ So, 8 seconds is how much the resolver will bother with a request it has been handed, before dropping it on the floor with little explanation. It seems quite possible that this is too short a timeout on a machine during a spam queue run, which predictably stresses the compute and network resources. In turn, negative response caching might explain why a particular unlucky domain would basically stop receiveing any mail for a while. I'm dying to know if bumping this limit would clear up the queue of such DNS errors. --- [narrator: it did.]
2021-02-14ndb/dns: implement RFC6844 certificate authority authorization record typecinap_lenrek
2020-12-20ndb/dns: handle dnskey RR's (thanks moody)cinap_lenrek
On 12/18/20, Jacob Moody wrote: > Hello, > > I recently ran in to some issues with pointing an unbound server towards a > 9front dns server as its upstream. > The parsing seemed to fail when ndb/dns received a DNSKEY RR from it's own > upstream source on behalf of unbound. > This patch catches and stores the DNSKEY from the upstream server to prevent > this.
2020-10-17ndb/dnsdebug: add -c flag to debug caching dns server behaviourcinap_lenrek
2020-10-17ndb/dns: mark ns record authoritative when in our area for delegationcinap_lenrek
I have the problem that i need to delegate a subdomain to another name server that is confused about its own zone (and its own name) returning unusable ns records. With this, one can make up a nameserver entry in ndb that is authoritative and owned by us for that nameserver, and then put it in the soa=delegated ns entry. This promotes the ns record in the soa=delegated to Authoritative, which avoids overriding the ns rr's from the confused server for the delegated zone.
2020-08-08ndb/dns: allow multiple txt, nullrr, cert, key and sig records (thanks kvik)cinap_lenrek
The de-duplication of txt, nullrr, cert, key and sig records reduced all records to a single one. Also, dblookup1() missed the txt record case and did not return a unique list of rr's. Now we consider these records unique if their value is different. The new txtequiv() function does that for TXT records, which is a bit tricky as it needs to take different segmentation into account.
2020-08-01pre-lib9p servers: fix incorrect Tversion handlingkvik
version(5) says: If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters ``unknown''. Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror. lib9p(2) follows the above spec, although ignoring the next part concerning comparison after period-stripping. It assumes an Fcall.version starting with "9P" is correctly formed and returns the only supported version of the protocol, which seems alright. This patch brings pre-lib9p servers in accordance with the spec.
2020-05-02make bind(2) error handling consistentcinap_lenrek
The mount() and bind() syscalls return -1 on error, and the mountid sequence number on success. The manpage states that the mountid sequence number is a positive integer, but the kernels implementation currently uses a unsigned 32-bit integer and does not guarantee that the mountid will not become negative. Most code just cares about the error, so test for the -1 error value only.
2019-10-13ndb/dns: handle empty $DNSSERVERcinap_lenrek
when $DNSSERVER is empty, query ndb for local dns servers instead of not using any at all.
2019-08-30ndb/dnsquery, ndb/csquery: write ">" prompt to stderr (thanks kvik)cinap_lenrek
kvik writes: dnsquery(8) prints the interactive prompt on stdout together with query results, making scripted usage unnecessarily difficult. A straightforward solution is prompting on stderr instead: as practiced by rc(1), among many others -- promptly taking care of the issue: ; echo 9front.org mx | ndb/dnsquery >[2]/dev/null
2019-02-12ip/ipconfig, ndb/dns, libndb: handle parseipmask() errorscinap_lenrek
2019-02-11ndb/dns: provide v4 argument to parseipmask(), use snprint() instead of sprint()cinap_lenrek
2018-11-06dnstcp: temporarily switch on resolver mode so we can resolve the dnsslaves ↵cinap_lenrek
for axfr check
2018-10-20fix misleading/wrong fd checksBurnZeZ
2018-10-11ndb/dnstcp: only lookup the expected address type in findserver()cinap_lenrek
theres no reason to lookup both A and AAAA records, as we already know the type of srcip.
2018-10-11ndb/dns: use nil for pointers in dnresolve() argscinap_lenrek
2018-10-11ndb/dns: do recursive lookup for dnsslave=cinap_lenrek
2018-10-11ndb/dns: avoid format strings in procnamecinap_lenrek
2018-10-09ndb/dnstcp: return a proper non-answer when rejecting zone transfercinap_lenrek
2018-10-09ndb/dns: fix format print warning for procsetname(), cleanupcinap_lenrek
2018-10-09ndb/dns: send_notify() to multiple ip addresses in parallel, filter myip()cinap_lenrek
2018-10-09ndb/dnstcp: restrict DNS zone transfers to clients listed as dnsslave=cinap_lenrek
initial idea from Steve Simon, but doesnt require reverse lookup of the callers ip address.
2018-09-26libc: add procsetname()cinap_lenrek
2018-09-26libc: return number of bytes produced for idn2utf() and utf2idn()cinap_lenrek
2018-09-25ndb/inform: handle internationalized domain namescinap_lenrek
2018-09-25ndb/dns: use libc's new idn functionscinap_lenrek
2018-09-16libndb: make ndbipinfo() walk ipnet for all matching entries, concatenate ↵cinap_lenrek
and dedup result
2018-09-09ndb/cs: don't do dns lookups when all we got is loopback or link local addressescinap_lenrek
2018-07-16ndb/dns: fix delegation with norecursion (-R flag)cinap_lenrek
when the question zone is in a delegated area, we still need to provide the nameservers.
2018-07-13ndb/dnsgetip: report errors when dns resolution failsmischief
2018-07-10ndb/cs: add -6 flag for v6 only lookups and "ipv4" control message to toggle ↵cinap_lenrek
v4 lookups.
2018-06-26ndb/dns: fix encoding of srv record targetcinap_lenrek
the target has to be encoded as a domain name (the individual name components as separate labels followed by . (empty) label), not as a literal string. to disable compression, pass nil dictionary to pname().
2018-06-01ndb/cs: make ipv6 only host practical by checking ip version on local interfacescinap_lenrek
avoid returning ip addresses that cannot be reached due to lack of a compatible ip address. this means when here is no ipv4 address configured, we wont return ipv4 addresses and would not query dns for an A record. likewise, when here is no ipv6 address configured then we wont query dns for an AAAA record. ipv6 lookups can still be disabled with the -4 flag just as before.
2018-05-23ndb/dnsdebug: handle .ip6.arpa namescinap_lenrek
2018-05-23ndb/dnsquery: handle .ip6.arpa names, don't mount the dns servicecinap_lenrek