Skip to content

Fix IPv6 destination anonymization using wrong address#671

Merged
phaag merged 1 commit intophaag:masterfrom
castillo-n:fix/ipv6-dst-anon-uses-src
Apr 4, 2026
Merged

Fix IPv6 destination anonymization using wrong address#671
phaag merged 1 commit intophaag:masterfrom
castillo-n:fix/ipv6-dst-anon-uses-src

Conversation

@castillo-n
Copy link
Copy Markdown

Found a copy-paste issue in nfanon.c — the IPv6 destination
anonymization block is passing ipv6Flow->srcAddr to anonymize_v6()
instead of ipv6Flow->dstAddr. So the anonymized destination ends up
being derived from the source address, not the actual destination.

This breaks the flow relationship in the anonymized output for any
IPv6 traffic since both addresses end up based on the same source.

One-line fix — just srcAddrdstAddr on the anonymize_v6 call
inside the anon_dst block.

I ran into this while reading through the code to integrate nfanon
into a project I'm working on. The IPv4 path handles it correctly,
so this looks like it was just a copy-paste slip from the src block
above it.

The anon_dst block in AnonRecord() passes srcAddr to anonymize_v6()
instead of dstAddr, so the destination ends up with an anonymized
copy of the source rather than its own address.
Copy link
Copy Markdown
Owner

@phaag phaag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@phaag phaag merged commit 13259cc into phaag:master Apr 4, 2026
1 check passed
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