summaryrefslogtreecommitdiffstats
path: root/rfc1035/rfc1035reply.c
diff options
context:
space:
mode:
authorSam Varshavchik2020-05-07 22:49:32 -0400
committerSam Varshavchik2020-05-07 22:49:32 -0400
commitc9982ab6a25c0cd95bfc0867dc8cab991786ddb5 (patch)
treeef5010016d5c2a6afbcd54a583c8d0c045f87006 /rfc1035/rfc1035reply.c
parent531c5ca6c1290dfc036f6149199cb9c19ba23ab1 (diff)
downloadcourier-libs-c9982ab6a25c0cd95bfc0867dc8cab991786ddb5.tar.bz2
More simultaneous DNS query support.
Diffstat (limited to 'rfc1035/rfc1035reply.c')
-rw-r--r--rfc1035/rfc1035reply.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/rfc1035/rfc1035reply.c b/rfc1035/rfc1035reply.c
index ac1e87e..ab43dfb 100644
--- a/rfc1035/rfc1035reply.c
+++ b/rfc1035/rfc1035reply.c
@@ -489,7 +489,10 @@ void rfc1035_rr_rand_ar(struct rfc1035_reply *rr)
void rfc1035_rr_rand(struct rfc1035_reply *rr)
{
- rfc1035_rr_rand_an(rr);
- rfc1035_rr_rand_ns(rr);
- rfc1035_rr_rand_ar(rr);
+ if (rr->ancount > 1)
+ rfc1035_rr_rand_an(rr);
+ if (rr->nscount > 1)
+ rfc1035_rr_rand_ns(rr);
+ if (rr->arcount > 1)
+ rfc1035_rr_rand_ar(rr);
}