]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
DNS: convert info logs to debugs
authorVictor Julien <victor@inliniac.net>
Thu, 18 Jul 2013 05:10:07 +0000 (07:10 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 18 Jul 2013 05:10:07 +0000 (07:10 +0200)
src/app-layer-dns-common.c
src/app-layer-dns-tcp.c

index bccad58638594214427d08a15470cefec410c897..e824d8a8c4e98a9d1c794947a378820abdeb4109 100644 (file)
@@ -386,7 +386,7 @@ static uint16_t DNSResponseGetNameByOffset(const uint8_t * const input, const ui
         const uint16_t offset, uint8_t *fqdn, const size_t fqdn_size)
 {
     if (input + input_len < input + offset + 1) {
-        SCLogInfo("input buffer too small for domain of len %u", offset);
+        SCLogDebug("input buffer too small for domain of len %u", offset);
         goto insufficient_data;
     }
 
@@ -406,7 +406,7 @@ static uint16_t DNSResponseGetNameByOffset(const uint8_t * const input, const ui
             qdata = (const uint8_t *)input + offset;
 
             if (input + input_len < qdata + 1) {
-                SCLogInfo("input buffer too small");
+                SCLogDebug("input buffer too small");
                 goto insufficient_data;
             }
 
@@ -417,7 +417,7 @@ static uint16_t DNSResponseGetNameByOffset(const uint8_t * const input, const ui
 
         if (length > 0) {
             if (input + input_len < qdata + length) {
-                SCLogInfo("input buffer too small for domain of len %u", length);
+                SCLogDebug("input buffer too small for domain of len %u", length);
                 goto insufficient_data;
             }
             //PrintRawDataFp(stdout, qdata, length);
@@ -431,7 +431,7 @@ static uint16_t DNSResponseGetNameByOffset(const uint8_t * const input, const ui
         qdata += length;
 
         if (input + input_len < qdata + 1) {
-            SCLogInfo("input buffer too small for len field");
+            SCLogDebug("input buffer too small for len field");
             goto insufficient_data;
         }
 
@@ -472,13 +472,13 @@ static const uint8_t *SkipDomain(const uint8_t * const input,
             sdata += ((*sdata) + 1);
         }
         if (input + input_len < sdata) {
-            SCLogInfo("input buffer too small for data of len");
+            SCLogDebug("input buffer too small for data of len");
             goto insufficient_data;
         }
     }
     sdata++;
     if (input + input_len < sdata) {
-        SCLogInfo("input buffer too small for data of len");
+        SCLogDebug("input buffer too small for data of len");
         goto insufficient_data;
     }
     return sdata;
@@ -491,7 +491,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
         const uint32_t input_len, const uint8_t *data)
 {
     if (input + input_len < data + 2) {
-        SCLogInfo("input buffer too small for record 'name' field, record %u, "
+        SCLogDebug("input buffer too small for record 'name' field, record %u, "
                 "total answer_rr %u", num, ntohs(dns_header->answer_rr));
         goto insufficient_data;
     }
@@ -533,7 +533,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
     }
 
     if (input + input_len < data + sizeof(DNSAnswerHeader)) {
-        SCLogInfo("input buffer too small for DNSAnswerHeader");
+        SCLogDebug("input buffer too small for DNSAnswerHeader");
         goto insufficient_data;
     }
 
@@ -548,7 +548,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
             SCLogDebug("head->len %u", ntohs(head->len));
 
             if (input + input_len < data + ntohs(head->len)) {
-                SCLogInfo("input buffer too small for data of len %u", ntohs(head->len));
+                SCLogDebug("input buffer too small for data of len %u", ntohs(head->len));
                 goto insufficient_data;
             }
             SCLogDebug("TTL %u", ntohl(head->ttl));
@@ -599,7 +599,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
             SCLogDebug("head->len %u", ntohs(head->len));
 
             if (input + input_len < data + ntohs(head->len)) {
-                SCLogInfo("input buffer too small for data of len %u", ntohs(head->len));
+                SCLogDebug("input buffer too small for data of len %u", ntohs(head->len));
                 goto insufficient_data;
             }
 
@@ -630,7 +630,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
             data += sizeof(DNSAnswerHeader);
 
             if (input + input_len < data + ntohs(head->len)) {
-                SCLogInfo("input buffer too small for data of len %u", ntohs(head->len));
+                SCLogDebug("input buffer too small for data of len %u", ntohs(head->len));
                 goto insufficient_data;
             }
 
@@ -682,7 +682,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
                 } *tail = (struct Trailer *)tdata;
 
                 if (input + input_len < tdata + sizeof(struct Trailer)) {
-                    SCLogInfo("input buffer too small for data of len");
+                    SCLogDebug("input buffer too small for data of len");
                     goto insufficient_data;
                 }
 
@@ -705,7 +705,7 @@ const uint8_t *DNSReponseParse(DNSState *dns_state, const DNSHeader * const dns_
             data += sizeof(DNSAnswerHeader);
 
             if (input + input_len < data + ntohs(head->len)) {
-                SCLogInfo("input buffer too small for data of len %u", ntohs(head->len));
+                SCLogDebug("input buffer too small for data of len %u", ntohs(head->len));
                 goto insufficient_data;
             }
 
index 109c9e07abcbaee418d10f9e028d2c523f512653..498479181a5aafef6f37d40e8b1727831cc88477 100644 (file)
@@ -159,8 +159,10 @@ static int BufferData(DNSState *dns_state, uint8_t *data, uint16_t len) {
     }
 
     if ((uint32_t)len + (uint32_t)dns_state->offset > (uint32_t)dns_state->record_len) {
-        SCLogInfo("oh my, we have more data than the max record size. What do we do. WHAT DO WE DOOOOO!");
+        SCLogDebug("oh my, we have more data than the max record size. What do we do. WHAT DO WE DOOOOO!");
+#ifdef DEBUG
         BUG_ON(1);
+#endif
         len = dns_state->record_len - dns_state->offset;
     }