summaryrefslogtreecommitdiff
path: root/dns
Commit message (Collapse)AuthorAgeFilesLines
* rename statistics class; add documentationcache_statsBob Halley2020-07-191-3/+3
|
* cache statisticsBob Halley2020-07-191-4/+67
|
* Remove unneeded to_text/from_text in NXDOMAIN.canonical_name.Bob Halley2020-07-181-2/+2
|
* Add dns.edns.register_type().Brian Wellington2020-07-171-0/+10
| | | | This allows an application to register a custom EDNS option type.
* Disable coverage for BlockingIOError on udp send.Brian Wellington2020-07-171-1/+1
|
* Changes to blocking model.Brian Wellington2020-07-171-27/+40
| | | | | | | | | | | | | Before this change, the synchronous code would check sockets for readability or writability before doing nonblocking read or write. This changes them to attempt the read or write first, and then block if the operation could not complete. This also removes the no-longer-needed getpeername() call in tcp(), which was needed to deal with the case where an unconnected socket was passed in; waiting for writability would block rather than immediately return an error. By attempting the write first, we get the error immediately.
* Use the selectors module.Brian Wellington2020-07-171-71/+26
| | | | | | Previously, there was code to either use select.select or select.poll, depending on OS. This changes it to use the selectors module, using either SelectSelector or PollSelector, but sharing code otherwise.
* Minor cleanups to EDNS code.Brian Wellington2020-07-171-18/+7
| | | | | | | When the Message object was changed to store an OPT record, the changes to use_edns() left a lot of cruft. Reduce some code duplication in make_query().
* Merge pull request #536 from ngaya-ll/patch-1Bob Halley2020-07-171-9/+11
|\ | | | | Define additional return types in name.pyi
| * Define additional return types in name.pyiNick Gaya2020-07-161-9/+11
| |
* | update version post-releaseBob Halley2020-07-171-3/+3
| |
* | 2.0.0 versioningv2.0.0Bob Halley2020-07-161-2/+2
|/
* Fix _wordbreak() to always return a str.Brian Wellington2020-07-091-5/+6
|
* Generalize the word breaking code.Brian Wellington2020-07-091-13/+14
| | | | | Refactor common code from _base64ify and _hexify, and also add support for _hexify to skip word breaks.
* Make dns.rdata._base64ify(..., 0) work.Brian Wellington2020-07-092-2/+4
| | | | | | | | | | In some cases, the caller absolutely doesn't want word breaks. This shouldn't be the case for any normal DNS record, but is for records that don't have well-defined text formats, like TSIG and TKEY. Allow them to pass 0 (or None), to indicate that no word breaks should be added. Previously, passing either 0 or None resulted in an exception, as the value was used directly as the step in a slice.
* Add support for receiving UDP queries.Brian Wellington2020-07-085-32/+69
| | | | | | | | | | | | | | The existing receive_udp() methods are only usable for receiving responses, as they require an expected destination and check that the message is from that destination. This change makes the expected destination (and hence the check) optional, and returns the address that the message was received from (in the sync case, this is only done if no destination is provided, for backwards compatibility). New tests are added, which required adding generic getsockname() support to the async backends.
* Fix return type docs for receive methods.Brian Wellington2020-07-082-4/+8
|
* Move __str__ to the generic Option code.Brian Wellington2020-07-081-5/+3
| | | | | | ECSOption and GenericOption both contained a __str__ method that called to_text(), but the base Option class did not. Move __str__ to the base class.
* Merge pull request #531 from bwelling/tsig2Bob Halley2020-07-071-25/+43
|\ | | | | Split TSIG sign and validate.
| * Split TSIG sign and validate.Brian Wellington2020-07-071-25/+43
| |
* | Add DSOTYPENI rcode.Bob Halley2020-07-071-0/+2
| |
* | TSIG code now uses dns.rcode.Rcode enum values for the TSIG error field.Bob Halley2020-07-072-15/+13
| |
* | Merge pull request #532 from HsiehYuho/extrcodeBob Halley2020-07-071-0/+16
|\ \ | | | | | | Support more DNS rcode
| * | Support more DNS rcodeYu-Ho Hsieh2020-07-071-0/+16
| | | | | | | | | | | | | | | More DNS rcodes are assigned. Support rcode assigned before RFC7873 https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
* | | Fix Message ednsflags propery setter.Brian Wellington2020-07-071-1/+1
|/ / | | | | | | Setting ednsflags to 0 shouldn't unconditionally enable EDNS.
* | Fix Message.want_dnssec().Brian Wellington2020-07-071-1/+1
|/ | | | | It was incorrectly calling Message._make_opt() in the case where the message was not currently using EDNS.
* Remove too strong "no metaclasses" check in _parse_rr_header().Bob Halley2020-07-071-2/+0
|
* In gethostbyaddr(), remove unneeded workarounds for getfqdn().Bob Halley2020-07-061-7/+7
|
* Fix incompatibility in getfqdn() revealed by dnspython web site change.Bob Halley2020-07-061-2/+5
|
* update version post releaseBob Halley2020-07-041-2/+2
|
* Remove code in _escapify() that can never run.Bob Halley2020-07-031-2/+0
|
* Fix comment typo.Bob Halley2020-07-021-1/+1
|
* lintBrian Wellington2020-07-021-2/+0
|
* Consolidate NSEC/NSEC3/CSYNC bitmap handling.Brian Wellington2020-07-024-158/+103
| | | | | | | This also fixes several bugs; the NSEC3 code would properly avoid empty windows, but the NSEC and CSYNC code did not. Also, none of the wire parsing routines properly checked to see that the window number was monotonically increasing.
* Rework wire format processing.Bob Halley2020-07-0248-588/+357
| | | | | | Wire format data is now done via a dns.wire.Parser, which does all of the bookkeeping and also provides convenience routines (e.g. get_uint16() or get_name()).
* lintBob Halley2020-07-011-3/+2
|
* Merge pull request #527 from bwelling/tsigkeyBob Halley2020-07-016-90/+135
|\ | | | | Add dns.tsig.Key class.
| * Better deal with backwards compatibility.Brian Wellington2020-07-012-13/+12
| | | | | | | | | | | | | | | | If dns.tsigkeyring.from_text() creates dns.tsig.Key objects with the default algorithm, that causes problems for code that specifies a different algorithm. There's no good way to handle this, so change dns.tsigkeyring.from_text() to not create dns.tsig.Key objects unless it knows the algorithm.
| * Explicitly use the key's algorithm.Brian Wellington2020-07-011-2/+2
| |
| * Add dns.tsig.Key class.Brian Wellington2020-07-016-88/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates a new class to represent a TSIG key, containing name, secret, and algorithm. The keyring format is changed to be {name : key}, and the methods in dns.tsigkeyring are updated to deal with old and new formats. The Message class is updated to use dns.tsig.Key, although (to avoid breaking existing code), it stores them in the keyring field. Message.use_tsig() can accept either explicit keys, or keyrings; it will extract and/or create a key. dns.message.from_wire() can accept either a key or a keyring in the keyring parameter. If passed a key, it will now raise if the TSIG record in the message was signed with a different key. If passed a keyring containing keys (as opposed to bare secrets), it will check that the TSIG record's algorithm matches that of the key.
* | Merge remote-tracking branch 'upstream/master' into amtrelayBrian Wellington2020-07-014-66/+43
|\ \ | |/
| * 2.0.0rc2 versioningBob Halley2020-07-011-1/+1
| |
| * increase resolver coverageBob Halley2020-07-011-2/+2
| |
| * add back no cover for things we cannot cover on windows without mockingBob Halley2020-07-011-8/+8
| |
| * expose windows resolver code to coverage testingBob Halley2020-07-011-11/+11
| |
| * remove ancient windows supportBob Halley2020-07-011-45/+25
| |
| * update message.pyi to reflect sections changeBob Halley2020-07-011-4/+1
| |
| * lintBob Halley2020-06-301-1/+1
| |
* | Add support for the AMTRELAY type.Brian Wellington2020-07-015-59/+195
|/
* Add Tokenizer.concatenate_remaining_identifiers()Brian Wellington2020-06-3010-81/+28
| | | | | | Replace identical code duplicated in a number of rdatatype implementations that concatenated all of the remaining tokens in order to decode them.