public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pemensik at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug network/30544] [RFE] Make getaddrinfo() with hints ai_flags==AF_UNSPEC query only AF present on the system
Date: Tue, 04 Jul 2023 16:14:30 +0000	[thread overview]
Message-ID: <bug-30544-131-EwEtd6VZqS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30544-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30544

--- Comment #2 from Petr Menšík <pemensik at redhat dot com> ---
Created test build with modified Fedora Rawhide branch.

On first glance, it behaves correctly.

Works:

- getent ahosts fedoraproject.org
- getent ahostsv4 fedoraproject.org
- getent ahostsv6 fedoraproject.org

As expected it offers only single address with "options edns0 ipv4" to ahosts.
But what were unexpected is reaction to ping.

# grep options /etc/resolv.conf 
options edns0 ipv4
# ping -6 fedoraproject.org
ping: fedoraproject.org: Address family for hostname not supported

# after modification
# grep options /etc/resolv.conf 
options edns0
# ping -c 1 -6 fedoraproject.org
PING fedoraproject.org(2620:52:3:1:dead:beef:cafe:fed7
(2620:52:3:1:dead:beef:cafe:fed7)) 56 data bytes
# ping -c 1 -4 fedoraproject.org
PING  (38.145.60.21) 56(84) bytes of data.

It seems some unwanted remains of no-aaaa option are present. A bit different
approach should be chosed to avoid that. But close enough.

Question is how tests should be modified. I am not very confident in
implementing that. This requires responses from dns, not sure how to fake them
properly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-07-04 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 14:51 [Bug network/30544] New: " pemensik at redhat dot com
2023-06-12 14:58 ` [Bug network/30544] " pemensik at redhat dot com
2023-07-03 11:13 ` pemensik at redhat dot com
2023-07-04 16:14 ` pemensik at redhat dot com [this message]
2023-07-04 16:16 ` pemensik at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30544-131-EwEtd6VZqS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).