Skip to content

Commit

Permalink
For sampling.bps_ratio, apply min of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Mar 14, 2023
1 parent 82a19ca commit b716397
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Linux/hsflowconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,8 @@ extern "C" {
// samlping.bps_ratio=0 turns off the behavior, falling back on global default
if(bpsRatio > 0) {
sampling_n = adaptor->ifSpeed / bpsRatio;
if(sampling_n == 0)
sampling_n = 1;
method = HSP_BPS_RATIO;
}
}
Expand Down

0 comments on commit b716397

Please sign in to comment.