Files
bind9/bin/tools
Tony Finch 0fc505df97 Embiggen decompression contexts
This partly reverts commit 1d807d84f1 "Shrink decompression contexts",
and while I am adjusting nearly all the calls to dns_name_fromwire()
it seems like a good time to remove all the unused `options`
arguments, to reduce the amount of cleanup churn.

I reworked the code that calls dns_decompress_setpermitted() at least
twice before I understood that it's a no-op. Good grief!

Before this year's changes, the decompression modes were ANY (which
became ALWAYS), NONE (became NEVER), and STRICT, which meant "strictly
follow RFC 3579" wrt whether or not a name is allowed to be compressed
in RDATA. (STRICT became DEFAULT, which in retrospect was a misnomer.)
STRICT was the only mode in which dns_decompress_setmethods() had any
effect, but decompression contexts were not initialized to STRICT and
later toggled (except in the tests), so all this machinery was not
actually used in production.

In practice, we either expect no names to be compressed, or permit any
name to be compressed. This is not entirely Postel's law: there were
compatibility issues around the time RFC 3579 was written, so RRtypes
allocated between RFC 1035 and RFC 3579 might legitimately have compressed
RDATA even though that is formally discouraged.

So after another round of refactoring, "ALWAYS" is now indicated by
the presence of a decompression context, and "NEVER" is indicated by a
NULL dctx pointer, and the mutable mode only remains in a vesigial
place-holder form.
2022-12-09 18:48:06 +00:00
..
2022-12-09 18:48:06 +00:00
2022-11-29 08:54:34 +01:00