if (f->proto == IPPROTO_TCP && f->protoctx != NULL) {
TcpSession *ssn = f->protoctx;
StatsIncr(tv, fec->flow_tcp_state[ssn->state]);
- if (ssn->lossy_be_liberal) {
+ if (ssn->flags & STREAMTCP_FLAG_LOSSY_BE_LIBERAL) {
StatsIncr(tv, fec->flow_tcp_liberal);
}
}
#define STREAMTCP_FLAG_CLIENT_SACKOK BIT_U32(9)
/** Flag to indicate both sides of the session permit SACK (SYN + SYN/ACK) */
#define STREAMTCP_FLAG_SACKOK BIT_U32(10)
-// vacancy
+/** Session is in "lossy" state, be liberal */
+#define STREAMTCP_FLAG_LOSSY_BE_LIBERAL BIT_U32(11)
/** 3WHS confirmed by server -- if suri sees 3whs ACK but server doesn't (pkt
* is lost on the way to server), SYN/ACK is retransmitted. If server sends
* normal packet we assume 3whs to be completed. Only used for SYN/ACK resend
int8_t data_first_seen_dir;
/** track all the tcp flags we've seen */
uint8_t tcp_packet_flags;
- bool lossy_be_liberal;
/* coccinelle: TcpSession:flags:STREAMTCP_FLAG */
uint32_t flags;
uint32_t reassembly_depth; /**< reassembly depth for the stream */
if (seg == NULL) {
SCLogDebug("segment_pool is empty");
StreamTcpSetEvent(p, STREAM_REASSEMBLY_NO_SEGMENT);
- ssn->lossy_be_liberal = true;
+ ssn->flags |= STREAMTCP_FLAG_LOSSY_BE_LIBERAL;
SCReturnInt(-1);
}
tv, ra_ctx, stream, seg, p, TCP_GET_SEQ(p), p->payload, p->payload_len);
if (r < 0) {
if (r == -ENOMEM) {
- ssn->lossy_be_liberal = true;
+ ssn->flags |= STREAMTCP_FLAG_LOSSY_BE_LIBERAL;
}
SCLogDebug("StreamTcpReassembleInsertSegment failed");
SCReturnInt(-1);
StreamTcpSetEvent(p, STREAM_REASSEMBLY_SEQ_GAP);
(*stream)->flags |= STREAMTCP_STREAM_FLAG_HAS_GAP;
StatsIncr(tv, ra_ctx->counter_tcp_reass_gap);
- ssn->lossy_be_liberal = true;
+ ssn->flags |= STREAMTCP_FLAG_LOSSY_BE_LIBERAL;
/* AppLayerHandleTCPData has likely updated progress. */
const bool no_progress_update = (app_progress == STREAM_APP_PROGRESS(*stream));
{
uint8_t os_policy;
- if (ssn->lossy_be_liberal) {
+ if (ssn->flags & STREAMTCP_FLAG_LOSSY_BE_LIBERAL) {
SCReturnInt(1);
}