From: Ulrich Drepper <drepper@redhat.com>
To: Pekka Savola <pekkas@netcore.fi>
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org
Subject: Re: RFC 3484 support
Date: Thu, 13 Nov 2003 15:17:29 -0800 [thread overview]
Message-ID: <3FB41109.60902@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0311131517110.3196-100000@netcore.fi>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Pekka Savola wrote:
> Currently getaddrinfo picks the destination address in a round-robin
> fashion.
That's what could be done but isn't since I see little value. We
currently return IPv6 address, if there are any and if they are wanted,
first, then the IPv4 addresses. The order in which multiple IPv6 and/or
IPv4 addresses are returned depends on the order the server returns it
and eventually on artificial round-robin selection.
But the rest of your argumentation I fully support. I'm no expert at
this, but all these possible IPv6 address uses can lead to big problems
if the wrong address is chosen at any one time. Support for destination
address selection is needed. And I really would like to avoid to
implement something which will inevitably fall short of the real
solution at userlevel.
I could image something like this: a syscall with
int destination_addr_sort (size_t n, struct addrinfo addr[], size_t
reorder[])
n and addr are input parameters. reorder is an output parameter, a
pointer to an array describing the transformation. I.e., it is not
necessary for the kernel to shuffle the data around. It's not needed
for getaddrinfo anyway. It means less data has to be transported.
An alternative would be to pass something other than struct addrinfo
elements down. That struct contains data the kernel doesn't need. I'd
be fine with that, too.
I'm open to any reasonable solution. If we cannot come to an agreement
I'll have to try a user-level solution. But this will be slow[¹], and
suck big time.
[¹] BTW, it will be slow, among other things, because there is no way to
cache and netlink-provided data at userlevel. For every name lookup we
have to re-read the data. This already happens today to implement
AI_ADDRCONFIG. I've mentioned to DaveM sometime back that I would love
to get a netlink command which allows me to query a timestamp for the
last interface configuration change. Then I could perform this one
quick test and read the other data only if the timestamp changed.
- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/tBEJ2ijCOnn/RHQRAsbMAKCcQzX+GRBqA0O/nZzLfqw1Qko5ZACfe+P5
ODlgrjK3BcPqzjEWrSc6hIY=
=8/PO
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-11-13 23:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 1:05 RFC 3484 support Ulrich Drepper
2003-11-13 10:07 ` kuznet
2003-11-13 13:26 ` Pekka Savola
2003-11-13 23:17 ` Ulrich Drepper [this message]
2003-11-13 23:29 ` Pekka Savola
2003-11-13 23:12 ` Ulrich Drepper
2003-11-14 23:45 ` kuznet
2003-11-18 8:59 ` Ulrich Drepper
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=3FB41109.60902@redhat.com \
--to=drepper@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=pekkas@netcore.fi \
--cc=yoshfuji@linux-ipv6.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 NNTP newsgroup(s).