Skip to content

Commit

Permalink
Support up to 7 bytepad for Netflow IPFIX template (elastic#19131) (e…
Browse files Browse the repository at this point in the history
…lastic#19190)

Fixes elastic#18098

(cherry picked from commit fb94175)
  • Loading branch information
marc-gr authored Jun 15, 2020
1 parent f79387d commit 2535ca5
Show file tree
Hide file tree
Showing 4 changed files with 463 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fixed ingestion of some Cisco ASA and FTD messages when a hostname was used instead of an IP for NAT fields. {issue}14034[14034] {pull}18376[18376]
- Fix `o365.audit` failing to ingest events when ip address is surrounded by square brackets. {issue}18587[18587] {pull}18591[18591]
- Fix `o365` module ignoring `var.api` settings. {pull}18948[18948]
- Fix `netflow` module to support 7 bytepad for IPFIX template. {issue}18098[18098]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/netflow/decoder/v9/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func ReadFields(d Decoder, buf *bytes.Buffer, count int) (record template.Templa
func ReadTemplateFlowSet(d Decoder, buf *bytes.Buffer) (templates []*template.Template, err error) {
var row [4]byte
for {
if buf.Len() < 4 {
if buf.Len() < 8 {
return templates, nil
}
if n, err := buf.Read(row[:]); err != nil || n != len(row) {
Expand Down
Loading

0 comments on commit 2535ca5

Please sign in to comment.