logstash-plugins / logstash-codec-netflow

Apache License 2.0
79 stars 88 forks source link

Netflow v5/v9: Incorrect time calculation for first switched and last switched (part 2) #174

Open ghost opened 5 years ago

ghost commented 5 years ago

In /lib/logstash/codecs/netflow.rb the calculation of absolute timestamps for "first_switched" and "last_switched" is incorrect due to syntax error:

Ruby doesn't support --/++ operators. Unfortunately jruby doesn't even show an error; it just ignores the line.

Solution: Line 141 replace seconds-- by seconds -= 1