ftp: remove 2 Curl_resolv_blocking() calls#21512
Closed
icing wants to merge 3 commits into
Closed
Conversation
bagder
approved these changes
May 7, 2026
There was a problem hiding this comment.
Pull request overview
This PR removes now-redundant blocking DNS resolution during FTP PASV data-connection setup by relying on the newer peer + DNS cfilter chain to perform resolving/connecting during connection setup.
Changes:
- Simplifies
Curl_conn_setup()by removing thestruct Curl_dns_entry *dnsargument and adjusting callers. - Removes two
Curl_resolv_blocking()calls fromftp_state_pasv_resp()and the associated cleanup/logging. - Updates DNS filter creation paths to no longer accept a pre-resolved DNS entry.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/url.c | Updates Curl_conn_setup() call site to the new signature. |
| lib/ftp.c | Removes blocking resolves for PASV data connections and adjusts related verbose output. |
| lib/connect.h | Updates Curl_conn_setup() declaration to drop the dns argument. |
| lib/connect.c | Updates Curl_conn_setup() implementation and Curl_cf_dns_add() call to match the new API. |
| lib/cf-dns.h | Updates Curl_cf_dns_add() prototype to drop the dns argument. |
| lib/cf-dns.c | Updates DNS filter context/create/add functions for the new API (but leaves an outdated comment to fix). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
They are no longer needed with the new peers and dns filter. Connection setup will take care of the resoling and connecting.
that parameter and remove it from inner calls that no longer need it as well.
375bdb4 to
25df3c6
Compare
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
They are no longer needed with the new peers and dns filter. Connection setup will take care of the resoling and connecting. Closes curl#21512
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
They are no longer needed with the new peers and dns filter. Connection setup will take care of the resoling and connecting.