All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: netdev@vger.kernel.org, Herbert Xu <herbert@gondor.hengli.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	stephen hemminger <shemminger@vyatta.com>
Subject: Re: IPv6: autoconfiguration and suspend/resume or link down/up
Date: Thu, 21 Jul 2011 00:30:53 -0500	[thread overview]
Message-ID: <1311226254.3140.52.camel@dcbw.foobar.com> (raw)
In-Reply-To: <20110720163656.GD11692@midget.suse.cz>

On Wed, 2011-07-20 at 18:36 +0200, Jiri Bohac wrote:
> On Wed, Jul 20, 2011 at 11:21:43AM -0500, Dan Williams wrote:
> > ... and in the resume handler use that value to age anything
> > that needs to know about time spent in suspend, and then do what needs
> > to be done with that.  So something like that may work for IPv6
> > addrconf; on suspend save current time, and on resume check the current
> > time, subtract the time you saved on suspend, and magically add that to
> > the lifetime counts and then run any expiry stuff.
> 
> IPv6 (by specification) does not send any RS when an IP address
> or route expires. So only subtracting the supend time from the
> lifetimes and possibly expiring the routes/IP addresses won't fix
> the problem.

Well, the prefix option of the RA includes the Valid Lifetime (in
seconds, no less) so I'd assume the kernel starts a timer when it
receives the RA and updates any addresses configured as a result of
receiving that RA+prefix, such that when the timer expires, the
autoconfigured address is deleted.  That timer can be used as a base for
the expiry mechanism that I've noted above, no?  This fixes problem #1
from your first mail.

For problem #2, shouldn't a new RS be sent whenever the interface
changes it's IFF_LOWER_UP bit?  IFF_LOWER_UP indicates a carrier on/off
event and thus indicates possible disconnect/reconnect to a new network.
I don't specifically know how it works now, but if RS isn't triggered
from IFF_LOWER_UP, I'd imagine that either (a) something didn't get
updated when IFF_LOWER_UP became how carrier was indicated in 2.6.17
(commit b00055aacdb172c05067612278ba27265fcd05ce) or (b) there's a
reason IFF_LOWER_UP isn't used as the trigger for sending an RS and I'm
qualified to say why.

Dan

> When I move to a new network, I need to restart the
> autoconfiguration. This does not currently happen - neither for
> an alive system where the ethernet link goes down/up, nor for a
> system that gets suspended, moved and then resumed.
> 



  reply	other threads:[~2011-07-21  5:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 18:02 IPv6: autoconfiguration and suspend/resume or link down/up Jiri Bohac
2011-07-20 16:15 ` Stephen Hemminger
2011-07-20 16:29   ` Jiri Bohac
2011-07-20 16:21 ` Dan Williams
2011-07-20 16:36   ` Jiri Bohac
2011-07-21  5:30     ` Dan Williams [this message]
2011-07-21 16:35       ` Dan Williams
2011-07-21 19:44         ` Stephen Hemminger
2011-07-22  8:06 ` David Miller
2011-07-22  9:21   ` Herbert Xu
2011-07-23 14:31     ` Nicolas de Pesloüan
2011-07-23 15:27       ` Herbert Xu
2011-07-23 16:37         ` Stephen Hemminger
2011-07-24  0:18           ` Herbert Xu
2011-07-24  8:35             ` Nicolas de Pesloüan
2011-07-25  3:26               ` Stephen Hemminger
2011-07-25  3:46                 ` Herbert Xu
2011-07-27 19:48   ` Dan Williams
2011-07-19 19:42 Stephen Hemminger
2011-07-26  5:16 ` Anirban Chakraborty
2011-07-25 16:55 Stephen Hemminger

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=1311226254.3140.52.camel@dcbw.foobar.com \
    --to=dcbw@redhat.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=jbohac@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.