Commit Diff
Diff:
461510429d21eb890ff1e5e71bb34233a273709b
df69c8444df99c894380229a7ee0c618dbf97ebb
Commit:
df69c8444df99c894380229a7ee0c618dbf97ebb
Tree:
d2667c378e80d21ad9a20d5ccc34fb36909f8be6
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Aug 3 08:54:07 2020 UTC
Message:
work around a crash sitution with dig @delphinusdnsd . ns replies
blob - 228698104634c5a4dc793aee8820d5087cc43c3a
blob + 49ebee9b51ed5b7dd2737b4848d53caf75efde9a
--- cache.c
+++ cache.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: cache.c,v 1.11 2020/08/02 14:58:18 pjp Exp $
+ * $Id: cache.c,v 1.12 2020/08/03 08:54:07 pjp Exp $
*/
#include <sys/types.h>
@@ -134,7 +134,7 @@ int cache_generic(struct scache *);
static struct cache_logic supported_cache[] = {
{ DNS_TYPE_A, 0, cache_a },
- { DNS_TYPE_NS, 0, cache_ns },
+ /* { DNS_TYPE_NS, 0, cache_ns }, */
{ DNS_TYPE_MX, 0, cache_mx },
{ DNS_TYPE_PTR, 0, cache_ptr },
{ DNS_TYPE_AAAA, 0, cache_aaaa },
@@ -272,7 +272,8 @@ cacheit(u_char *payload, u_char *estart, u_char *end,
rrtype = ntohs(unpack16(pb));
/* caching ANY or RRSIG is a nono */
- if (rrtype == DNS_TYPE_ANY || rrtype == DNS_TYPE_RRSIG) {
+ if (rrtype == DNS_TYPE_ANY || rrtype == DNS_TYPE_RRSIG
+ || rrtype == DNS_TYPE_NS) {
return -1;
}
repomaster@centroid.eu