From patchwork Thu Oct 2 16:38:21 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 2461 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 691EEDE3E8 for ; Fri, 3 Oct 2008 02:38:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753792AbYJBQiY (ORCPT ); Thu, 2 Oct 2008 12:38:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753766AbYJBQiY (ORCPT ); Thu, 2 Oct 2008 12:38:24 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:33323 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753742AbYJBQiX (ORCPT ); Thu, 2 Oct 2008 12:38:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 5D9A219BCAD; Thu, 2 Oct 2008 18:38:22 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10470-13; Thu, 2 Oct 2008 18:38:21 +0200 (CEST) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 3049F19BCAC; Thu, 2 Oct 2008 18:38:21 +0200 (CEST) Received: from tyr.diku.dk (tyr.diku.dk [130.225.96.226]) by nhugin.diku.dk (Postfix) with ESMTP id 493726DF88D; Thu, 2 Oct 2008 18:37:36 +0200 (CEST) Received: by tyr.diku.dk (Postfix, from userid 3075) id 14D3B1A4001; Thu, 2 Oct 2008 18:38:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by tyr.diku.dk (Postfix) with ESMTP id 0DC501AC001; Thu, 2 Oct 2008 18:38:21 +0200 (CEST) Date: Thu, 2 Oct 2008 18:38:21 +0200 (CEST) From: Jesper Dangaard Brouer To: Patrick McHardy Cc: Jesper Dangaard Brouer , "netdev@vger.kernel.org" Subject: Re: Bisect'ed BUG in VLAN promisc mode (6c78dcbd47) In-Reply-To: <48DD3AD5.80800@trash.net> Message-ID: References: <1222437636.7598.14.camel@localhost.localdomain> <48DD0A4F.6020703@trash.net> <1222456933.2381.3.camel@localhost.localdomain> <48DD36D2.90103@trash.net> <48DD37E3.9090706@trash.net> <1222457670.2381.8.camel@localhost.localdomain> <48DD3AD5.80800@trash.net> MIME-Version: 1.0 X-Virus-Scanned: amavisd-new at diku.dk Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Here is a quick fix for the bug... Patrick promised he would do a more clean fix later ;-) commit 356d09baea53abb7f6a6aabf2264ba104cdb9b5b Author: Jesper Dangaard Brouer Date: Thu Oct 2 12:24:19 2008 +0200 Quick fix from Patrick to solve the VLAN promisc mode bug. Bisect'ed BUG in VLAN promisc mode All other VLAN interfaces stop working, if a vlan is taken down (ifconfig eth1.1025 down) _while_ there is a tcpdump running on that interface. The problem is a result of promisc mode being removed on the real-device (eth1), when the vlan interface is taken down. This should not happen as other vlan devices exists that still need promisc mode on the real-device (eth1). Need promisc mode because VLAN devices uses another ether address. Signed-off-by: Jesper Dangaard Brouer --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 4bf014e..a79daee 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -551,6 +551,8 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change) { struct net_device *real_dev = vlan_dev_info(dev)->real_dev; + if (!netif_running(dev)) + return; if (change & IFF_ALLMULTI) dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); if (change & IFF_PROMISC)