Commit Briefs

355f00a27e Oliver Lowe

Update godoc link to working host (main)


08629ce995 Oliver Lowe

dns: consistent doc format


32fb5e1b07 Oliver Lowe

dns: upgrade golang.org/x/net to stable release


b35d6340d5 Oliver Lowe

Correct godoc links


8960d9d808 Oliver Lowe

ignore built recursor binary


32888e323d Oliver Lowe

minor doc typos


ed53ec5feb Oliver Lowe

server: dedupe WriteMsg logic on error msg responses


598b53e1e4 Oliver Lowe

dns: add Handlers for common server responses

this takes more stuff out of cmd/recursor that could be used by other servers. While here reject even more qtypes from recursive resolution


f62764615c Oliver Lowe

dns_test: add example dns.Handler


60703b621f Oliver Lowe

cmd/recursor: return error when no more servers to ask

So we eturn SERVFAIL correctly to clients, the same way that Cloudflare, quad9 et al. do.




590fd1b7ff Oliver Lowe

cmd/recursor: comments on caching records

With an explanation of why we lookup before we insert into the cache


b141f11933 Oliver Lowe

gofmt


9ecb07389b Oliver Lowe

doc: tutorial with the even simpler Ask function

that is the simplest operation, not Exchange (anymore)!


dc137f704d Oliver Lowe

cmd/recursor: bail out on query loop

Pretty easy fix: just keep track of where we're up to each time we call resolve(). Fixes: https://todo.sr.ht/~otl/dns/4


d5834ac9c2 Oliver Lowe

cmd/recursor: rewrite cache and recursor algorithm

Now we only ever send queries to nameservers, not just things we happen to find in the additional section of a reply. This change also does caching more nicely; cache any records that we get from nameservers. Authoritative answers get priority. Fixes: https://todo.sr.ht/~otl/dns/4


16fb0dea8a Oliver Lowe

recursor: set more correct header bits in response

This is what quad9 and google's dns resolver do


a7c06b85bf Oliver Lowe

recursor: actually, move recursive stuff back to cmd

it's too specific to the implementation of a recursive resolver. More stuff will be added there later I reckon.


2c109646ee Oliver Lowe

recursor: reject more invalid messages


7e5b66014d Oliver Lowe

More tests


20fd186cb0 Oliver Lowe

dns: error on receiving random messages

Caller can handle the error appropriately I reckon...


521607802a Oliver Lowe

dns: Separate sending messages from sending bytes

That made it easy to then let us ResponseWriter to implement io.Writer


554ced8329 Oliver Lowe

dns: cleaner error handling on send packet


a5e7854c43 Oliver Lowe

dns: Move recursive resolution functions into package

They seem generic enough to be in the package rather than in the server implementation - ignoring the cache, of course!