connect: limit update IP info

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.

Closes #14699
This commit is contained in:
Stefan Eissing 2024-08-27 12:12:37 +02:00 committed by Daniel Stenberg
parent 87f0a79439
commit ea6f5c9f0f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 122 additions and 77 deletions

View file

@ -210,8 +210,6 @@ static CURLcode baller_connected(struct Curl_cfilter *cf,
}
ctx->state = CF_HC_SUCCESS;
cf->connected = TRUE;
Curl_conn_cf_cntrl(cf->next, data, TRUE,
CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
return result;
}