From 7d5795dfe60087ffb9003306453219b9abea4d4e Mon Sep 17 00:00:00 2001 From: mehrdad arshad rad Date: Thu, 4 May 2017 17:22:28 +0000 Subject: [PATCH] fix netflow v9 flow set id (template & option) --- netflow/v9/decoder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netflow/v9/decoder.go b/netflow/v9/decoder.go index 4265159a..613f6698 100644 --- a/netflow/v9/decoder.go +++ b/netflow/v9/decoder.go @@ -348,12 +348,12 @@ func (d *Decoder) Decode(mem MemCache) (*Message, error) { } switch { - case setHeader.FlowSetID == 2: + case setHeader.FlowSetID == 0: // Template set tr := TemplateRecord{} tr.unmarshal(d.reader) mem.insert(tr.TemplateID, d.raddr, tr) - case setHeader.FlowSetID == 3: + case setHeader.FlowSetID == 1: // Option set tr := TemplateRecord{} tr.unmarshalOpts(d.reader)