Skip to content

Commit e72bddf

Browse files
authored
Add newly allocated EDE INFO-CODEs (#1268)
These are from the "Extended DNS Error Codes" registry in the "Domain Name System (DNS) Parameters" registry group.
1 parent 30f9dc9 commit e72bddf

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

dns/edns.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,14 @@ class EDECode(dns.enum.IntEnum):
357357
NO_REACHABLE_AUTHORITY = 22
358358
NETWORK_ERROR = 23
359359
INVALID_DATA = 24
360+
SIGNATURE_EXPIRED_BEFORE_VALID = 25
361+
TOO_EARLY = 26
362+
UNSUPPORTED_NSEC3_ITERATIONS_VALUE = 27
363+
UNABLE_TO_CONFORM_TO_POLICY = 28
364+
SYNTHESIZED = 29
365+
INVALID_QUERY_TYPE = 30
366+
RATE_LIMITED = 31
367+
OVER_QUOTA = 32
360368

361369
@classmethod
362370
def _maximum(cls):

tests/test_message.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,7 @@ def test_section_count_update(self):
10121012
def test_extended_errors(self):
10131013
options = [
10141014
dns.edns.EDEOption(dns.edns.EDECode.NETWORK_ERROR, "tubes not tubing"),
1015+
dns.edns.EDEOption(dns.edns.EDECode.RATE_LIMITED, "don't ddos me"),
10151016
dns.edns.EDEOption(dns.edns.EDECode.OTHER, "catch all code"),
10161017
]
10171018
r = dns.message.make_query("example", "A", use_edns=0, options=options)

0 commit comments

Comments
 (0)