int bypass = 0;
if ((ConfGetBool("stream.bypass", &bypass)) == 1) {
if (bypass == 1) {
- stream_config.bypass = 1;
- } else {
- stream_config.bypass = 0;
+ stream_config.flags |= STREAMTCP_INIT_FLAG_BYPASS;
}
- } else {
- stream_config.bypass = 0;
+ }
+
+ if (!quiet) {
+ SCLogConfig("stream \"bypass\": %s",
+ (stream_config.flags & STREAMTCP_INIT_FLAG_BYPASS)
+ ? "enabled" : "disabled");
}
int drop_invalid = 0;
stream_config.flags |= STREAMTCP_INIT_FLAG_DROP_INVALID;
}
- if (!quiet) {
- SCLogConfig("stream \"bypass\": %s", bypass ? "enabled" : "disabled");
- }
-
if ((ConfGetInt("stream.max-synack-queued", &value)) == 1) {
if (value >= 0 && value <= 255) {
stream_config.max_synack_queued = (uint8_t)value;
int StreamTcpBypassEnabled(void)
{
- return stream_config.bypass;
+ return (stream_config.flags & STREAMTCP_INIT_FLAG_BYPASS);
}
void TcpSessionSetReassemblyDepth(TcpSession *ssn, uint32_t size)
has been enabled */
#define STREAMTCP_INIT_FLAG_CHECKSUM_VALIDATION BIT_U8(0)
#define STREAMTCP_INIT_FLAG_DROP_INVALID BIT_U8(1)
+#define STREAMTCP_INIT_FLAG_BYPASS BIT_U8(2)
/*global flow data*/
typedef struct TcpStreamCnf_ {
uint16_t stream_init_flags; /**< new stream flags will be initialized to this */
+ /* coccinelle: TcpStreamCnf:flags:STREAMTCP_INIT_ */
uint8_t flags;
uint8_t max_synack_queued;
uint16_t reassembly_toserver_chunk_size;
uint16_t reassembly_toclient_chunk_size;
- int bypass;
bool streaming_log_api;
StreamingBufferConfig sbcnf;