netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Bieringer <pb@bieringer.de>
To: usagi-users@linux-ipv6.org
Cc: netdev@vger.kernel.org
Subject: lifetime of IPv6 tempaddr is limited to lifetime specified in router advertisements: address lost while SSH connection is still established
Date: Fri, 29 Sep 2006 13:52:02 +0200	[thread overview]
Message-ID: <451D08E2.9060106@bieringer.de> (raw)

Hi,

running kernel-2.6.17-1.2187_FC5 and using

net.ipv6.conf.default.use_tempaddr = 2 in /etc/sysctl.conf

results in enabling and prefered use of temporary IPv6 addresses as
expected.


Current related sysctl values are:

# sysctl -a |grep temp_
net.ipv6.conf.eth0.temp_prefered_lft = 86400
net.ipv6.conf.eth0.temp_valid_lft = 604800
net.ipv6.conf.default.temp_prefered_lft = 86400
net.ipv6.conf.default.temp_valid_lft = 604800
net.ipv6.conf.all.temp_prefered_lft = 86400
net.ipv6.conf.all.temp_valid_lft = 604800
net.ipv6.conf.lo.temp_prefered_lft = 86400
net.ipv6.conf.lo.temp_valid_lft = 604800


But now strange things happen. It looks like that the prefered_lft is
not used because of receiving router advertisements (imho a normal
scenario).

Router advertisements have
	valid time 3000s, pref. time 2000s


Current available addresses:

# ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qlen 1000
    inet6 2001:db8:0:0:f0fc:f50b:3cb1:cfea/64 scope global secondary dynamic
       valid_lft 2047sec preferred_lft 1047sec
    inet6 2001:db8:0:0:a963:ce7f:8e4e:fdf2/64 scope global secondary
deprecated dynamic
       valid_lft 265sec preferred_lft -735sec
    inet6 2001:db8:0:0:201:3ff:fe33:23c9/64 scope global dynamic
       valid_lft 2555sec preferred_lft 1555sec
    inet6 fe80::201:3ff:fe01:2345/64 scope link
       valid_lft forever preferred_lft forever


Established TCP sessions:

# lsof -n -i :22
COMMAND   PID  USER   FD   TYPE DEVICE SIZE NODE NAME
sshd     1613  root    3u  IPv6   4777       TCP *:ssh (LISTEN)
ssh     15606 peter    3u  IPv6 153678       TCP
[2001:db8:0:0:d45e:37d7:616d:99a]:55953->[2001:dba:0:1::164:1]:ssh
(ESTABLISHED)

As you see, the source address "2001:db8:0:0:d45e:37d7:616d:99a" do no
longer appear in interface address list.


So it looks like that if lifetime from router advertisment limits the
lifetime of the temporary address, but there is an update mechanism
missing which extends the lifetime of this temporary address (up to the
sysctl limit), if a next router advertisement is received.

Also it should not happen that the address is removed completly in case
it's still used in an open socket.


Is this a (known) bug or a (strange) feature or already fixed in 2.6.18?


Thank you very much.

Regards,
	Peter
-- 
Dr. Peter Bieringer                     http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D                       mailto:pb@bieringer.de
Deep Space 6 Co-Founder and Core Member  http://www.deepspace6.net/
OpenBC                    http://www.openbc.com/hp/Peter_Bieringer/
Personal invitation to OpenBC  http://www.openbc.com/go/invita/3889

                 reply	other threads:[~2006-09-29 11:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=451D08E2.9060106@bieringer.de \
    --to=pb@bieringer.de \
    --cc=netdev@vger.kernel.org \
    --cc=usagi-users@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).