From a01130d2eda6e018b38805e51a6aa7893f6488ae Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 4 Oct 2012 13:20:27 +0200 Subject: [PATCH] packet src: move pkt_src field up in the structure to fix in an existing hole (found with pahole -C Packet_ src/.libs/suricata). --- src/decode.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/decode.h b/src/decode.h index a514e7fa4e..50036192ba 100644 --- a/src/decode.h +++ b/src/decode.h @@ -371,6 +371,9 @@ typedef struct Packet_ uint16_t flags; /* flow */ uint8_t flowflags; + + uint8_t pkt_src; + struct Flow_ *flow; struct timeval ts; @@ -501,8 +504,6 @@ typedef struct Packet_ uint16_t mpm_offsets[CUDA_MAX_PAYLOAD_SIZE + 1]; #endif - uint8_t pkt_src; - #ifdef PROFILING PktProfiling profile; #endif @@ -639,6 +640,7 @@ typedef struct DecodeThreadVars_ (p)->recursion_level = 0; \ (p)->flags = 0; \ (p)->flowflags = 0; \ + (p)->pkt_src = 0; \ (p)->flow = NULL; \ (p)->ts.tv_sec = 0; \ (p)->ts.tv_usec = 0; \ @@ -690,7 +692,6 @@ typedef struct DecodeThreadVars_ (p)->root = NULL; \ (p)->livedev = NULL; \ (p)->ReleaseData = NULL; \ - (p)->pkt_src = 0; \ PACKET_RESET_CHECKSUMS((p)); \ PACKET_PROFILING_RESET((p)); \ } while (0) -- 2.47.3