Open Sarang-Sangram opened 4 years ago
right the timing check happens after the filter so it'd run until the filter is matched. It could be moved up at a non-zero but ultimately meaningless cost. The real skill here would be to try to do it at almost no cost.
The other "bug" in the current implementation is the reference time stamp isn't set until the first matched packet. I call it a "bug" in quotes here because "capture for n seconds after the first match" is useful and it's what it currently does under these constraints.
So I guess the way to maintain this albeit undocumented backward compatibility would be to make the timer still start on first match and the capture stop after the time lapse.
I'll do a PR that does this "at cost" - at a likely unmeasurable overhead and hopefully we'll be good to go.
so i've got two options for PRs to fix the issue. I like the second one myself - it's a stronger offering and maintains full backwards compatibility.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
While running the sysdig capture without any filters the -M time value is picked up correctly and ends after the time specified time
But if I am using filters it just runs endless and require me to send the break single to end it