]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Flow: Adding livedev and vlan_idx on flow
authorBendik Hagen <bendik@mnemonic.no>
Thu, 31 Jan 2019 21:32:25 +0000 (22:32 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 23 Apr 2019 07:55:17 +0000 (09:55 +0200)
Adding livedev and vlan_idx on flow, making it possible to use it for
logging in_iface on flow-logs and fix in_iface on psuedopackets.

src/flow-util.h
src/flow.h

index 68475fd6bfe9c13a0e527102e52952406b7eba6a..6707cd4831e6e7a9fc23c1f4499764537dbfcd13 100644 (file)
@@ -40,6 +40,8 @@
         (f)->sp = 0; \
         (f)->dp = 0; \
         (f)->proto = 0; \
+        (f)->livedev = NULL; \
+        (f)->vlan_idx = 0; \
         SC_ATOMIC_INIT((f)->flow_state); \
         SC_ATOMIC_INIT((f)->use_cnt); \
         (f)->tenant_id = 0; \
@@ -83,6 +85,8 @@
         (f)->sp = 0; \
         (f)->dp = 0; \
         (f)->proto = 0; \
+        (f)->livedev = NULL; \
+        (f)->vlan_idx = 0; \
         SC_ATOMIC_RESET((f)->flow_state); \
         SC_ATOMIC_RESET((f)->use_cnt); \
         (f)->tenant_id = 0; \
index feaa49f1dcff76b1f1cfc1babf900f277feef1d1..3d774338da638c062afd277d4bc46a9ba051d402 100644 (file)
@@ -343,6 +343,10 @@ typedef struct Flow_
     uint8_t proto;
     uint8_t recursion_level;
     uint16_t vlan_id[2];
+    uint8_t vlan_idx;
+
+    /** Incoming interface */
+    const struct LiveDevice_ *livedev;
 
     /** flow hash - the flow hash before hash table size mod. */
     uint32_t flow_hash;