summaryrefslogtreecommitdiff
path: root/dns/message.py
Commit message (Collapse)AuthorAgeFilesLines
* Attempt to refactor per-opcode validation.messageBrian Wellington2020-06-261-43/+28
| | | | | | | | Instead of validating rrsets and sections after parsing them, check the class/type for each record before parsing it. This is more generic, because it moves all of the update logic out of the common code. It's also more flexible, as it allows the update logic to specify that meta-records are empty.
* Remove hardcoded section names from TextReader.Brian Wellington2020-06-261-26/+36
|
* Minor _WireReader refactoring.Brian Wellington2020-06-261-47/+49
| | | | | | Instead of parsing the header to determine which Message subclass to create and passing that message to _WireReader, make _WireReader create the Message subclass itself.
* basic documentation updates for revised message hierarchyBob Halley2020-06-261-4/+11
|
* move rrset validation to the end-of-section processingBob Halley2020-06-261-11/+7
|
* lintBob Halley2020-06-261-2/+2
|
* fix cut-and-paste errorBob Halley2020-06-261-3/+0
|
* message.from_text() should have the same relativize options as other text APIs.Bob Halley2020-06-261-7/+32
|
* new message class hierarchy and conversion of wire and text readersBob Halley2020-06-251-77/+137
|
* set update section globals for convenience; fix formattingBob Halley2020-06-251-1/+1
|
* make sections a list; propertize question, answer, etc.Bob Halley2020-06-251-49/+59
|
* section enumsBob Halley2020-06-251-35/+16
|
* Fix TTL limiting.Brian Wellington2020-06-241-1/+1
| | | | | | | | The message code would convert negative TTL into 0, but the TTL could never be negative, as it was read with the '!I' format, which reads unsigned 32 bit integers. We don't want to change that, since OPT flags (which are encoded in the TTL) should be treated as unsigned. Instead, treat all TTLs > (2^31 - 1) as 0.
* Minor style changes.Brian Wellington2020-06-241-9/+8
| | | | | There's no need to pass start=0 to range(). Use += when possible. Replace multiple comparisons with in.
* add comment about is-response checking for DDNSBob Halley2020-06-191-0/+4
|
* Fix typo.Brian Wellington2020-06-171-1/+1
|
* lintBob Halley2020-06-161-1/+2
|
* Add support for multi-message TSIG.Brian Wellington2020-06-161-5/+19
| | | | | The underlying renderer code supported this, but it was not exposed through message.to_wire().
* Fix typo.Brian Wellington2020-06-161-1/+1
|
* Fix typo.Brian Wellington2020-06-161-1/+1
|
* Add one_rr_per_rrset mode to text reader, as it is handy for testing.Bob Halley2020-06-141-6/+19
|
* Minor Python 3 cleanups.Brian Wellington2020-06-031-3/+3
| | | | | | | Classes inherit from object by default; there's no need to explicitly include this. Replace super(Foo, self) with super().
* revision of truncation handlingBob Halley2020-05-221-5/+26
|
* Remove dns.rdata{type,class}.to_enum.Brian Wellington2020-05-211-2/+2
| | | | | | | These methods (which convert a str/int into an enum/int) shouldn't be commonly used by external code, so don't need to exist at the module level. The make() method on the enum class (renamed from to_enum()) can still be used, and the internal callers have been updated to use it.
* Start converting rdatatype/rdataclass to enum.Brian Wellington2020-05-181-4/+2
|
* Fix the dns.message.BadEDNS documentation.Brian Wellington2020-05-111-1/+1
| | | | | The OPT record isn't required to be at the start of the additional section, and the code doesn't enforce that.
* in doco, text->str, binary->bytesBob Halley2020-05-081-9/+9
|
* Document dns.message.from_text() blank line behavior [Issue #354].Bob Halley2020-05-071-0/+6
|
* IDNA support for zones, messages, names in rdata, rrsets, and rdatasets.Bob Halley2020-05-031-8/+16
|
* Use context managers to simplify code.Brian Wellington2020-05-011-15/+5
| | | | | | | | Simplify code using try/finally to use context managers. In some cases, contextlib.ExitStack() is used; this could probably be further simplified to use contextlib.nullcontext() once Python 3.7+ is a requirement.
* In library code, replace from io import BytesIO (or StringIO) with import ioBob Halley2020-05-011-2/+2
|
* Remove "from __future__ import" statements.Brian Wellington2020-05-011-2/+0
| | | | None of these are needed anymore.
* Correct Message.is_response docstringPeter Olson2020-02-291-1/+1
| | | | | When testing responses, I discovered that the docstring for Message.is_response had the comparison backwards, specifically in how the `QR` flag is checked. The documentation was incorrectly updated in fc7db7da4284eedaa951e6acc34e6e6f94da1c64
* remove the rest of the unicode string prefixesBob Halley2019-01-081-19/+19
|
* dns.message.from_wire() now sets message.original_id sensibly.Bob Halley2019-01-051-0/+1
| | | | [Issue #278]
* When decoding from wire format, if a message has TC set, raise a TruncatedBob Halley2019-01-051-0/+8
| | | | exception. [Issue #297]
* Remove _compat module.Bob Halley2018-12-091-11/+9
|
* update copyrightBob Halley2018-12-011-0/+2
|
* Use proper binary empty string in a few places.Bob Halley2017-01-281-6/+6
|
* fix more typosBob Halley2017-01-141-3/+3
|
* more message docoBob Halley2017-01-141-1/+1
|
* Message doco.Bob Halley2017-01-141-221/+318
| | | | | Add constants to allow a section name to be specified symbolically rather than by passing the actual section list value.
* checkpoint message docBob Halley2017-01-141-79/+1
|
* Implement EDNS Client Subnet optionpascal.bouchareine2016-11-031-0/+2
|
* Pylint: remove bare exceptsMartin2016-08-311-3/+3
| | | | Bare excepts should not be used, because they may hide system exceptions such as KeyboardInterupts or SystemExits.
* Pylint: enable bad-whitespace checkMartin Basti2016-06-271-1/+1
|
* Pylint: enable unused-import checkMartin Basti2016-06-271-1/+0
|
* Fix typosJakub Wilk2016-05-261-3/+3
|
* dns.message.make_query() now interprets any setting that impliesBob Halley2016-05-131-2/+23
| | | | | EDNS as a request to turn on EDNS, if use_edns has not been set explicitly.
* Dictionary keys doesn't support slicing. That's throw an error in the programLuis González Fernández2016-05-051-1/+1
| | | | | | if the 'keyname' parameter is not passed. Doing a list(dict())[0] solve this problem.