Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IPFIX] Fix parsing when using buffered (TCP) input
When using a TCP input, packets' data are buffered before logstash tries do decode them. Therefore, our decode() function will receive chunks of "random" sizes, that might contain 1.4 PDU, 3 PDUs, etc. If we blindly consume the whole payload, the next call will most likely parse the middle of a PDU, which will result in an error. This commit makes sure each call consumes the data of 1 PDU, even if there are more trailing data.
- Loading branch information