]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix compile bad dereferences
authorsfd <stephen.donnelly@emulex.com>
Fri, 3 Jul 2015 04:43:02 +0000 (16:43 +1200)
committerVictor Julien <victor@inliniac.net>
Wed, 8 Jul 2015 14:08:06 +0000 (16:08 +0200)
The src/source-erf-dag.c code was not compiling. It looks like some stats counters were added but not tested as the dereferences are incorrect.

src/source-erf-dag.c

index 2614dd05b3dffc41719d99178476fd6b9b680bda..f66407122fcfd3ecbd64ed8cbb1eea6fc8b790c5 100644 (file)
@@ -442,7 +442,7 @@ ProcessErfDagRecords(ErfDagThreadVars *ewtn, uint8_t *top, uint32_t *pkts_read)
             break;
         case TYPE_ETH:
             if (dr->lctr) {
-                StatsAddUI64(tv, ewtn->drops, ntohs(dr->lctr));
+                StatsAddUI64(ewtn->tv, ewtn->drops, ntohs(dr->lctr));
             }
             break;
         default:
@@ -535,7 +535,7 @@ ProcessErfDagRecord(ErfDagThreadVars *ewtn, char *prec)
         p->ts.tv_sec++;
     }
 
-    StatsIncr(tv, ewtn->packets);
+    StatsIncr(ewtn->tv, ewtn->packets);
     ewtn->bytes += wlen;
 
     if (TmThreadsSlotProcessPkt(ewtn->tv, ewtn->slot, p) != TM_ECODE_OK) {