rthalley / dnspython

a powerful DNS toolkit for python
http://www.dnspython.org
Other
2.46k stars 519 forks source link

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

Closed rthalley closed 2 months ago

rthalley commented 2 months ago

If the mode is dns.message.CopyMode.QUESTION, the default, 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.