Skip to content

ftp: remove 2 Curl_resolv_blocking() calls#21512

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:ftp-remove-2-resolv_blocking
Closed

ftp: remove 2 Curl_resolv_blocking() calls#21512
icing wants to merge 3 commits into
curl:masterfrom
icing:ftp-remove-2-resolv_blocking

Conversation

@icing
Copy link
Copy Markdown
Contributor

@icing icing commented May 6, 2026

They are no longer needed with the new peers and dns filter. Connection setup will take care of the resoling and connecting.

@github-actions github-actions Bot added the FTP label May 6, 2026
@icing icing requested a review from bagder May 6, 2026 09:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 the struct Curl_dns_entry *dns argument and adjusting callers.
  • Removes two Curl_resolv_blocking() calls from ftp_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.

Comment thread lib/connect.h
Comment thread lib/cf-dns.c
Comment thread lib/ftp.c Outdated
icing added 3 commits May 7, 2026 09:21
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.
@icing icing force-pushed the ftp-remove-2-resolv_blocking branch from 375bdb4 to 25df3c6 Compare May 7, 2026 07:28
@bagder bagder closed this in 71a5725 May 7, 2026
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
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