logstash-codec-netflow icon indicating copy to clipboard operation
logstash-codec-netflow copied to clipboard

netflow codec should override the encode method from the base filter class

Open TheVastyDeep opened this issue 3 years ago • 1 comments

logstash 7.15.2, installed using yum, run from the command line. The following configuration

input { generator { count => 1 lines => [ '' ] } }
output { udp { port  => 2055 codec => netflow host => "127.1.2.3" } }

results in a stack overflow, as noted in this issue raised against logstash-core, because of recursion between encode and multi-encode is the base filter.

It would be trivial to fix this in the codec by overriding encode with a method that raises an exception. The dots codec shows how to do this.

TheVastyDeep avatar Dec 01 '21 18:12 TheVastyDeep

thanks, for reference it's also been feature requested to support encoding with the codec https://github.com/logstash-plugins/logstash-codec-netflow/issues/185

kares avatar Dec 02 '21 12:12 kares