pcap-file: synchronize PCAP filename output v1#13643
Closed
lukashino wants to merge 2 commits into
Closed
Conversation
added 2 commits
July 24, 2025 10:20
PcapFileInfo is a structure which will be referenced by packets/flows. Ticket: 5255
When RX thread was reading packets from multiple PCAPs, it held internally pcap_filename variable of the currently processed PCAP. This variable, accessed through PcapFileGetFilename(), was used to add pcap_filename property to all eve.json events by all threads. However, as RX thread is connected to Worker/Detect threads with queues, packets of previous PCAPs were still in queues, while RX thread was reading different PCAPs. This is a synchronizaiton issue. PcapFileInfo structure is used to reference the PCAP file name. RX thread associates the structure with all packets, Workers in turn associate the flow with the filename. PcapFileGetFilename() is still used when reporting stats events. Ticket: 5255
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #13643 +/- ##
==========================================
- Coverage 83.69% 83.20% -0.49%
==========================================
Files 1011 1012 +1
Lines 275071 275118 +47
==========================================
- Hits 230210 228910 -1300
- Misses 44861 46208 +1347
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
ERROR: ERROR: QA failed on IPS_AFP_trex. Pipeline = 27052 |
|
ERROR: ERROR: QA failed on IPS_AFP_trex. Pipeline = 27054 |
|
ERROR: ERROR: QA failed on IPS_AFP_trex. Pipeline = 27056 |
|
no idea how this is causing a failure at the same spot. the weird part is that isn't even the suricata side. |
Contributor
Author
|
continue in #13652 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/5255
Describe changes:
When RX thread was reading packets from multiple PCAPs, it held
internally pcap_filename variable of the currently processed PCAP.
This variable, accessed through PcapFileGetFilename(), was used to add
pcap_filename property to all eve.json events by all threads.
However, as RX thread is connected to Worker/Detect threads with queues,
packets of previous PCAPs were still in queues, while RX thread was
reading different PCAPs. This is a synchronizaiton issue.
PcapFileInfo structure is used to reference the PCAP file name. RX
thread associates the structure with all packets, Workers in turn
associate the flow with the filename. PcapFileGetFilename() is still
used when reporting stats events.