Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/v3 #5816

Merged
merged 2 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
if (ires.tx_ptr == NULL)
break;

bool tx_skipped = false;
void *tx = ires.tx_ptr;
i = ires.tx_id; // actual tx id for the tx the IterFunc returned

Expand Down Expand Up @@ -950,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);
skipped = true;
tx_skipped = skipped = true;
} else {
inspected = true;
}
Expand All @@ -960,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);
skipped = true;
tx_skipped = skipped = true;
} else {
inspected = true;
}
Expand All @@ -969,15 +970,17 @@ void AppLayerParserTransactionsCleanup(Flow *f)

// If not a unidirectional transaction both sides are required to have
// been inspected.
if (!is_unidir && skipped) {
if (!is_unidir && tx_skipped) {
SCLogDebug("%p/%" PRIu64 " !is_unidir && tx_skipped", tx, i);
goto next;
}

// If this is a unidirectional transaction require only one side to be
// inspected, which the inspected flag tells us. This is also guarded
// with skip to limit this check to transactions that actually had the
// tx inspected flag checked.
if (is_unidir && skipped && !inspected) {
if (is_unidir && tx_skipped && !inspected) {
SCLogDebug("%p/%" PRIu64 " is_unidir && tx_skipped && !inspected", tx, i);
goto next;
}

Expand Down
4 changes: 2 additions & 2 deletions src/flow-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
memset(&sleep_startts, 0, sizeof(sleep_startts));
gettimeofday(&sleep_startts, NULL);
#endif
usleep(100);
usleep(250);

#ifdef FM_PROFILE
struct timeval sleep_endts;
Expand Down Expand Up @@ -1207,7 +1207,7 @@ static TmEcode FlowRecycler(ThreadVars *th_v, void *thread_data)
memset(&sleep_startts, 0, sizeof(sleep_startts));
gettimeofday(&sleep_startts, NULL);
#endif
usleep(100);
usleep(250);
#ifdef FM_PROFILE
struct timeval sleep_endts;
memset(&sleep_endts, 0, sizeof(sleep_endts));
Expand Down