]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dag: Skip over ERF_TYPE_META records
authorStephen Donnelly <stephen.donnelly@endace.com>
Thu, 5 Mar 2020 21:49:17 +0000 (10:49 +1300)
committerJeff Lucovsky <jeff@lucovsky.org>
Sun, 22 Mar 2020 15:40:07 +0000 (11:40 -0400)
Suricata generates an error on unrecognised ERF types.
Suricata should ignore ERF 'Provenance' records with ERF_TYPE_META.

(cherry picked from commit 47082dd5df1b71485333039cd6af75b39cdfffeb)

src/source-erf-dag.c

index 9d4e34fc54ca43e41e472100138c8e800afcece9..1bd9a506f1ca795c54a7c4b7d792b6b5f581372f 100644 (file)
@@ -432,16 +432,17 @@ ProcessErfDagRecords(ErfDagThreadVars *ewtn, uint8_t *top, uint32_t *pkts_read)
 
         /* Only support ethernet at this time. */
         switch (hdr_type & 0x7f) {
-        case TYPE_PAD:
+        case ERF_TYPE_PAD:
+        case ERF_TYPE_META:
             /* Skip. */
             continue;
-        case TYPE_DSM_COLOR_ETH:
-        case TYPE_COLOR_ETH:
-        case TYPE_COLOR_HASH_ETH:
+        case ERF_TYPE_DSM_COLOR_ETH:
+        case ERF_TYPE_COLOR_ETH:
+        case ERF_TYPE_COLOR_HASH_ETH:
             /* In these types the color value overwrites the lctr
              * (drop count). */
             break;
-        case TYPE_ETH:
+        case ERF_TYPE_ETH:
             if (dr->lctr) {
                 StatsAddUI64(ewtn->tv, ewtn->drops, SCNtohs(dr->lctr));
             }