[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=AyYrmSWDTZVWb2s+jgnyjNyHo-fkV4U+Fm45n@mail.gmail.com>
Date: Wed, 27 Oct 2010 13:39:32 -0700
From: Maciej Żenczykowski <zenczykowski@...il.com>
To: Lorenzo Colitti <lorenzo@...gle.com>
Cc: netdev@...r.kernel.org, Brian Haley <brian.haley@...com>
Subject: Re: [PATCH] ipv6: addrconf: clear IPv6 addresses and routes when
losing link
> The current privacy address comes back because it's a time-based hash.
I would guess it uses jiffies (or some other equally fine-grained
time, or just pulls from a random entropy source),
I see no reason why the second time around it would generate the same
privacy address.
In other words: are you absolutely certain of this? It's certainly
not how I would expect it to function.
v2.6.36/net/ipv6/addrconf.c
#ifdef CONFIG_IPV6_PRIVACY
#include <linux/random.h>
#endif
and
http://lxr.linux.no/linux+v2.6.36/net/ipv6/addrconf.c#L1608
static int __ipv6_regen_rndid(struct inet6_dev *idev) {
get_random_bytes(idev->rndid, sizeof(idev->rndid));
idev->rndid[0] &= ~0x02;
certainly seem to point towards it being totally random.
> I think the old ones are gone. Still, I think it's better that
> connections from 1 day ago don't work any more (the default for
> privacy addresses is 1 day), than if all new and all old connections
> don't work any more.
No, the default is _no more_ than 1 day preferred and 7 days valid.
But those are the upper maximums, the actual values are the
preferred/validity values taken from the RA (limited to whatever the
max limit sysctls are set to).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists