]> git.ipfire.org Git - thirdparty/dnspython.git/log
thirdparty/dnspython.git
5 years agoMinor cleanups to EDNS code. 537/head
Brian Wellington [Fri, 17 Jul 2020 18:34:29 +0000 (11:34 -0700)] 
Minor cleanups to EDNS code.

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().

5 years agoMerge pull request #536 from ngaya-ll/patch-1
Bob Halley [Fri, 17 Jul 2020 13:43:21 +0000 (06:43 -0700)] 
Merge pull request #536 from ngaya-ll/patch-1

Define additional return types in name.pyi

5 years agoupdate version post-release
Bob Halley [Fri, 17 Jul 2020 13:40:27 +0000 (06:40 -0700)] 
update version post-release

5 years agoDefine additional return types in name.pyi 536/head
Nick Gaya [Thu, 16 Jul 2020 21:13:08 +0000 (14:13 -0700)] 
Define additional return types in name.pyi

5 years ago2.0.0 versioning v2.0.0
Bob Halley [Thu, 16 Jul 2020 14:30:11 +0000 (07:30 -0700)] 
2.0.0 versioning

5 years agoAdd DoH JSON example.
Bob Halley [Mon, 13 Jul 2020 13:31:24 +0000 (06:31 -0700)] 
Add DoH JSON example.

5 years agomake executable
Bob Halley [Fri, 10 Jul 2020 17:31:49 +0000 (10:31 -0700)] 
make executable

5 years agoadd ECS example
Bob Halley [Fri, 10 Jul 2020 17:31:41 +0000 (10:31 -0700)] 
add ECS example

5 years agoFix _wordbreak() to always return a str.
Brian Wellington [Thu, 9 Jul 2020 23:51:26 +0000 (16:51 -0700)] 
Fix _wordbreak() to always return a str.

5 years agoGeneralize the word breaking code.
Brian Wellington [Thu, 9 Jul 2020 17:59:12 +0000 (10:59 -0700)] 
Generalize the word breaking code.

Refactor common code from _base64ify and _hexify, and also add support
for _hexify to skip word breaks.

5 years agoMake dns.rdata._base64ify(..., 0) work.
Brian Wellington [Thu, 9 Jul 2020 16:52:05 +0000 (09:52 -0700)] 
Make dns.rdata._base64ify(..., 0) work.

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.

5 years agoMerge pull request #533 from bwelling/receive_queries
Bob Halley [Wed, 8 Jul 2020 22:47:54 +0000 (15:47 -0700)] 
Merge pull request #533 from bwelling/receive_queries

Receive queries

5 years agoapply patch codecov rules
Bob Halley [Wed, 8 Jul 2020 22:30:02 +0000 (15:30 -0700)] 
apply patch codecov rules

5 years agoAdd coverage for TCP/TLS async getsockname. 533/head
Brian Wellington [Wed, 8 Jul 2020 22:29:18 +0000 (15:29 -0700)] 
Add coverage for TCP/TLS async getsockname.

5 years agoAdd support for receiving UDP queries.
Brian Wellington [Wed, 8 Jul 2020 22:11:19 +0000 (15:11 -0700)] 
Add support for receiving UDP queries.

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.

5 years agoDon't read resolv.conf in tests that don't use it.
Brian Wellington [Wed, 8 Jul 2020 20:14:14 +0000 (13:14 -0700)] 
Don't read resolv.conf in tests that don't use it.

5 years agoFix return type docs for receive methods.
Brian Wellington [Wed, 8 Jul 2020 20:12:27 +0000 (13:12 -0700)] 
Fix return type docs for receive methods.

5 years agoRemove debugging print.
Brian Wellington [Wed, 8 Jul 2020 18:16:28 +0000 (11:16 -0700)] 
Remove debugging print.

5 years agoMove __str__ to the generic Option code.
Brian Wellington [Wed, 8 Jul 2020 17:32:01 +0000 (10:32 -0700)] 
Move __str__ to the generic Option code.

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.

5 years agoMerge pull request #531 from bwelling/tsig2
Bob Halley [Wed, 8 Jul 2020 00:29:35 +0000 (17:29 -0700)] 
Merge pull request #531 from bwelling/tsig2

Split TSIG sign and validate.

5 years agoAdd DSOTYPENI rcode.
Bob Halley [Tue, 7 Jul 2020 23:48:52 +0000 (16:48 -0700)] 
Add DSOTYPENI rcode.

5 years agoTSIG code now uses dns.rcode.Rcode enum values for the TSIG error field.
Bob Halley [Tue, 7 Jul 2020 23:42:08 +0000 (16:42 -0700)] 
TSIG code now uses dns.rcode.Rcode enum values for the TSIG error field.

5 years agoMerge pull request #532 from HsiehYuho/extrcode
Bob Halley [Tue, 7 Jul 2020 23:27:57 +0000 (16:27 -0700)] 
Merge pull request #532 from HsiehYuho/extrcode

Support more DNS rcode

5 years agoSupport more DNS rcode 532/head
Yu-Ho Hsieh [Tue, 7 Jul 2020 21:01:38 +0000 (14:01 -0700)] 
Support more DNS rcode

More DNS rcodes are assigned. Support rcode assigned before RFC7873
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6

5 years agoFix Message ednsflags propery setter.
Brian Wellington [Tue, 7 Jul 2020 20:42:48 +0000 (13:42 -0700)] 
Fix Message ednsflags propery setter.

Setting ednsflags to 0 shouldn't unconditionally enable EDNS.

5 years agoFix Message.want_dnssec().
Brian Wellington [Tue, 7 Jul 2020 17:44:04 +0000 (10:44 -0700)] 
Fix Message.want_dnssec().

It was incorrectly calling Message._make_opt() in the case where the
message was not currently using EDNS.

5 years agoSplit TSIG sign and validate. 531/head
Brian Wellington [Tue, 7 Jul 2020 16:39:23 +0000 (09:39 -0700)] 
Split TSIG sign and validate.

5 years agoRemove too strong "no metaclasses" check in _parse_rr_header().
Bob Halley [Tue, 7 Jul 2020 12:03:22 +0000 (05:03 -0700)] 
Remove too strong "no metaclasses" check in _parse_rr_header().

5 years agoGive up on socket.getfqdn() testing with CDN-hosted resources as it has too much...
Bob Halley [Tue, 7 Jul 2020 03:14:21 +0000 (20:14 -0700)] 
Give up on socket.getfqdn() testing with CDN-hosted resources as it has too much magic.

5 years agoIn gethostbyaddr(), remove unneeded workarounds for getfqdn().
Bob Halley [Tue, 7 Jul 2020 03:00:05 +0000 (20:00 -0700)] 
In gethostbyaddr(), remove unneeded workarounds for getfqdn().

5 years agoFix incompatibility in getfqdn() revealed by dnspython web site change.
Bob Halley [Tue, 7 Jul 2020 02:42:51 +0000 (19:42 -0700)] 
Fix incompatibility in getfqdn() revealed by dnspython web site change.

5 years agoupdate version post release
Bob Halley [Sat, 4 Jul 2020 17:24:47 +0000 (10:24 -0700)] 
update version post release

5 years agoadd kit rule
Bob Halley [Sat, 4 Jul 2020 17:24:29 +0000 (10:24 -0700)] 
add kit rule

5 years agochange license badge color v2.0.0rc2
Bob Halley [Sat, 4 Jul 2020 16:53:00 +0000 (09:53 -0700)] 
change license badge color

5 years agoadd license badge
Bob Halley [Sat, 4 Jul 2020 16:50:49 +0000 (09:50 -0700)] 
add license badge

5 years agoUpdate classifiers.
Bob Halley [Sat, 4 Jul 2020 16:44:52 +0000 (09:44 -0700)] 
Update classifiers.

5 years agoRemove code in _escapify() that can never run.
Bob Halley [Fri, 3 Jul 2020 21:58:18 +0000 (14:58 -0700)] 
Remove code in _escapify() that can never run.

5 years agoimprove name coverage
Bob Halley [Fri, 3 Jul 2020 21:56:59 +0000 (14:56 -0700)] 
improve name coverage

5 years agorelax codecov commit rules
Bob Halley [Fri, 3 Jul 2020 19:00:11 +0000 (12:00 -0700)] 
relax codecov commit rules

5 years agoignore .dir-locals.el
Bob Halley [Fri, 3 Jul 2020 15:59:33 +0000 (08:59 -0700)] 
ignore .dir-locals.el

5 years agoFix comment typo.
Bob Halley [Fri, 3 Jul 2020 02:11:49 +0000 (19:11 -0700)] 
Fix comment typo.

5 years agoDocument some parser_from_wire() methods.
Bob Halley [Fri, 3 Jul 2020 02:06:49 +0000 (19:06 -0700)] 
Document some parser_from_wire() methods.

5 years agomore coverage for wire
Bob Halley [Fri, 3 Jul 2020 02:02:24 +0000 (19:02 -0700)] 
more coverage for wire

5 years agoMerge pull request #529 from bwelling/nsec3
Bob Halley [Thu, 2 Jul 2020 22:41:17 +0000 (15:41 -0700)] 
Merge pull request #529 from bwelling/nsec3

Consolidate NSEC/NSEC3/CSYNC bitmap handling.

5 years agolint 529/head
Brian Wellington [Thu, 2 Jul 2020 22:37:35 +0000 (15:37 -0700)] 
lint

5 years agoConsolidate NSEC/NSEC3/CSYNC bitmap handling.
Brian Wellington [Thu, 2 Jul 2020 22:29:25 +0000 (15:29 -0700)] 
Consolidate NSEC/NSEC3/CSYNC bitmap handling.

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.

5 years agoMerge pull request #528 from rthalley/parser
Bob Halley [Thu, 2 Jul 2020 22:20:53 +0000 (15:20 -0700)] 
Merge pull request #528 from rthalley/parser

Clean up wire format parsing.

5 years agoRework wire format processing. 528/head
Bob Halley [Thu, 2 Jul 2020 15:23:52 +0000 (08:23 -0700)] 
Rework wire format processing.

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()).

5 years agolint
Bob Halley [Wed, 1 Jul 2020 22:47:50 +0000 (15:47 -0700)] 
lint

5 years agoMerge pull request #527 from bwelling/tsigkey
Bob Halley [Wed, 1 Jul 2020 22:32:37 +0000 (15:32 -0700)] 
Merge pull request #527 from bwelling/tsigkey

Add dns.tsig.Key class.

5 years agoMerge pull request #526 from bwelling/amtrelay
Bob Halley [Wed, 1 Jul 2020 22:29:20 +0000 (15:29 -0700)] 
Merge pull request #526 from bwelling/amtrelay

Adds support for the AMTRELAY type

5 years agoBetter deal with backwards compatibility. 527/head
Brian Wellington [Wed, 1 Jul 2020 21:58:14 +0000 (14:58 -0700)] 
Better deal with backwards compatibility.

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.

5 years agoExplicitly use the key's algorithm.
Brian Wellington [Wed, 1 Jul 2020 20:23:57 +0000 (13:23 -0700)] 
Explicitly use the key's algorithm.

5 years agoAdd dns.tsig.Key class.
Brian Wellington [Wed, 1 Jul 2020 20:06:14 +0000 (13:06 -0700)] 
Add dns.tsig.Key class.

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.

5 years agoMerge remote-tracking branch 'upstream/master' into amtrelay 526/head
Brian Wellington [Wed, 1 Jul 2020 17:35:12 +0000 (10:35 -0700)] 
Merge remote-tracking branch 'upstream/master' into amtrelay

5 years agoAdd support for the AMTRELAY type.
Brian Wellington [Wed, 1 Jul 2020 17:32:19 +0000 (10:32 -0700)] 
Add support for the AMTRELAY type.

5 years agotry to deconfuse codecov
Bob Halley [Wed, 1 Jul 2020 17:15:19 +0000 (10:15 -0700)] 
try to deconfuse codecov

5 years ago2.0.0rc2 versioning
Bob Halley [Wed, 1 Jul 2020 15:05:58 +0000 (08:05 -0700)] 
2.0.0rc2 versioning

5 years agoupdate
Bob Halley [Wed, 1 Jul 2020 15:05:33 +0000 (08:05 -0700)] 
update

5 years agoturn off Cobertura; only cover dns dir
Bob Halley [Wed, 1 Jul 2020 14:47:22 +0000 (07:47 -0700)] 
turn off Cobertura; only cover dns dir

5 years agoincrease resolver coverage
Bob Halley [Wed, 1 Jul 2020 14:43:13 +0000 (07:43 -0700)] 
increase resolver coverage

5 years agoadd back no cover for things we cannot cover on windows without mocking
Bob Halley [Wed, 1 Jul 2020 14:27:51 +0000 (07:27 -0700)] 
add back no cover for things we cannot cover on windows without mocking

5 years agoexpose windows resolver code to coverage testing
Bob Halley [Wed, 1 Jul 2020 14:12:33 +0000 (07:12 -0700)] 
expose windows resolver code to coverage testing

5 years agogetting closer with codecov on azure...
Bob Halley [Wed, 1 Jul 2020 14:01:33 +0000 (07:01 -0700)] 
getting closer with codecov on azure...

5 years agoavoid low-level wait tests on Windows
Bob Halley [Wed, 1 Jul 2020 13:55:35 +0000 (06:55 -0700)] 
avoid low-level wait tests on Windows

5 years agoanother codecov on azure-pipelines attempt
Bob Halley [Wed, 1 Jul 2020 13:50:44 +0000 (06:50 -0700)] 
another codecov on azure-pipelines attempt

5 years agoremove ancient windows support
Bob Halley [Wed, 1 Jul 2020 13:42:30 +0000 (06:42 -0700)] 
remove ancient windows support

5 years agoupdate message.pyi to reflect sections change
Bob Halley [Wed, 1 Jul 2020 13:36:04 +0000 (06:36 -0700)] 
update message.pyi to reflect sections change

5 years agolint
Bob Halley [Wed, 1 Jul 2020 03:43:01 +0000 (20:43 -0700)] 
lint

5 years agomore query coverage
Bob Halley [Wed, 1 Jul 2020 03:41:48 +0000 (20:41 -0700)] 
more query coverage

5 years agoazure upload did not work; revert
Bob Halley [Wed, 1 Jul 2020 03:08:18 +0000 (20:08 -0700)] 
azure upload did not work; revert

5 years agotry to upload to codecov from azure-pipelines
Bob Halley [Wed, 1 Jul 2020 03:04:07 +0000 (20:04 -0700)] 
try to upload to codecov from azure-pipelines

5 years agoremove unused tox.ini
Bob Halley [Wed, 1 Jul 2020 02:34:03 +0000 (19:34 -0700)] 
remove unused tox.ini

5 years agoAdd Tokenizer.concatenate_remaining_identifiers()
Brian Wellington [Tue, 30 Jun 2020 23:35:20 +0000 (16:35 -0700)] 
Add Tokenizer.concatenate_remaining_identifiers()

Replace identical code duplicated in a number of rdatatype
implementations that concatenated all of the remaining tokens in order
to decode them.

5 years agoOne more dnssec test.
Brian Wellington [Tue, 30 Jun 2020 19:23:59 +0000 (12:23 -0700)] 
One more dnssec test.

5 years agoAdd more dnssec coverage testing.
Brian Wellington [Tue, 30 Jun 2020 19:15:35 +0000 (12:15 -0700)] 
Add more dnssec coverage testing.

5 years agoMerge pull request #525 from bwelling/tsig
Bob Halley [Tue, 30 Jun 2020 18:01:16 +0000 (11:01 -0700)] 
Merge pull request #525 from bwelling/tsig

Adds support for a TSIG record class.

5 years agoUpdate for OPT/TSIG changes. 525/head
Brian Wellington [Tue, 30 Jun 2020 17:46:24 +0000 (10:46 -0700)] 
Update for OPT/TSIG changes.

5 years agoRemove dns.message.Message multi field.
Brian Wellington [Tue, 30 Jun 2020 17:41:01 +0000 (10:41 -0700)] 
Remove dns.message.Message multi field.

The only user of this is the internal _WireReader class, so just pass it
the flag rather than store it on the message.

5 years agoFix documentation.
Brian Wellington [Tue, 30 Jun 2020 16:55:20 +0000 (09:55 -0700)] 
Fix documentation.

5 years agoTest (and fix) renderer.add_multi_tsig().
Brian Wellington [Tue, 30 Jun 2020 16:34:41 +0000 (09:34 -0700)] 
Test (and fix) renderer.add_multi_tsig().

5 years agoRemove the concept from "first" from TSIG.
Brian Wellington [Tue, 30 Jun 2020 16:27:06 +0000 (09:27 -0700)] 
Remove the concept from "first" from TSIG.

The sign() and validate() routines took a "first" parameter, which
indicated that this message was the first in a multi-message sequence.
This isn't needed, as it's identical to "not (ctx and multi)".

Remove the parameter from both, as well as the now-unneeded field in the
message object and message.from_wire() parameter.

5 years agoRemove spaces from to_text().
Brian Wellington [Tue, 30 Jun 2020 15:36:39 +0000 (08:36 -0700)] 
Remove spaces from to_text().

5 years agoStore a TSIG rrset on the message object.
Brian Wellington [Mon, 29 Jun 2020 21:55:35 +0000 (14:55 -0700)] 
Store a TSIG rrset on the message object.

5 years agoChange dns.tsig.validate() to take a TSIG record.
Brian Wellington [Mon, 29 Jun 2020 20:48:09 +0000 (13:48 -0700)] 
Change dns.tsig.validate() to take a TSIG record.

5 years agoCreate TSIGRecord; use it in _WireReader.
Brian Wellington [Mon, 29 Jun 2020 20:15:57 +0000 (13:15 -0700)] 
Create TSIGRecord; use it in _WireReader.

5 years agoincrease name test coverage
Bob Halley [Tue, 30 Jun 2020 15:24:41 +0000 (08:24 -0700)] 
increase name test coverage

5 years agoadd/adjust some no cover pragmas; fix missing catch of UnicodeError
Bob Halley [Tue, 30 Jun 2020 15:24:33 +0000 (08:24 -0700)] 
add/adjust some no cover pragmas; fix missing catch of UnicodeError

5 years agoincrease test coverage
Bob Halley [Tue, 30 Jun 2020 14:27:43 +0000 (07:27 -0700)] 
increase test coverage

5 years agoincrease update test coverage
Bob Halley [Tue, 30 Jun 2020 14:16:26 +0000 (07:16 -0700)] 
increase update test coverage

5 years agoMerge pull request #522 from nrhall/nrhall-update-changes-cosmetic
Bob Halley [Tue, 30 Jun 2020 13:14:02 +0000 (06:14 -0700)] 
Merge pull request #522 from nrhall/nrhall-update-changes-cosmetic

minor (cosmetic) fix to update sections

5 years agomove pytest-cov dependency to the dev section
Bob Halley [Tue, 30 Jun 2020 13:07:36 +0000 (06:07 -0700)] 
move pytest-cov dependency to the dev section

5 years agominor (cosmetic) fix to update sections 522/head
Nick Hall [Sun, 28 Jun 2020 23:56:19 +0000 (00:56 +0100)] 
minor (cosmetic) fix to update sections

5 years agofix indentation of test_bogus_family()
Bob Halley [Mon, 29 Jun 2020 14:34:21 +0000 (07:34 -0700)] 
fix indentation of test_bogus_family()

5 years agomore coverage improvements
Bob Halley [Mon, 29 Jun 2020 14:32:32 +0000 (07:32 -0700)] 
more coverage improvements

5 years agoopcode is a function not an attribute
Bob Halley [Mon, 29 Jun 2020 14:07:00 +0000 (07:07 -0700)] 
opcode is a function not an attribute

5 years agoadd basic renderer testing
Bob Halley [Mon, 29 Jun 2020 13:27:17 +0000 (06:27 -0700)] 
add basic renderer testing

5 years agoIn add_edns(), the value of _make_opt() is an RRSet not an rdataset.
Bob Halley [Mon, 29 Jun 2020 13:26:46 +0000 (06:26 -0700)] 
In add_edns(), the value of _make_opt() is an RRSet not an rdataset.

5 years agoincrease namedict coverage
Bob Halley [Mon, 29 Jun 2020 02:19:37 +0000 (19:19 -0700)] 
increase namedict coverage

5 years agoincrease coverage
Bob Halley [Mon, 29 Jun 2020 02:05:28 +0000 (19:05 -0700)] 
increase coverage