Skip to content

Commit

Permalink
Try addding some more randomness to seed if track is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemann committed May 21, 2024
1 parent 491793d commit a04363a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ void *thread_hdl(void *temp)
// Generate seed (we use nanoseconds for better precision/randomness).
seed = ts.tv_nsec;

// Add some more randomness if track is enabled.
if (ti->seq.track)
{
seed ^= total_pckts[ti->seq_cnt];
}

// Check if we need to generate random IP TTL.
if (ti->seq.ip.min_ttl != ti->seq.ip.max_ttl)
{
Expand Down

0 comments on commit a04363a

Please sign in to comment.