-
Notifications
You must be signed in to change notification settings - Fork 34
conntrack: Add _IsFirst field
#328
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
Conversation
…& endConnectionTimeout
|
I don't understand how this helps. By counting the number of |
|
@KalmanMeth When the |
| "20s: no update report", | ||
| startTime.Add(20 * time.Second), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be 19 or less. 20 seems too borderline and it might just get an additional update report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a close look at the tests!
Since the update report was at time 11s, the next update should be at time 21s. So 21s is the borderline. That's why I check a second before (at 20s) that there are no updates and a second after (at 22s) that there is an update.
jotak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
This PR adds the
_IsFirstfield to connection records (newConnection,updateConnectionandendConnection).It's not added to
flowLogrecords.The field is set to true only on the first record of the connection.
It is useful in cases where
newConnectionrecords are not outputted (to reduce the number output records)and there is a need to count the total number of connections: simply counting
_IsFirst=trueThis solves #298