[Mirror] Some kind of OS: git://git.9front.org/plan9front/plan9front
Find a file
cinap_lenrek 45f7b30244 ndb/dns: built-in tcp server, remove cruft, refactor
Remove external ndb/dnstcp (tcp53) service and serve
tcp clients directly fron ndb/dns process,
taking advantage from the cache.

This avoids slow startup delay for tcp as dnstcp
would need to parse the full network database for
each request. Also, for unknown reasons, dnstcp
would "refresh" the main server on exit, causling
ander database reload for no reason.

Remove cruft:

- straddeling server configuration (-o flag)

I dont think anyone has used this in 9front and
the logic is hard to maintain and test.

- UDP forwarding (-T flag)

Just use snoopy. Or use ipmux and aux/trampoline.

- zonerefreshprogram (-z flag)

This interface sucks. Anyone on the internet can
trigger a refresh and there is no way to authenitcate
the sender.

- undocumented "dump" and "stats" messages.

This should instead be exposed in the file-system
interface. For now, one can access the stats with
acid(1).

Fix bugs:

Handling of unknown RR types was wrong. convM2RR()
would skip ahead in the message when hitting a
unknown RR type, but this gets out of sync with
rrloop()'s rr counter causing spurious parse errors.

Instead, add a Block into the RR type RR.unknown,
where we can stuff the RR data of unknown requests
when the rr is not supported: rrsupported() == 0.

These "unknown" RR types can be printed, but are
discarded in rrattach() as the cache should never
contain unknown RR's.

Fix ip/snoopy -f 'tcp(dns)', need to skip the 2 byte
length field as dns code assumes UDP format.

The refactor:

Big sweep over dnresolve.c, keeping stuff local
on the stack (such as the reply message, fd's)
while putting common stuff in the Query (such as
the recursion depth).

Make logging consistent. Dont have ndb/dnsdebug
enable debuguing, spewing crap on the console.
2023-10-29 13:36:00 +00:00
386
68000
68020
acme mkfiles: add 'mk test' support 2023-02-19 20:44:56 -05:00
adm/timezone
amd64 libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
arm
arm64 libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
lib grabrfc: update fetching 2023-10-10 03:16:04 +00:00
mips
power
power64
rc cpurc, termrc, bootrc: organize default device binds 2023-10-14 17:12:05 +00:00
sparc
sparc64
spim /spim/include/ape/ureg.h: fixed missing ifndef 2023-03-07 04:26:34 +00:00
sys ndb/dns: built-in tcp server, remove cruft, refactor 2023-10-29 13:36:00 +00:00