diff --git a/src/flow-manager.c b/src/flow-manager.c index 0455b90ef0..09e190f46e 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -349,6 +349,10 @@ static uint32_t FlowManagerHashRowTimeout(Flow *f, struct timeval *ts, f->flow_end_flags |= FLOW_END_FLAG_STATE_ESTABLISHED; else if (state == FLOW_STATE_CLOSED) f->flow_end_flags |= FLOW_END_FLAG_STATE_CLOSED; + else if (state == FLOW_STATE_LOCAL_BYPASSED) + f->flow_end_flags |= FLOW_END_FLAG_STATE_BYPASSED; + else if (state == FLOW_STATE_CAPTURE_BYPASSED) + f->flow_end_flags |= FLOW_END_FLAG_STATE_BYPASSED; if (emergency) f->flow_end_flags |= FLOW_END_FLAG_EMERGENCY; diff --git a/src/flow.h b/src/flow.h index ec05ec1765..e42e21147b 100644 --- a/src/flow.h +++ b/src/flow.h @@ -190,6 +190,7 @@ typedef struct AppLayerParserState_ AppLayerParserState; #define FLOW_END_FLAG_TIMEOUT 0x10 #define FLOW_END_FLAG_FORCED 0x20 #define FLOW_END_FLAG_SHUTDOWN 0x40 +#define FLOW_END_FLAG_STATE_BYPASSED 0x80 /** Mutex or RWLocks for the flow. */ //#define FLOWLOCK_RWLOCK diff --git a/src/output-json-flow.c b/src/output-json-flow.c index 2d0f76acfe..8e34169e38 100644 --- a/src/output-json-flow.c +++ b/src/output-json-flow.c @@ -219,6 +219,8 @@ static void JsonFlowLogJSON(JsonFlowLogThread *aft, json_t *js, Flow *f) state = "established"; else if (f->flow_end_flags & FLOW_END_FLAG_STATE_CLOSED) state = "closed"; + else if (f->flow_end_flags & FLOW_END_FLAG_STATE_BYPASSED) + state = "bypassed"; json_object_set_new(hjs, "state", json_string(state));