-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipt_netflow: optionally seed initial template ID from PRNG
If we're always starting from 256, a module reload could result in the client getting data under template IDs that were used under the previous configuration and might not match (or worse, wrongly match). We add a compilation option to start the template ID range from a random number, reducing greatly the chances of such an accident occuring. Since we're starting from a random number, we now have to check for wrapping, as the random number might be close to 0xFFFF, which would mean exporting template with IDs under 256 that are reserved. v2: Fix the log output by keeping a separate count of the templates generated by the module. v3: Fixed incorrect if (by ABC). Signed-off-by: Simon Chopin <[email protected]>
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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