From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Jan_Grash=c3=b6fer?= Subject: Re: vlan missing with AF_PACKET and auxdata Date: Mon, 24 Sep 2018 14:22:17 +0200 Message-ID: <29cdf22a-eceb-eab9-979d-049e261a6064@gmail.com> References: <9a284a4d29bb3301f50d7993c6bebb04@walle.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Eric Dumazet , "Steinar H. Gunderson" , heiko.thiery@gmail.com To: Michael Walle , netdev@vger.kernel.org Return-path: Received: from mail-wr1-f68.google.com ([209.85.221.68]:43412 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732161AbeIXSYM (ORCPT ); Mon, 24 Sep 2018 14:24:12 -0400 Received: by mail-wr1-f68.google.com with SMTP id z14-v6so1957798wrs.10 for ; Mon, 24 Sep 2018 05:22:20 -0700 (PDT) In-Reply-To: <9a284a4d29bb3301f50d7993c6bebb04@walle.cc> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Hi Michael, On 24/09/2018 14:01, Michael Walle wrote: > I'm using the AF_PACKET socket with setsockopt(PACKET_AUXDATA) to get > the incoming VLAN tag. Correct me if I'm wrong, but as far as I see the > first VLAN tag is always stripped - either in hardware or in > net/core/dev.c in __netif_receive_skb_core() - and stored in > skb->vlan_tci. Therefore, it won't be in the packet data anymore. although the documentation says "SOCK_RAW packets are passed to and from the device driver without any changes in the packet data." [1] that's correct and was discussed here: https://www.spinics.net/lists/netdev/msg440313.html Result of the discussion: Won't fix, too complicated. Jan [1] http://man7.org/linux/man-pages/man7/packet.7.html