Skip to content

Commit

Permalink
fix(inputs.netflow): Cast TCP ports to uint16 (influxdata#16197)
Browse files Browse the repository at this point in the history
Co-authored-by: jlgonzalez <[email protected]>
  • Loading branch information
joseluisgonzalezca and jlgonzalez authored Nov 18, 2024
1 parent e28c33e commit 427b8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/netflow/sflow_v5.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ func (d *sflowv5Decoder) decodeRawHeaderSample(record *sflow.SampledHeader) (map
fields["dst"] = l.DstIP.String()
fields["ip_total_len"] = l.Length
case *layers.TCP:
fields["src_port"] = l.SrcPort
fields["dst_port"] = l.DstPort
fields["src_port"] = uint16(l.SrcPort)
fields["dst_port"] = uint16(l.DstPort)
fields["tcp_seq_number"] = l.Seq
fields["tcp_ack_number"] = l.Ack
fields["tcp_window_size"] = l.Window
Expand Down

0 comments on commit 427b8d3

Please sign in to comment.