]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add a copy mode to dns.message.make_response(). (#1131)
authorBob Halley <halley@dnspython.org>
Tue, 17 Sep 2024 12:56:14 +0000 (05:56 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2024 12:56:14 +0000 (05:56 -0700)
commitaad6d8174d9767becba3c348dc469d680a55feb7
treeaf59e814af2f93ed8a8bfeb774b690f7bd572b05
parent6a22e73578348cde664b487fd4355623c6dd7e3a
Add a copy mode to dns.message.make_response(). (#1131)

Add a copy mode to dns.message.make_response().

If the mode is none, then a default copy mode appropriate for the opcode will
be used.  This is currently always dns.message.CopyMode.QUESTION.

If the mode is dns.message.CopyMode.QUESTION then only the question
section is copied.

If the mode is dns.message.CopyMode.EVERYTHING, then all sections are
copied other than OPT or TSIG records which are created appropriately
if needed instead of being copied.

If the mode is dns.message.CopyMode.NOTHING then no sections are
copied.
dns/message.py
tests/test_constants.py
tests/test_message.py