BIP155: mention IPv4-in-IPv6 range MUST NOT be sent within IPV6 - #2234
Open
brunoerg wants to merge 1 commit into
Open
BIP155: mention IPv4-in-IPv6 range MUST NOT be sent within IPV6#2234brunoerg wants to merge 1 commit into
brunoerg wants to merge 1 commit into
Conversation
Contributor
Author
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.
There was a discrepancy between Bitcoin Core and btcd - that I noticed with bitcoinfuzz - about the rejection of IPv4-in-IPv6 when parsing an
addrv2message. btcd ended up implemented the same behavior while it raised a discussion about this not being mentioned in the BIP.Rejecting this kind of addresses is important for canonical encoding. The whole point of this BIP is having exactly one representation for each network. Besided that, there are other reasons such as reachability accounting, defense against evasion/bypassing address‑type policy, etc.
That said, this PR changes BIP155 to document the behavior where IPv4 addresses embedded in IPv6 should be rejected.