Skip to content

p2p: skip netrestrict check for nodes without resolved IP#35282

Open
cuiweixie wants to merge 1 commit into
ethereum:masterfrom
cuiweixie:p2p/dial-skip-netrestrict-invalid-ip
Open

p2p: skip netrestrict check for nodes without resolved IP#35282
cuiweixie wants to merge 1 commit into
ethereum:masterfrom
cuiweixie:p2p/dial-skip-netrestrict-invalid-ip

Conversation

@cuiweixie

Copy link
Copy Markdown
Contributor

Summary

  • Skip the netrestrict check in checkDial when a node has no valid IP yet.
  • Hostname-only static nodes are resolved later in dialTask; applying netrestrict before resolution incorrectly rejected them.

Test plan

  • go test -short ./p2p/ -run TestDialSchedNetRestrict

Hostname-only static nodes have no valid IP at checkDial time and are
resolved later in dialTask. Applying netrestrict to them incorrectly
rejected the dial before resolution could happen.
@cuiweixie cuiweixie requested a review from fjl as a code owner July 2, 2026 14:55
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.

1 participant