fix(inputs.netflow): Cast TCP ports to uint16 (#16197)

Co-authored-by: jlgonzalez <jlgonzalez@sarenet.es>
This commit is contained in:
Jose Luis Gonzalez Calvo 2024-11-18 16:37:13 +01:00 committed by GitHub
parent e28c33e5d9
commit 427b8d3a9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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