From patchwork Wed Feb 12 11:08:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florent Fourcot X-Patchwork-Id: 319612 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9F7682C00AE for ; Wed, 12 Feb 2014 22:08:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbaBLLIQ (ORCPT ); Wed, 12 Feb 2014 06:08:16 -0500 Received: from fourcot.fr ([217.70.191.14]:50239 "EHLO olfflo.fourcot.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbaBLLIO (ORCPT ); Wed, 12 Feb 2014 06:08:14 -0500 Received: from reglisse.fourcot.fr (unknown [IPv6:2001:470:51a3:666::1]) (Authenticated sender: reglisse) by olfflo.fourcot.fr (Postfix) with ESMTPSA id 1AC082DFE6; Wed, 12 Feb 2014 12:08:12 +0100 (CET) Received: by reglisse.fourcot.fr (Postfix, from userid 1000) id EB5D5804B66; Wed, 12 Feb 2014 12:08:10 +0100 (CET) From: Florent Fourcot To: netdev@vger.kernel.org Cc: Florent Fourcot Subject: [PATCH net-next] ipv6: do not set "u" bit for temporary addresses Date: Wed, 12 Feb 2014 12:08:06 +0100 Message-Id: <1392203286-17833-1-git-send-email-florent.fourcot@enst-bretagne.fr> X-Mailer: git-send-email 1.8.5.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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; /* * :