Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966493AbXFGW4G (ORCPT ); Thu, 7 Jun 2007 18:56:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965674AbXFGWzs (ORCPT ); Thu, 7 Jun 2007 18:55:48 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:4495 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933414AbXFGWzr (ORCPT ); Thu, 7 Jun 2007 18:55:47 -0400 Date: Fri, 8 Jun 2007 08:54:52 +1000 From: Herbert Xu To: "David S. Miller" , Andrew Morton Cc: Joseph Fannin , linux-kernel@vger.kernel.org, linux-net@vger.kernel.org, netdev@vger.kernel.org Subject: Re: 2.6.22-rc4-mm2: Assigning IP address fails Message-ID: <20070607225452.GA17211@gondor.apana.org.au> References: <20070606220313.8f7c1fab.akpm@linux-foundation.org> <20070607214609.GB8204@nineveh.local> <20070607150653.b83bfc0f.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070607150653.b83bfc0f.akpm@linux-foundation.org> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1477 Lines: 45 On Thu, Jun 07, 2007 at 03:06:53PM -0700, Andrew Morton wrote: > > > I'm not able to bring an ethernet interface down and back up again > > with this if avahi-autoipd is installed on my Ubuntu boxes. I've seen > > it on three different computers with different NIC hardware. Sorry, it was my patch. This patch should fix it. [IPV4]: Do not remove idev when addresses are cleared Now that we create idev before addresses are added, it no longer makes sense to remove them when addresses are all deleted. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 354e800..0cf813f 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -327,12 +327,8 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, } } - if (destroy) { + if (destroy) inet_free_ifa(ifa1); - - if (!in_dev->ifa_list) - inetdev_destroy(in_dev); - } } static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/