summaryrefslogtreecommitdiff
path: root/dns
Commit message (Collapse)AuthorAgeFilesLines
* Attempt to refactor per-opcode validation.messageBrian Wellington2020-06-262-52/+44
| | | | | | | | 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-262-4/+14
|
* 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-252-102/+165
|
* set update section globals for convenience; fix formattingBob Halley2020-06-252-1/+3
|
* make sections a list; propertize question, answer, etc.Bob Halley2020-06-252-60/+98
|
* section enumsBob Halley2020-06-252-35/+26
|
* 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.
* The cached _all_slots technique of the earlier pickle fix didn't work forBob Halley2020-06-221-12/+6
| | | | | GenericRdata or for directly imported types. This fix just computes the all slots relatively efficiently every __getstate__().
* import dns.dnssecBrian Wellington2020-06-221-0/+1
|
* set versioning to devBob Halley2020-06-201-2/+2
|
* improve resolver coverageBob Halley2020-06-201-6/+6
|
* Remove hmac_md5(), as it was added for backwards compatibility when weBob Halley2020-06-191-7/+0
| | | | switched to using sign() back in 2010.
* improve coverageBob Halley2020-06-191-2/+3
|
* add comment about is-response checking for DDNSBob Halley2020-06-191-0/+4
|
* we did not check label-too-long in a few text casesBob Halley2020-06-191-4/+10
|
* improve set coverageBob Halley2020-06-191-1/+1
|
* Make _cmp generic for all EDNS Options. It now compares the wire formatsBob Halley2020-06-191-19/+11
| | | | | | | | | | of two objects of the same class. Previously we did type-specific stuff for ECSOption, but we only checked the padded address info, not the srclen or scopelen, so different options could compare the same. Also, it's not clear that there's any better semantic ordering of options than the wire format, so we will just go for simplicity and use the generic implementation.
* lintBob Halley2020-06-191-4/+4
|
* more coverage improvementsBob Halley2020-06-191-3/+3
|
* fix cut-and-paste typoBob Halley2020-06-191-1/+1
|
* Improve GPOS validity checking.Bob Halley2020-06-191-1/+12
|
* Check previously unchecked things in from_text(), and make from_wire() ↵Bob Halley2020-06-191-6/+25
| | | | checks more precise.
* eliminate coverage noiseBob Halley2020-06-191-1/+1
|
* improve async coverageBob Halley2020-06-193-9/+12
|
* Fix rdata pickling.Bob Halley2020-06-181-2/+24
| | | | | | | | | | | Coverage testing showed that while rdatas would pickle and unpickle apparently successfully, in fact only the slots from the deepest class in the inheritance chain would be restored. So, e.g., a restored A rdata would have an address attribute but no rdclass or rdtype attributes, and so things like rdata comparison would break. This change preserves the whole set of slots, from all ancestors as well as the object, as a dictionary.
* validate rdata replace()Bob Halley2020-06-181-2/+7
|
* further improve entropy coverageBob Halley2020-06-181-1/+1
|
* improve entropy coverageBob Halley2020-06-181-2/+2
|
* improve query coverageBob Halley2020-06-181-10/+10
|
* more tokenizer coverageBob Halley2020-06-181-1/+2
|
* Construct socket.gaierror with an errno and a string, as doing just theBob Halley2020-06-181-9/+26
| | | | | | | errno doesn't cause the errno field in the exception to be set, and thus our exceptions were different and less useful than the stock ones. Adjust gethostbyaddr() to filter addresses like the system one does.
* DS: support mnemonic format from RFC 4034 section 5.3Petr Špaček2020-06-181-1/+1
|
* Merge pull request #510 from bwelling/rendererBob Halley2020-06-171-60/+38
|\ | | | | Simplify renderer code.
| * Simplify renderer code.Brian Wellington2020-06-171-60/+38
| | | | | | | | | | | | Use context manager to avoid duplicating length checking in many places. Change the code dealing with EDNS options to avoid lots of seeking by not rendering directly into the file.
* | Improve the comment on get_int(), as it is unsigned.Bob Halley2020-06-171-13/+8
|/ | | | | | | | | | Add missing base parameter to get_uint32. Don't copy get_int in get_uint32, just call get_int. get_uint32 erroneously permitted 4294967296. remove cut-and-paste origin parameter to get_string() and get_identifier().
* Optimize wiredata __getitem__.Brian Wellington2020-06-171-1/+1
| | | | | When getting an item (not a slice), call bytes.__getitem__ directly rather than creating a new bytes object.
* make passing a socket to async routines actually workBob Halley2020-06-172-3/+3
|
* simplify TTL check when reading a zone fileBob Halley2020-06-171-10/+7
|
* Fix typo.Brian Wellington2020-06-171-1/+1
|
* remove unneeded exception catching from rhs setting in $GENERATE code ↵Bob Halley2020-06-171-5/+2
| | | | (cut-and-paste issue)
* Treat OSErrors during resolution as permanent failures, in line with otherBob Halley2020-06-171-3/+3
| | | | | | stub resolvers. Reduce default lifetime from 30 seconds to 5 seconds.
* Now that rdata are immutable, there is no point to the validate() method, soBob Halley2020-06-171-15/+0
| | | | remove it.
* fix sniffio-less asyncio detection on 3.6.xBob Halley2020-06-171-0/+1
|