Fix IPv6 destination anonymization using wrong address#671
Merged
phaag merged 1 commit intophaag:masterfrom Apr 4, 2026
Merged
Fix IPv6 destination anonymization using wrong address#671phaag merged 1 commit intophaag:masterfrom
phaag merged 1 commit intophaag:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found a copy-paste issue in
nfanon.c— the IPv6 destinationanonymization block is passing
ipv6Flow->srcAddrtoanonymize_v6()instead of
ipv6Flow->dstAddr. So the anonymized destination ends upbeing 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
srcAddr→dstAddron theanonymize_v6callinside the
anon_dstblock.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.