From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757087Ab0IUVuO (ORCPT ); Tue, 21 Sep 2010 17:50:14 -0400 Received: from shakespeare.ccsl.carleton.ca ([134.117.225.11]:37219 "EHLO shakespeare.ccsl.carleton.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755435Ab0IUVuM (ORCPT ); Tue, 21 Sep 2010 17:50:12 -0400 X-Greylist: delayed 3039 seconds by postgrey-1.27 at vger.kernel.org; Tue, 21 Sep 2010 17:50:12 EDT Message-Id: From: gwurster@scs.carleton.ca Date: Tue, 21 Sep 2010 16:59:02 -0400 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>From ca1c566f51eeff4195b483addb86c6a73eaa37e0 Mon Sep 17 00:00:00 2001 From: Glenn Wurster Date: Tue, 21 Sep 2010 16:59:00 -0400 Subject: [PATCH 2.6.36-rc3 1/1] IPv6: Create temporary address if none exists. Cc: "David S. Miller" , Alexey Kuznetsov , "Pekka Savola (ipv6)" , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Stephen Hemminger , Eric Dumazet , Herbert Xu , netdev@vger.kernel.org To: linux-kernel@vger.kernel.org X-Length: 1674 X-UID: 10 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201009211659.02014.gwurster@scs.carleton.ca> If privacy extentions are enabled, but no current temporary address exists, then create one when we get a router advertisement. 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);