From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753227Ab0IVQvZ (ORCPT ); Wed, 22 Sep 2010 12:51:25 -0400 Received: from 69-55-236-88.in-addr.arpa.johncompanies.com ([69.55.236.88]:44198 "EHLO external.dropship.ath.cx" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752998Ab0IVQvX (ORCPT ); Wed, 22 Sep 2010 12:51:23 -0400 Date: Wed, 22 Sep 2010 12:04:11 -0400 From: Glenn Wurster To: "David S. Miller" , Alexey Kuznetsov , "Pekka Savola (ipv6)" , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Stephen Hemminger , Eric Dumazet , Herbert Xu , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2.6.36-rc3 1/1] IPv6: Create temporary address if none exists. Message-ID: <20100922160411.GA11185@external.electric.ath.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If privacy extentions are enabled, but no current temporary address exists, then create one when we get a router advertisement. Sending again because of a previous e-mail header issue. Signed-off-by: Glenn Wurster --- net/ipv6/addrconf.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ab70a3f..cfee6ae 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2022,10 +2022,11 @@ ok: ipv6_ifa_notify(0, ift); } - if (create && in6_dev->cnf.use_tempaddr > 0) { + if ((create || list_empty(&in6_dev->tempaddr_list)) && in6_dev->cnf.use_tempaddr > 0) { /* * When a new public address is created as described in [ADDRCONF], - * also create a new temporary address. + * also create a new temporary address. Also create a temporary + * address if it's enabled but no temporary address currently exists. */ read_unlock_bh(&in6_dev->lock); ipv6_create_tempaddr(ifp, NULL);