changeset 386:e27e22f6a49a

start parsing spf txt records
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Mar 2017 15:03:38 -0800
parents be7355b47051
children 616e46e9b8f0
files src/dnsbl.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/dnsbl.cpp	Mon Mar 06 14:30:41 2017 -0800
+++ b/src/dnsbl.cpp	Mon Mar 06 15:03:38 2017 -0800
@@ -151,7 +151,7 @@
 struct glommer {
     size_t  length;
     #ifdef NS_PACKETSZ
-        u_char answer[NS_PACKETSZ*4];   // with a resolver, we return resolver answers
+        u_char answer[NS_PACKETSZ*8];   // with a resolver, we return resolver answers
     #else
         uint32_t answer;                // without a resolver, we return a single ipv4 address in network byte order, 0 == no answer
     #endif
@@ -887,12 +887,12 @@
 
         // find the answer
 #ifdef NS_PACKETSZ
+        int res_result = res_search(question+1, ns_c_in, int8_t(question[0]), glom.answer, sizeof(glom.answer));
         //#ifdef RESOLVER_DEBUG
             char text[1000];
-            snprintf(text, sizeof(text), "process_resolver_requests() has a question %s qtype %d", question+1, int8_t(question[0]));
+            snprintf(text, sizeof(text), "process_resolver_requests() has a question %s qtype %d buf len %d result %d", question+1, int8_t(question[0]), sizeof(glom.answer), res_result);
             my_syslog(text);
         //#endif
-        int res_result = res_search(question+1, ns_c_in, int8_t(question[0]), glom.answer, sizeof(glom.answer));
         if (res_result < 0) glom.length = 0;   // represent all errors as zero length answers
         else                glom.length = (size_t)res_result;
 #else