Skip to content

connection info update - #14699

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:conn_update_ip
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:conn_update_ip

Conversation

@icing

@icing icing commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

Update IP related information at the connection and the transfer in two places only: once the filter chain connects and when a transfer is added to a connection. The latter only updates on reuse when the filters already are connected.

The only user of that information before a full connect is the HAProxy filter. Add cfilter CF_QUERY_IP_INFO query to let it find the information from the filters "below".

This solves two issues with the previous version:

  • updates where often done twice with the same info
  • happy eyeballing filter "forks" could overwrite each others updates before the full winner was determined.

Update IP related information at the connection and the
transfer in two places only: once the filter chain connects
and when a transfer is added to a connection. The latter
only updates on reuse when the filters already are connected.

The only user of that information before a full connect is
the HAProxy filter. Add cfilter CF_QUERY_IP_INFO query to let
it find the information from the filters "below".

This solves two issues with the previous version:
- updates where often done twice with the same info
- happy eyeballing filter "forks" could overwrite each others
  updates before the full winner was determined.
@github-actions github-actions Bot added the tests label Aug 27, 2024
@dfandrich

Copy link
Copy Markdown
Contributor

Analysis of PR #14699 at 569561ff:

Test 294 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 114 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Generated by Testclutch

@bagder bagder closed this in ea6f5c9 Aug 28, 2024
iserdardursun added a commit to iserdardursun/curl that referenced this pull request Oct 8, 2026
When the connect timeout triggers during the TLS handshake, the transfer
reports no remote_ip, local_ip or time_connect even though TCP was
connected. The same happens when the TLS handshake fails.

The IP info is only stored once the whole filter chain is connected,
and since 2338687 the connect timeout is handled in multi.c before
the connect code gets to report anything. Let the filters that did
connect report their info and stats when the chain fails.

Test 5029 verifies.

Follow-up to ea6f5c9 curl#14699
Follow-up to 2338687 curl#15119
Reported-by: Adrien Rey-Jarthon
Fixes curl#23318
iserdardursun added a commit to iserdardursun/curl that referenced this pull request Oct 8, 2026
When the connect timeout triggers during the TLS handshake, the transfer
reports no remote_ip, local_ip or time_connect even though TCP was
connected. The same happens when the TLS handshake fails.

The IP info is only stored once the whole filter chain is connected,
and since 2338687 the connect timeout is handled in multi.c before
the connect code gets to report anything. Let the filters that did
connect report their info and stats when the chain fails.

Test 5029 verifies.

Follow-up to ea6f5c9 curl#14699
Follow-up to 2338687 curl#15119
Reported-by: Adrien Rey-Jarthon
Fixes curl#23318
iserdardursun added a commit to iserdardursun/curl that referenced this pull request Oct 8, 2026
When the connect timeout triggers during the TLS handshake, the transfer
reports no remote_ip, local_ip or time_connect even though TCP was
connected. The same happens when the TLS handshake fails.

The IP info is only stored once the whole filter chain is connected,
and since 2338687 the connect timeout is handled in multi.c before
the connect code gets to report anything. Let the filters that did
connect report their info and stats when the chain fails.

Test 5029 and 5030 verify.

Follow-up to ea6f5c9 curl#14699
Follow-up to 2338687 curl#15119
Reported-by: Adrien Rey-Jarthon
Fixes curl#23318
bagder pushed a commit that referenced this pull request Oct 9, 2026
When the connect timeout triggers during the TLS handshake, the transfer
reports no remote_ip, local_ip or time_connect even though TCP was
connected. The same happens when the TLS handshake fails.

The IP info is only stored once the whole filter chain is connected,
and since 2338687 the connect timeout is handled in multi.c before
the connect code gets to report anything. Let the filters that did
connect report their info and stats when the chain fails.

Test 5029 and 5030 verify.

Follow-up to ea6f5c9 #14699
Follow-up to 2338687 #15119
Reported-by: Adrien Rey-Jarthon
Fixes #23318
Closes #23319
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.

3 participants