From: Patrick McHardy <kaber@trash.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Roger Luethi <rl@hellgate.ch>, David Miller <davem@davemloft.net>,
Jesse Gross <jesse@nicira.com>,
netdev@vger.kernel.org
Subject: Re: VLAN packets silently dropped in promiscuous mode
Date: Thu, 30 Sep 2010 12:50:26 +0200 [thread overview]
Message-ID: <4CA46B72.2090100@trash.net> (raw)
In-Reply-To: <1285843234.2615.278.camel@edumazet-laptop>
On 30.09.2010 12:40, Eric Dumazet wrote:
> Le jeudi 30 septembre 2010 à 11:55 +0200, Eric Dumazet a écrit :
>> Le jeudi 30 septembre 2010 à 11:16 +0200, Eric Dumazet a écrit :
>>
>>> Agreed
>>>
>>> Could you try following patch, based on net-next-2.6 ?
>>
>> Here is the official patch I cooked for net-2.6 (linux-2.6)
>>
>> I tested it successfully with a tg3 NIC.
>>
>> Thanks
>>
>> [PATCH] vlan: dont drop packets from unknown vlans in promiscuous mode
>>
>> Roger Luethi noticed packets for unknown VLANs getting silently dropped
>> even in promiscuous mode.
>>
>> Check for promiscuous mode in __vlan_hwaccel_rx() and vlan_gro_common()
>> before drops.
>>
>> Reported-by: Roger Luethi <rl@hellgate.ch>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> ---
>> net/8021q/vlan_core.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
>> index 01ddb04..ba502b4 100644
>> --- a/net/8021q/vlan_core.c
>> +++ b/net/8021q/vlan_core.c
>> @@ -24,7 +24,7 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
>>
>> if (vlan_dev)
>> skb->dev = vlan_dev;
>> - else if (vlan_id)
>> + else if (vlan_id && !(skb->dev->flags & IFF_PROMISC))
>> goto drop;
>>
>> return (polling ? netif_receive_skb(skb) : netif_rx(skb));
>> @@ -102,7 +102,7 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
>>
>> if (vlan_dev)
>> skb->dev = vlan_dev;
>> - else if (vlan_id)
>> + else if (vlan_id && !(skb->dev->flags & IFF_PROMISC))
>> goto drop;
>>
>> for (p = napi->gro_list; p; p = p->next) {
>>
>
>
> Hmm, packets are delivered not only to tcpdump but also on other stacks,
> on ethX.
>
> So this is a domain violation.
This should be fine as long as the packets are properly marked
with PACKET_OTHERHOST.
next prev parent reply other threads:[~2010-09-30 10:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 11:37 VLAN packets silently dropped in promiscuous mode Roger Luethi
2010-09-29 17:44 ` Jesse Gross
2010-09-30 8:07 ` Roger Luethi
2010-09-30 9:16 ` Eric Dumazet
2010-09-30 9:55 ` Eric Dumazet
2010-09-30 10:40 ` Eric Dumazet
2010-09-30 10:50 ` Patrick McHardy [this message]
2010-09-30 12:16 ` Eric Dumazet
2010-10-01 1:04 ` David Miller
2010-09-30 21:21 ` Jesse Gross
2010-09-30 22:04 ` Eric Dumazet
2010-10-01 2:37 ` Jesse Gross
2010-10-01 5:10 ` Eric Dumazet
2010-10-01 7:06 ` [PATCH net-next] net: add a core netdev->rx_dropped counter Eric Dumazet
2010-10-04 20:27 ` Jesse Gross
2010-10-05 21:48 ` David Miller
2010-10-01 8:41 ` VLAN packets silently dropped in promiscuous mode Eric Dumazet
2010-10-04 20:21 ` Jesse Gross
2010-10-15 9:16 ` Guillaume Gaudonville
2010-10-15 21:33 ` Jesse Gross
2010-10-25 13:48 ` Guillaume Gaudonville
2010-10-26 0:40 ` Jesse Gross
2010-10-27 8:32 ` Guillaume Gaudonville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CA46B72.2090100@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jesse@nicira.com \
--cc=netdev@vger.kernel.org \
--cc=rl@hellgate.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.