diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-05-19 09:51:37 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-05-19 09:51:37 -0700 |
| commit | b89444da512cb306c8eccee0c52478002fb8ceca (patch) | |
| tree | b5200635985afc5999336949605b7b96dfd6e6f8 | |
| parent | 0c837057f035bf9b503987fccd5033b71dec78b0 (diff) | |
| download | dnspython-b89444da512cb306c8eccee0c52478002fb8ceca.tar.gz | |
Fix metatype check.
IANA has reserved types 128-255 as meta types, so that range should be
checked.
| -rw-r--r-- | dns/rdatatype.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/dns/rdatatype.py b/dns/rdatatype.py index 4e401af..68a5c2b 100644 --- a/dns/rdatatype.py +++ b/dns/rdatatype.py @@ -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): |
