stream-tcp: no checksum alert if validation is off

This patch disables checksum alert if checksum-validation is set
to no in the configuration file. Without this patch, when parsing
a pcap which checksum offloading, it was not possible to get rid
of event caused by checksum validation.
pull/2/head
Eric Leblond 13 years ago committed by Victor Julien
parent c51a3aad17
commit 11c3167583

@ -3737,12 +3737,14 @@ TmEcode StreamTcp (ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, Packe
return TM_ECODE_OK;
}
if ((stream_config.flags & STREAMTCP_INIT_FLAG_CHECKSUM_VALIDATION) &&
(StreamTcpValidateChecksum(p) == 0))
{
if (stream_config.flags & STREAMTCP_INIT_FLAG_CHECKSUM_VALIDATION) {
if (StreamTcpValidateChecksum(p) == 0) {
SCPerfCounterIncr(stt->counter_tcp_invalid_checksum, tv->sc_perf_pca);
return TM_ECODE_OK;
}
} else {
p->flags |= PKT_IGNORE_CHECKSUM;
}
PACKET_PROFILING_APP_RESET(&stt->ra_ctx->dp_ctx);

Loading…
Cancel
Save