Received: with ECARTIS (v1.0.0; list netdev); Mon, 05 Apr 2004 08:53:16 -0700 (PDT) Received: from zero.aec.at (Hannibal_Hunsiker@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i35FrCKO024987 for ; Mon, 5 Apr 2004 08:53:13 -0700 Received: from averell.firstfloor.org.muc.de (Orrin_Goof@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i35Fr9D28039 for ; Mon, 5 Apr 2004 17:53:10 +0200 To: netdev@oss.sgi.com Subject: [PATCH] Force IPv6 garbage collection on device down From: Andi Kleen Date: Mon, 05 Apr 2004 17:53:09 +0200 Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 4472 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@muc.de Precedence: bulk X-list: netdev Content-Length: 638 Lines: 24 We had some problems with devices occasionally hanging with non zero reference count on device destroy until the next time the IPv6 garbage collection timer ran (upto 10s). To avoid that this patch forces an IPv6 FIB garbage collection on device down. -Andi diff -u linux-2.6.5/net/ipv6/ndisc.c-N linux-2.6.5/net/ipv6/ndisc.c --- linux-2.6.5/net/ipv6/ndisc.c-N 1970-01-01 01:12:51.000000000 +0100 +++ linux-2.6.5/net/ipv6/ndisc.c 2004-04-05 17:50:52.000000000 +0200 @@ -1403,6 +1403,9 @@ neigh_changeaddr(&nd_tbl, dev); fib6_run_gc(0); break; + case NETDEV_UNREGISTER: + fib6_run_gc(0); + break; default: break; }