IPFIX field packetTotalCount(86) is ignored

Open
#407 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
networking

Research direction

The issue points to producer_nf.go and the netflow.IPFIX-FIELD_packetTotalCount field. Start by reading how that file maps other IPFIX fields into flowMessage values, then check the relevant tests for packet counts. Done means PacketTotalCount values populate flowMessage.Packets as the expected uint64.

Written by the indexing model from the issue text.

Description

bug

IPFIX packets that use the field packetTotalCount(86) for a flow's packet count are misinterpreted.

To Reproduce
Collect IPFIX packets that use the field packetTotalCount(86). yaf is a flowmeter that uses this field. Packet count in the flowMessage will be set to 0 by goflow2.

Expected behavior
flowMessage.Packets should contain the uint64 value in the field packetTotalCount(86).

Sampler device:
yaf

Additional context
Can be fixed by adding the case netflow.IPFIX-FIELD_packetTotalCount and setting flowMessage.Packets = binary.BigEndian.Uint64(v) in producer_nf.go

Dominant language
Go
Stars
817
Forks
182
Avg merge
4h 18m
Merged PRs (30d)
6

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netsampler/goflow2

All issues in netsampler/goflow2

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.