#1120844 curl: Inconsistent support for --dns-ipv4-addr

Package:
curl
Source:
curl
Description:
command line tool for transferring data with URL syntax
Submitter:
Alessandro Vesely
Date:
2025-11-24 11:29:02 UTC
Severity:
normal
Tags:
#1120844#5
Date:
2025-11-17 12:35:15 UTC
From:
To:
Package: curl
Version: 8.14.1-2+deb13u2
Severity: minor

Dear Maintainer,

I tried option --dns-ipv4-addr and obtained the following results:

511-north:~$ curl --dns-ipv4-addr 127.0.0.1 http://example.com/
curl: option --dns-ipv4-addr: the installed libcurl version does not support this
curl: try 'curl --help' or 'curl --manual' for more information

512-north:~$ curl --manual|grep dns-ipv4-addr
	    See also --dns-ipv4-addr and --dns-ipv6-addr.
    --dns-ipv4-addr <address>
	    should be a  single IPv4  address. If  --dns-ipv4-addr is  provided
	     curl --dns-ipv4-addr 10.1.2.3 https://example.com
	    --dns-ipv4-addr requires that libcurl  is built to support  c-ares.
	    See also --dns-interface and --dns-ipv4-addr.
	    See also --dns-interface and --dns-ipv4-addr.

(I was actually looking for --interface, which works, but tried this option,
which is listed before the latter, by mistake.  So I tagged the bug as "minor".)

Best
Ale

#1120844#10
Date:
2025-11-24 02:19:24 UTC
From:
To:
Hi,

Indeed we do not build with c-ares, there was some back and forth
enabling this around 2010 but it was ultimately disabled for stability
reasons (no longer explanation in the changelog). Well, this is the
first time we hear about it in 15 years, so maybe it's not a popular
option?

Anyway, to enable it, at least some research and testing is required,
I'm not sure I'll be able to look at it any time soon. But if you or
someone else feels like doing it, please do and send a report/patch/MR
:-)

Cheers,
Charles

PS: actually there is a wishlist bug for enabling c-ares (#820775), but
    there seems to be a blocker due to lack of c-ares support to glibc's
    NSS module system.

#1120844#19
Date:
2025-11-24 02:19:24 UTC
From:
To:
Hi,

Indeed we do not build with c-ares, there was some back and forth
enabling this around 2010 but it was ultimately disabled for stability
reasons (no longer explanation in the changelog). Well, this is the
first time we hear about it in 15 years, so maybe it's not a popular
option?

Anyway, to enable it, at least some research and testing is required,
I'm not sure I'll be able to look at it any time soon. But if you or
someone else feels like doing it, please do and send a report/patch/MR
:-)

Cheers,
Charles

PS: actually there is a wishlist bug for enabling c-ares (#820775), but
    there seems to be a blocker due to lack of c-ares support to glibc's
    NSS module system.

#1120844#24
Date:
2025-11-24 11:21:39 UTC
From:
To:
Hi,


Yeah, maybe.  I see it more as a flaw in the documentation.


The point is to align the manual with the actual functionality.  BTW, I
can't imagine a case where it's necessary to specify a different DNS
interface than those in resolv.conf.  The case in bug #820775 can be
handled by configuring different DNS resolver views so that internal
queries can resolve internal network names.  This would work seamlessly
with all tools, not just curl.

If --dns-ipv4-addr had been omitted from the manual, I would have read
further and found the correct option to use.


Best
Ale

#1120844#29
Date:
2025-11-24 11:21:39 UTC
From:
To:
Hi,


Yeah, maybe.  I see it more as a flaw in the documentation.


The point is to align the manual with the actual functionality.  BTW, I
can't imagine a case where it's necessary to specify a different DNS
interface than those in resolv.conf.  The case in bug #820775 can be
handled by configuring different DNS resolver views so that internal
queries can resolve internal network names.  This would work seamlessly
with all tools, not just curl.

If --dns-ipv4-addr had been omitted from the manual, I would have read
further and found the correct option to use.


Best
Ale