diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-12-20 02:31:40 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-12-20 03:21:52 +0100 |
commit | e1d3de3e173e2e1b31cfe0c7e8483eb205f4bb2d (patch) | |
tree | 3b9081680b2f63bc53f6688829d6ae1639a474b1 /lib/dnspython/dns/resolver.py | |
parent | 145868db15a67675492fbac52d9aecfa4dcf8c84 (diff) | |
download | samba-e1d3de3e173e2e1b31cfe0c7e8483eb205f4bb2d.tar.gz samba-e1d3de3e173e2e1b31cfe0c7e8483eb205f4bb2d.tar.bz2 samba-e1d3de3e173e2e1b31cfe0c7e8483eb205f4bb2d.zip |
dnspython: Merge in new upstream.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Dec 20 03:21:52 CET 2010 on sn-devel-104
Diffstat (limited to 'lib/dnspython/dns/resolver.py')
-rw-r--r-- | lib/dnspython/dns/resolver.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/dnspython/dns/resolver.py b/lib/dnspython/dns/resolver.py index f803eb6d20..30977f3a8b 100644 --- a/lib/dnspython/dns/resolver.py +++ b/lib/dnspython/dns/resolver.py @@ -61,6 +61,10 @@ class NoRootSOA(dns.exception.DNSException): This should never happen!""" pass +class NoMetaqueries(dns.exception.DNSException): + """Metaqueries are not allowed.""" + pass + class Answer(object): """DNS stub resolver answer @@ -571,8 +575,12 @@ class Resolver(object): qname = dns.name.from_text(qname, None) if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) + if dns.rdatatype.is_metatype(rdtype): + raise NoMetaqueries if isinstance(rdclass, (str, unicode)): rdclass = dns.rdataclass.from_text(rdclass) + if dns.rdataclass.is_metaclass(rdclass): + raise NoMetaqueries qnames_to_try = [] if qname.is_absolute(): qnames_to_try.append(qname) |