From: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
To: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Cc: netdev@vger.kernel.org, pekkas@netcore.fi
Subject: Re: [PATCH 1 of 5] IPv6: do not wrap around when the lifetime has expired
Date: Wed, 2 Apr 2008 00:43:58 +0200 [thread overview]
Message-ID: <20080401224358.GA32592@pirzuine> (raw)
In-Reply-To: <20080328.120622.73826877.yoshfuji@linux-ipv6.org>
Ok, I think I missed something.
On Fri, Mar 28, 2008 at 12:06:22PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
> In article <20080327193854.GC8574@ens-lyon.fr> (at Thu, 27 Mar 2008 20:38:54 +0100), Benoit Boissinot <benoit.boissinot@ens-lyon.org> says:
>
> > On Fri, Mar 28, 2008 at 03:25:39AM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
> > > In article <dd125a7f86968371046d.1206305169@pirzuine> (at Sun, 23 Mar 2008 21:46:09 +0100), Benoit Boissinot <benoit.boissinot@ens-lyon.org> says:
> > >
> > > > IPv6: do not wrap around when the lifetime has expired
> > > >
> > > > Instead of reporting overly large lifetimes to userspace,
> > > > report a lifetime of 0 when a lifetime has expired.
> > > >
> > > > Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
> > >
> > > NAK.
> > >
> > > (signed) lifetime < 0 means it has expired, but 0 does not mean
> > > that the lifetime has expired, but it is being expired
> > > (within 1 second).
I re-checked the code, and while it is true that some path takes care
not to use a too big lifetime (one that is > 0x7fffffffUL/HZ), for
example:
- inet6_addr_{add,modify}
there are other places where there are no checks, eg:
- addrconf_prefix_rcv, ipv6_create_tempaddr
Furthermore, at least for the case of the preferred lifetime, a lifetime
of 0 received from RA means deprecated (== expired ?).
And due to the rounding, if age = (now - ift->tsamp)/HZ
then (age == lifetime) being true means that the lifetime has fully expired right ?
In any case, the current code is buggy, because if preferred == 1 and tval == 2,
then we will send INFINITY_LIFETIME to userspace.
Finally, cstamp and tstamp are sent via netlink, it could be useful to
solve this issue from userspace, but it's useless as it is since the
tstamp sent is relative to the lifetime stored in the kernel, not
relative to the lifetime we send (we should send "jiffies" for it to be
useful).
regards,
Benoit
--
:wq
next prev parent reply other threads:[~2008-04-01 22:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-23 20:46 [PATCH 0 of 5] IPv6: Fix temporary address support Benoit Boissinot
2008-03-23 20:46 ` [PATCH 1 of 5] IPv6: do not wrap around when the lifetime has expired Benoit Boissinot
2008-03-27 18:25 ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-27 19:38 ` Benoit Boissinot
2008-03-28 3:06 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-01 22:43 ` Benoit Boissinot [this message]
2008-03-23 20:46 ` [PATCH 2 of 5] IPv6: only update the lifetime of the relevant temporary address Benoit Boissinot
2008-03-27 18:31 ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-23 20:46 ` [PATCH 3 of 5] IPv6: do not create temporary adresses with too short preferred lifetime Benoit Boissinot
2008-03-27 18:39 ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-23 20:46 ` [PATCH 4 of 5] IPv6: fix lifetime calculation on temporary address creation Benoit Boissinot
2008-03-28 3:04 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-01 21:56 ` Benoit Boissinot
2008-04-01 23:41 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-02 0:17 ` Benoit Boissinot
2008-04-02 0:25 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-02 5:56 ` Pekka Savola
2008-03-23 20:46 ` [PATCH 5 of 5] IPv6: temporary address: update the timer for tentative addresses Benoit Boissinot
2008-03-28 3:25 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-01 21:53 ` Benoit Boissinot
2008-03-27 17:59 ` [PATCH 0 of 5] IPv6: Fix temporary address support Benoit Boissinot
2008-03-27 18:12 ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-28 0:32 ` Benoit Boissinot
2008-03-28 3:15 ` YOSHIFUJI Hideaki / 吉藤英明
2008-04-01 21:55 ` Benoit Boissinot
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=20080401224358.GA32592@pirzuine \
--to=benoit.boissinot@ens-lyon.org \
--cc=netdev@vger.kernel.org \
--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).