Skip to content

Allow repeated IPFIX IEs and safe zero-length NetFlow v9 fields - #299

Merged
mikemiles-dev merged 1 commit into
mikemiles-dev:mainfrom
ktsaou:fix/repeated-ipfix-and-zero-length-v9-fields
Jul 18, 2026
Merged

Allow repeated IPFIX IEs and safe zero-length NetFlow v9 fields#299
mikemiles-dev merged 1 commit into
mikemiles-dev:mainfrom
ktsaou:fix/repeated-ipfix-and-zero-length-v9-fields

Conversation

@ktsaou

@ktsaou ktsaou commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Accept repeated Information Elements in IPFIX templates, as required by RFC 7011 Section 8.
  • Allow individual zero-length fields in NetFlow v9 templates and options templates when the complete record still has a nonzero size.
  • Continue rejecting all-zero records and the IPFIX variable-length sentinel in v9 templates.
  • Apply the same v9 validation rules to v9 templates carried through the IPFIX parser.

Motivation

The duplicate-field check rejects valid IPFIX templates that repeat the same Information Element. RFC 7011 explicitly requires collectors to support this pattern.

The v9 zero-length check rejects complete records that are safe to parse because another member consumes input. Rejecting only templates whose total record size is zero preserves the infinite-loop guard without discarding those records.

Tests

  • Added end-to-end template and data parsing tests for both cases.
  • Added validation tests for safe zero-length members and all-zero rejection.
  • cargo test
  • cargo clippy --all -- -D warnings
  • cargo test --doc
  • ./scripts/check-readme-sync.sh

RFC reference: https://www.rfc-editor.org/rfc/rfc7011.html#section-8

@mikemiles-dev

Copy link
Copy Markdown
Owner

Thanks for the contribution!

@mikemiles-dev
mikemiles-dev merged commit 46921ec into mikemiles-dev:main Jul 18, 2026
6 checks passed
mikemiles-dev added a commit that referenced this pull request Jul 18, 2026
Bump version to 1.0.5 and document the fix from #299 (accept repeated
IPFIX fields and safe zero-length V9 fields).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants