Skip to content

capture-bypass: force check statistics of bypassed flows v1#15332

Open
adaki4 wants to merge 1 commit intoOISF:mainfrom
adaki4:capture-bypass-force-check-stats
Open

capture-bypass: force check statistics of bypassed flows v1#15332
adaki4 wants to merge 1 commit intoOISF:mainfrom
adaki4:capture-bypass-force-check-stats

Conversation

@adaki4
Copy link
Copy Markdown
Contributor

@adaki4 adaki4 commented May 7, 2026

Description

This PR resolves an issue where Suricata did not collect statistics from capture-bypassed flows in the period from the last timeout check to shutdown. For example, if a flow were bypassed and Suricata shut down before a timeout check, the statistics from the bypassed part of the flow would not be counted toward the overall bypassed flow statistics.

Solution:
While using capture-bypass, force FlowManager to perform a final timeout check of all flows at shutdown to gather statistics for all capture-bypassed flows.

Changes:

  • Force timeout check for all flows at shutdown stage when using capture offload, resulting in calling BypassUpdate() on capture-bypassed flows
  • This issue was originally part of Capture bypass stats gather v4 #15289, this PR separates it for clarity.

SV_BRANCH=OISF/suricata-verify#3027

Links to ticket: 8440

This commit forces timeout check of all flows in the flow table at the
shutdown stage of Suricata.

Gathering of capture-bypassed flow statistics was left to the bypass
capture method via BypassUpdate callback. Until now, capture-bypassed
flows that did not timeout had their statistics unchecked in the period
between last check and shutdown. This commit forces gathering of
statistics from these flows.

Ticket: 8440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant