Skip to content

BIP155: mention IPv4-in-IPv6 range MUST NOT be sent within IPV6 - #2234

Merged
jonatack merged 1 commit into
bitcoin:masterfrom
brunoerg:2026-08-bip155
Aug 6, 2026
Merged

BIP155: mention IPv4-in-IPv6 range MUST NOT be sent within IPV6#2234
jonatack merged 1 commit into
bitcoin:masterfrom
brunoerg:2026-08-bip155

Conversation

@brunoerg

@brunoerg brunoerg commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

There was a discrepancy between Bitcoin Core and btcd - that I noticed with bitcoinfuzz - about the rejection of IPv4-in-IPv6 when parsing an addrv2 message. 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.

@brunoerg

brunoerg commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

cc @kcalvinalvin

@jonatack jonatack added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Aug 3, 2026

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK, good and correct clarification here, consistent with the behavior of BIP155's implementation in Bitcoin Core.

cc BIP author @laanwj for feedback or sign-off

@laanwj

laanwj commented Aug 6, 2026

Copy link
Copy Markdown
Member

ACK 8a4ed72
This is the correct interpretation according to the original idea. IPv6 address records should only be used for sending actual routable IPv6 addresses, not embedded addresses of other types. Those should get their own type id. In the case of IPv4, that already exists, of course.

@jonatack jonatack removed the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label Aug 6, 2026
@jonatack
jonatack merged commit ed4ffcb into bitcoin:master Aug 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Proposed BIP modification PR by non-owner to update BIP content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants