Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: do not set "u" bit for temporary addresses
@ 2014-02-12 11:08 Florent Fourcot
  2014-02-13  0:11 ` Hannes Frederic Sowa
  2014-02-13 23:22 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Florent Fourcot @ 2014-02-12 11:08 UTC (permalink / raw)
  To: netdev; +Cc: Florent Fourcot

The bit 6 of interface identifier was before the "universal/local bit",
indicating local significance only. This rule is now obsoleted by the
RFC 7136, removing all significance of bits in interface identifier.

The new rule is "In all cases, the bits in an IID have no generic
semantics; in other words, they have opaque values.", so we can remove
the setting of bit 6, it will improve the entropy of random addresses.

Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
---
 net/ipv6/addrconf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ad23569..0b2a18e 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1878,7 +1878,6 @@ static void __ipv6_regen_rndid(struct inet6_dev *idev)
 {
 regen:
 	get_random_bytes(idev->rndid, sizeof(idev->rndid));
-	idev->rndid[0] &= ~0x02;
 
 	/*
 	 * <draft-ietf-ipngwg-temp-addresses-v2-00.txt>:
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-16 20:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 11:08 [PATCH net-next] ipv6: do not set "u" bit for temporary addresses Florent Fourcot
2014-02-13  0:11 ` Hannes Frederic Sowa
2014-02-13 23:22 ` David Miller
2014-02-16 20:03   ` Florent Fourcot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox