summaryrefslogtreecommitdiff
path: root/dns/edns.py
Commit message (Collapse)AuthorAgeFilesLines
* Add dns.edns.register_type().Brian Wellington2020-07-171-0/+10
| | | | This allows an application to register a custom EDNS option type.
* 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.
* Rework wire format processing.Bob Halley2020-07-021-21/+29
| | | | | | 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()).
* 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.
* The dns.inet.AF_* portability scheme is no longer needed.Bob Halley2020-06-161-2/+3
|
* Fix bugs found by flake8.Bob Halley2020-06-121-3/+3
|
* Updates to dns.edns module.Brian Wellington2020-06-081-27/+45
| | | | | Convert the option types to an enum, and allow the file parameter to to_wire() methods to be optional.
* 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().
* flake8 lintingBob Halley2020-05-151-7/+10
|
* Reharmonize doc style as I think it looks betterBob Halley2020-05-101-2/+3
|
* in doco, text->str, binary->bytesBob Halley2020-05-081-3/+3
|
* In cases where we care that something is just an IPv4 or IPv6 address,Bob Halley2020-05-041-3/+2
| | | | | | without any extras like IPv6 scope, explicitly use dns.ipv4 and dns.ipv6 instead of dns.inet. This will let us be tolerant of scopes in other cases (e.g. ordinary network connections).
* Remove "from __future__ import" statements.Brian Wellington2020-05-011-2/+0
| | | | None of these are needed anymore.
* Merge pull request #394 from kimbo/kl/ecs-__str__Bob Halley2019-10-231-0/+5
|\ | | | | added ecs __str__ function
| * added __str__ for GenericOptionkimbo2019-10-041-0/+2
| |
| * added ecs __str__ functionkimballo2019-10-031-0/+3
| |
* | fix python 3.5 format stringkimballo2019-10-031-5/+5
| |
* | added dns.edns.ECSOption.from_text()kimballo2019-10-031-0/+51
|/
* The EDNS0 client-subnet code didn't work correctly for addresses thatBob Halley2019-05-031-1/+2
| | | | | | | | were not a multiple of 8 bits. Instead of preserving the required number of high-order bits, it cleared that number of low-order bits. Thanks to Brian Wellington for discovering this and providing the correct code.
* update copyrightBob Halley2018-12-011-0/+2
|
* Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgradeHugo2018-09-061-2/+2
|
* more doco overhaulBob Halley2017-01-151-2/+24
|
* doc updateBob Halley2017-01-021-44/+44
|
* remove unused importBob Halley2016-12-021-1/+0
|
* Slighly improve ECS masking.Bob Halley2016-12-021-4/+4
|
* Clarify ceiling, add tests, fix doc, fix python3pascal.bouchareine2016-11-081-7/+13
| | | | | | | - bad class doc - explicit ceil - python3 encoding issue - improve edns testing
* make lint happypascal.bouchareine2016-11-031-2/+4
|
* Implement EDNS Client Subnet optionpascal.bouchareine2016-11-031-1/+89
|
* Fix typosJakub Wilk2016-05-261-2/+2
|
* python3 supportArthur Gautier2016-04-211-11/+19
| | | | Signed-off-by: Arthur Gautier <baloo@gandi.net>
* clean Tabdv2015-03-021-1/+1
|
* fix typosBob Halley2012-05-211-3/+3
|
* doco fixesBob Halley2012-04-081-2/+2
|
* update copyrightsBob Halley2011-05-121-1/+1
|
* make EDNS options comparableBob Halley2009-03-301-0/+47
|
* EDNS option supportBob Halley2009-03-301-0/+95