Skip to content

Commit

Permalink
Merge pull request #55 from cloudflare/feature/ipflag
Browse files Browse the repository at this point in the history
Collect IP flags #54
  • Loading branch information
lspgn authored Mar 2, 2020
2 parents 887fd9e + bc899a2 commit cf99955
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions producer/producer_nf.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,13 @@ func ConvertNetFlowDataSet(version uint16, baseTime uint32, uptime uint32, recor
case netflow.NFV9_FIELD_IPV4_IDENT:
DecodeUNumber(v, &(flowMessage.FragmentId))
case netflow.NFV9_FIELD_FRAGMENT_OFFSET:
DecodeUNumber(v, &(flowMessage.FragmentOffset))

var fragOffset uint32
DecodeUNumber(v, &fragOffset)
flowMessage.FragmentOffset |= fragOffset
case netflow.IPFIX_FIELD_fragmentFlags:
var ipFlags uint32
DecodeUNumber(v, &ipFlags)
flowMessage.FragmentOffset |= ipFlags
case netflow.NFV9_FIELD_IPV6_FLOW_LABEL:
DecodeUNumber(v, &(flowMessage.IPv6FlowLabel))

Expand Down

0 comments on commit cf99955

Please sign in to comment.