From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr@ncbi.nlm.nih.gov>
To: Andrew Schulman <schulman.andrew@epa.gov>,
"cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: [EXTERNAL] dig and host don't work in IPv6
Date: Fri, 28 Jul 2023 17:16:35 +0000 [thread overview]
Message-ID: <DM8PR09MB709589A238A42EEFD207DC50A506A@DM8PR09MB7095.namprd09.prod.outlook.com> (raw)
In-Reply-To: <DM8PR09MB709570C66D89E32220795D8FA506A@DM8PR09MB7095.namprd09.prod.outlook.com>
> It may be sort of a limitation (IIRC, in Cygwin's minires) but:
> > Should I be doing something differently? Or is it a bug?
> > the host and dig commands no longer work
Reading your question again, I don't think Cygwin's minires limitation (if any) can be at play here because IIRC neither dig nor host (as actually a specialization of dig) use the resolver API but work directly at the DNS protocol level...
OTOH, they probably are looking at the nsaddr section of the resolver context structure to see what INET6 nameservers are available -- and they don't see any in there, that's why they fail?..
These are just my assumptions, though.
Are your [other] applications (that use the resolver API, with the osquery option, as suggested previously) able to resolve IPv6 addresses?
Anton Lavrentiev
Contractor NIH/NLM/NCBI
Cygwin's /usr/include/resolv.h has only IPv4 entries for nameservers:
struct __res_state {
int retrans; /* retransmition time interval */
int retry; /* number of times to retransmit */
u_long options; /* option flags - see below. */
int nscount; /* number of name servers */
struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */ // <<<=== IPv4 only
#define nsaddr nsaddr_list[0] /* for backward compatibility */
u_short id; /* current message id */
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
char defdname[256]; /* default domain (deprecated) */
u_long pfcode; /* RES_PRF_ flags - see below. */
unsigned ndots:4; /* threshold for initial abs. query */
unsigned nsort:4; /* number of elements in sort_list[] */
char unused[3];
struct {
struct in_addr addr;
u_int32_t mask;
} sort_list[MAXRESOLVSORT];
res_send_qhook qhook; /* query hook */
res_send_rhook rhook; /* response hook */
int res_h_errno; /* last one set for this context */
int _vcsock; /* PRIVATE: for res_send VC i/o */
u_int _flags; /* PRIVATE: see below */
union {
/* On an 32-bit arch this means 512b total. */
char pad[72 - 3*sizeof (int) - 2*sizeof (void *)];
struct {
u_int16_t nscount;
u_int16_t nstimes[MAXNS]; /* ms. */
int nssocks[MAXNS];
struct __res_state_ext *ext; /* extention for IPv6 */
} _ext;
} _u;
};
next prev parent reply other threads:[~2023-07-28 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 15:58 Andrew Schulman
2023-07-28 16:52 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-07-28 17:16 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] [this message]
2023-07-28 23:03 ` Andrew Schulman
2023-07-29 2:35 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-07-29 14:26 ` Andrew Schulman
2023-08-01 3:04 ` Lee
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=DM8PR09MB709589A238A42EEFD207DC50A506A@DM8PR09MB7095.namprd09.prod.outlook.com \
--to=lavr@ncbi.nlm.nih.gov \
--cc=cygwin@cygwin.com \
--cc=schulman.andrew@epa.gov \
/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).