Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p/discover: handle IPv4 mapped in IPv6 addresses #22703

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

nisdas
Copy link
Contributor

@nisdas nisdas commented Apr 20, 2021

In the event a local node is binded to both an IPV4 and IPV6 interface, it will treat any inbound packets from an IPV4 address as a v4 in v6 mapped address. This leads to any source IPs being denominated in that fashion. The PR carries out a check so that v4 in v6 mapped addresses are reduced to their initial form which would be a simple IPv4 address. This also reduces the number of bytes in the ToIP field from 16 bytes to 4 bytes in a Pong packet.

@fjl fjl changed the title Handle IPV4 Mapped in IPV6 Addresses p2p/discover: handle IPv4 mapped in IPv6 addresses Apr 20, 2021
@fjl fjl self-assigned this Apr 20, 2021
@fjl fjl added this to the 1.10.3 milestone Apr 23, 2021
@fjl fjl merged commit 34f3c95 into ethereum:master Apr 23, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
…reum#22703)

When receiving PING from an IPv4 address over IPv6, the implementation sent
back a IPv4-in-IPv6 address. This change makes it reflect the IPv4 address.
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