Commit Diff
Diff:
5416b6bfa47b5e09ec9e4ef16b368d050c8099a1
8dd630d53c6a3dfd4e738d207b6b27940f14b240
Commit:
8dd630d53c6a3dfd4e738d207b6b27940f14b240
Tree:
7924d5fb82e2eb91f23cfa59b24dca89aecbcb3b
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Jul 20 08:41:31 2020 UTC
Message:
avoid a cache "cloning bug" with RRSIG records, do not cache these when asking for them directly.
blob - c4a089abeb689678576be27cc87ce6cbc8ee7914
blob + 9a1a513e16f2e07085b50dea81c29ac7cddbd41e
--- cache.c
+++ cache.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: cache.c,v 1.9 2020/07/18 14:10:16 pjp Exp $
+ * $Id: cache.c,v 1.10 2020/07/20 08:41:31 pjp Exp $
*/
#include <sys/types.h>
@@ -271,8 +271,8 @@ cacheit(u_char *payload, u_char *estart, u_char *end,
rrtype = ntohs(unpack16(pb));
- /* caching and ANY question is a nono */
- if (rrtype == DNS_TYPE_ANY) {
+ /* caching ANY or RRSIG is a nono */
+ if (rrtype == DNS_TYPE_ANY || rrtype == DNS_TYPE_RRSIG) {
return -1;
}
repomaster@centroid.eu