SCLogConfig("stream \"memcap\": %"PRIu64, SC_ATOMIC_GET(stream_config.memcap));
}
- ConfGetBool("stream.midstream", &stream_config.midstream);
+ int imidstream;
+ ConfGetBool("stream.midstream", &imidstream);
+ stream_config.midstream = imidstream != 0;
if (!quiet) {
SCLogConfig("stream \"midstream\" session pickups: %s", stream_config.midstream ? "enabled" : "disabled");
/* SYN/ACK */
} else if ((p->tcph->th_flags & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK)) {
- if (stream_config.midstream == FALSE &&
- stream_config.async_oneside == FALSE)
+ if (!stream_config.midstream && stream_config.async_oneside == FALSE)
return 0;
if (ssn == NULL) {
ssn->client.last_ack);
} else if (p->tcph->th_flags & TH_ACK) {
- if (stream_config.midstream == FALSE)
+ if (!stream_config.midstream)
return 0;
if (ssn == NULL) {
return 1;
}
- if (stream_config.midstream == TRUE || stream_config.async_oneside == TRUE) {
+ if (stream_config.midstream || stream_config.async_oneside == TRUE) {
if (p->tcph->th_flags == (TH_SYN|TH_ACK)) {
SCLogDebug("packet %"PRIu64" is a midstream stream starter: %02x", p->pcap_cnt, p->tcph->th_flags);
return 1;
return TcpSessionReuseDoneEnoughSyn(p, f, ssn);
}
- if (stream_config.midstream == TRUE || stream_config.async_oneside == TRUE) {
+ if (stream_config.midstream || stream_config.async_oneside == TRUE) {
if (p->tcph->th_flags == (TH_SYN|TH_ACK)) {
return TcpSessionReuseDoneEnoughSynAck(p, f, ssn);
}
uint32_t prealloc_sessions; /**< ssns to prealloc per stream thread */
uint32_t prealloc_segments; /**< segments to prealloc per stream thread */
- int midstream;
+ bool midstream;
int async_oneside;
uint32_t reassembly_depth; /**< Depth until when we reassemble the stream */
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
- if (stream_config.midstream != TRUE) {
+ if (!stream_config.midstream) {
ret = 1;
goto end;
}