Skip to content

Commit

Permalink
fix netflow v9 flow set id (template & option)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadrad committed May 4, 2017
1 parent 7c4b68a commit 7d5795d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netflow/v9/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7d5795d

Please sign in to comment.