diff mbox

[net-next] ipv6: do not set "u" bit for temporary addresses

Message ID 1392203286-17833-1-git-send-email-florent.fourcot@enst-bretagne.fr
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Florent Fourcot Feb. 12, 2014, 11:08 a.m. UTC
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(-)

Comments

Hannes Frederic Sowa Feb. 13, 2014, 12:11 a.m. UTC | #1
On Wed, Feb 12, 2014 at 12:08:06PM +0100, Florent Fourcot wrote:
> 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>

Hmm, the RFC only talks about new methods of IID generation. Not sure
if old software depends on that. I actually know about one commercial
available ip management system which does make use of those bits to
classify ipv6 addresses for displaying purposes (that's how I actually
learned about those bits ;) ).

Greetings,

  Hannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 13, 2014, 11:22 p.m. UTC | #2
From: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Date: Wed, 12 Feb 2014 12:08:06 +0100

> 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>

I'm hesistent to apply this given the feedback you've been given.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Florent Fourcot Feb. 16, 2014, 8:03 p.m. UTC | #3
> 
> I'm hesistent to apply this given the feedback you've been given.


I understand. I will try to found more convincing references, and
re-send the patch.

Regards,
diff mbox

Patch

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>: