Skip to content

Commit

Permalink
decoders: fix netflow legacy/v5 sampling interval (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn authored May 25, 2023
1 parent e657df6 commit e5696f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions decoders/netflowlegacy/netflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func DecodeMessage(payload *bytes.Buffer) (interface{}, error) {
&(packet.SamplingInterval),
)

packet.SamplingInterval = packet.SamplingInterval & 0x3FFF

packet.Records = make([]RecordsNetFlowV5, int(packet.Count))
for i := 0; i < int(packet.Count) && payload.Len() >= 48; i++ {
record := RecordsNetFlowV5{}
Expand Down

0 comments on commit e5696f1

Please sign in to comment.