Skip to content

Commit

Permalink
Fix metatype check.
Browse files Browse the repository at this point in the history
IANA has reserved types 128-255 as meta types, so that range should be
checked.
  • Loading branch information
bwelling committed May 19, 2020
1 parent 0c83705 commit b89444d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dns/rdatatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ def is_metatype(rdtype):
Returns a ``bool``.
"""

if rdtype >= TKEY and rdtype <= ANY or rdtype in _metatypes:
return True
return False
return (256 > rdtype >= 128) or rdtype in _metatypes


def is_singleton(rdtype):
Expand Down

0 comments on commit b89444d

Please sign in to comment.