Skip to content

ipv6 scope_id: set from first peer - #22717

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:first-peer-scope-id
Closed

icing wants to merge 2 commits into
curl:masterfrom
icing:first-peer-scope-id

Conversation

@icing

@icing icing commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

When not explicitly set, give the connection a present scope_id from the first peer of a connection, not from its origin. This accounts for proxies.

When not explicitly set, give the connection a present
scope_id from the first peer of a connection, not from
its origin. This accounts for proxies.
@icing
icing requested a review from bagder August 28, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates how conn->scope_id is chosen for IPv6 connections when the user has not explicitly set CURLOPT_SCOPE_ID, intending to use the first hop/peer’s scope rather than the request origin (to better handle proxy scenarios).

Changes:

  • Replace the default conn->scope_id source from data->state.origin->scopeid to Curl_conn_get_first_peer(...)->scopeid when no explicit scope_id is set.
  • Add a guard that errors out if the “first peer” cannot be obtained.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/url.c Outdated
@bagder bagder closed this in 5d2b867 Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants