-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Netflow input: Improve session reset detection and allow disabling #14904
Conversation
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
Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments.
Session reset detection was too sensitive and not resilent against out-of-order UDP packets.
This structure wasn't thread safe but it was used by different threads which can cause a crash.
5e30562
to
99e553f
Compare
@leehinman @andrewkroh I added another fix. Can you review again? |
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
detected, record templates for the given exporter will be dropped. This will | ||
cause flow loss until the exporter provides new templates. If set to `false`, | ||
{beatname_uc} will ignore sequence numbers, which can cause some invalid flows | ||
if the exporter process is reset. This option is only applicable to Netflow V9 |
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.
So an invalid flow could occur if the template changes after the Exporter Process reset?
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.
Technically, yes. In practice, I understand the exporter will first send the new templates after a reset as it doesn't make any sense to start sending flows before sending templates for them.
…lastic#14904) - New NetFlow option detect_sequence_reset Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments. - Improve session reset detection in Netflow Session reset detection was too sensitive and not resilent against out-of-order UDP packets. - Make logDebugWrapper thread safe This structure wasn't thread safe but it was used by different threads which can cause a crash. (cherry picked from commit c47b9a2)
…lastic#14904) - New NetFlow option detect_sequence_reset Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments. - Improve session reset detection in Netflow Session reset detection was too sensitive and not resilent against out-of-order UDP packets. - Make logDebugWrapper thread safe This structure wasn't thread safe but it was used by different threads which can cause a crash. (cherry picked from commit c47b9a2)
…14904) (#15350) - New NetFlow option detect_sequence_reset Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments. - Improve session reset detection in Netflow Session reset detection was too sensitive and not resilent against out-of-order UDP packets. - Make logDebugWrapper thread safe This structure wasn't thread safe but it was used by different threads which can cause a crash. (cherry picked from commit c47b9a2)
…tion and allow disabling (#15351) * Netflow input: Improve session reset detection and allow disabling (#14904) - New NetFlow option detect_sequence_reset Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments. - Improve session reset detection in Netflow Session reset detection was too sensitive and not resilent against out-of-order UDP packets. - Make logDebugWrapper thread safe This structure wasn't thread safe but it was used by different threads which can cause a crash. (cherry picked from commit c47b9a2)
…t detection and allow disabling (elastic#15351) * Netflow input: Improve session reset detection and allow disabling (elastic#14904) - New NetFlow option detect_sequence_reset Add option to allow disabling sequence number tracking, which can cause too many lost flows in some environments. - Improve session reset detection in Netflow Session reset detection was too sensitive and not resilent against out-of-order UDP packets. - Make logDebugWrapper thread safe This structure wasn't thread safe but it was used by different threads which can cause a crash. (cherry picked from commit 2325b77)
This adds a few fixes to Netflow input:
Also this adds a new config option
check_sequence_reset
to allow disable reset detection completely.