tx: fix unidir tx cleanup

A unidirection protocol parser should only have its transactions
marked as "skipped" if it is skipped in both the TS and TC
directions, otherwise unidir transactions are always considered
skipped and the cleanup will never updates its minimum id.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4437
pull/6076/head
Jason Ish 4 years ago
parent fc7a443c3f
commit afaa18c5ad

@ -951,7 +951,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
if (!(detect_flags_ts & APP_LAYER_TX_INSPECTED_FLAG)) {
SCLogDebug("%p/%"PRIu64" skipping: TS inspect not done: ts:%"PRIx64,
tx, i, detect_flags_ts);
tx_skipped = skipped = true;
tx_skipped = true;
} else {
inspected = true;
}
@ -961,7 +961,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
if (!(detect_flags_tc & APP_LAYER_TX_INSPECTED_FLAG)) {
SCLogDebug("%p/%"PRIu64" skipping: TC inspect not done: tc:%"PRIx64,
tx, i, detect_flags_tc);
tx_skipped = skipped = true;
tx_skipped = true;
} else {
inspected = true;
}
@ -972,6 +972,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
// been inspected.
if (!is_unidir && tx_skipped) {
SCLogDebug("%p/%" PRIu64 " !is_unidir && tx_skipped", tx, i);
skipped = true;
goto next;
}
@ -981,6 +982,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
// tx inspected flag checked.
if (is_unidir && tx_skipped && !inspected) {
SCLogDebug("%p/%" PRIu64 " is_unidir && tx_skipped && !inspected", tx, i);
skipped = true;
goto next;
}

Loading…
Cancel
Save