X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/8de0fa76b3e27b4a96db5c77415962117650afa7..129d80382ae266cd6f0bae8bf104f8452ae4314b:/src/query.c diff --git a/src/query.c b/src/query.c index a3ce68d..26a4df0 100644 --- a/src/query.c +++ b/src/query.c @@ -364,7 +364,9 @@ int adns_submit_reverse(adns_state ads, adns_queryflags flags, void *context, adns_query *query_r) { - if (type != adns_r_ptr && type != adns_r_ptr_raw) return EINVAL; + if (((type^adns_r_ptr) & adns_rrt_reprmask) && + ((type^adns_r_ptr_raw) & adns_rrt_reprmask)) + return EINVAL; return adns_submit_reverse_any(ads,addr,"in-addr.arpa", type,flags,context,query_r); }