From: David Miller <davem@davemloft.net>
To: yoshfuji@linux-ipv6.org
Cc: drepper@redhat.com, netdev@vger.kernel.org
Subject: Re: [RFC] [GIT PATCH net-2.6.23] IPV6: Configurable IPv6 address selection policy table (RFC3484)
Date: Sat, 28 Apr 2007 23:17:07 -0700 (PDT) [thread overview]
Message-ID: <20070428.231707.39159334.davem@davemloft.net> (raw)
In-Reply-To: <20070419.162856.20840698.yoshfuji@linux-ipv6.org>
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Thu, 19 Apr 2007 16:28:56 +0900 (JST)
> We store labels only in kernel, and leave precedence in userspace
> (/etc/gai.conf), so far. The name resolution library (getaddrinfo(3))
> is required to be changed to try reading label information from kernel.
> On the other hand, on BSDs or on Solaris, full policy table including
> precedence seems to be stored in kernel, and the name resolution
> libary (getaddrinfo(3)) seems to use that information.
> We could choose this approach.
>
> Note: Solaris uses string (up to 15 characters excluding NUL) labels.
As you mention the main problem is efficiently notifying
userspace that the table has changed in the same way that
file changes can be checked.
The last thing we want is for glibc to have to stat a bunch of files
every time it wants to do something, it does enough of that already
:-)
Probably, to start somewhere, it may be wise to put the entire
precedence table in the kernel just like BSD, Solaris, and your
patch do. We can figure out how to make the update interface
efficient later, perhaps with something clever in netlink.
One idea is to have glibc have some kind of socket open, subscribed
to a group which gets "sticky" events. It will be simple messages
such as "table of type X got updated". If the socket already got
sent that message, on subsequent updates we wouldn't send it again
until glibc read the event message out.
It would be possible to not even use explicit messages. Instead
some netlink socket state holds a generation counter, label
table updates increment the counter, and glibc just asks the
kernel via netlink whether it's generation count is out of date.
If so, the kernel returns true and also updates the generation
count for that socket to match the current one.
It is one idea.
next prev parent reply other threads:[~2007-04-29 6:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 7:28 [RFC] [GIT PATCH net-2.6.23] IPV6: Configurable IPv6 address selection policy table (RFC3484) YOSHIFUJI Hideaki / 吉藤英明
2007-04-29 6:17 ` David Miller [this message]
2007-04-29 6:39 ` Ulrich Drepper
2007-04-29 19:02 ` David Miller
2007-04-29 19:43 ` 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=20070428.231707.39159334.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=drepper@redhat.com \
--cc=netdev@vger.kernel.org \
--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).