Skip to content

connection bit ipv6_ip misleading, remove - #20919

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:conn-bits-ipv6_ip-bug
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:conn-bits-ipv6_ip-bug

Conversation

@icing

@icing icing commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Eliminate conn->bits.ipv6_ip

The bit was only correct for the first transfer using a connection. Use data->state.up.hostname instead in places that need the URL hostname in its original form.

Fix parseurlandfillconn() to not modify data->state.up.hostname before copying the connection's hostname, but modify the copy instead, leaving the URL hostname intact.

The connectdata bit `ipv6_ip` is set from the URL of the transfer
*creating* the connection. When the connection is reused, the bit
is not inherited from the "needle".

A modified test2058 fails when running a curl built without proxy
support.
@github-actions github-actions Bot added the tests label Mar 13, 2026
The bit was only correct for the first transfer using a connection.
Use `data->state.up.hostname` instead in places that need the URL
hostname in its original form.

Fix parseurlandfillconn() to not modify `data->state.up.hostname`
before copying the connection's hostname, but modify the copy instead,
leaving the URL hostname intact.
@icing icing changed the title connection bit ipv6_ip is wrong connection bit ipv6_ip misleading, remove Mar 13, 2026
@curl curl deleted a comment from testclutch Mar 13, 2026
@icing
icing marked this pull request as ready for review March 13, 2026 15:19
@icing
icing requested a review from bagder March 13, 2026 15:20
@bagder bagder closed this in 412cd25 Mar 14, 2026
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Eliminate `conn->bits.ipv6_ip`

The bit was only correct for the first transfer using a connection. Use
`data->state.up.hostname` instead in places that need the URL hostname
in its original form.

Fix parseurlandfillconn() to not modify `data->state.up.hostname` before
copying the connection's hostname, but modify the copy instead, leaving
the URL hostname intact.

Closes curl#20919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants