netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Grashöfer" <jan.grashoefer@gmail.com>
To: Michael Walle <michael@walle.cc>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Steinar H. Gunderson" <sesse@google.com>,
	heiko.thiery@gmail.com
Subject: Re: vlan missing with AF_PACKET and auxdata
Date: Mon, 24 Sep 2018 14:22:17 +0200	[thread overview]
Message-ID: <29cdf22a-eceb-eab9-979d-049e261a6064@gmail.com> (raw)
In-Reply-To: <9a284a4d29bb3301f50d7993c6bebb04@walle.cc>

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

  reply	other threads:[~2018-09-24 18:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 12:01 vlan missing with AF_PACKET and auxdata Michael Walle
2018-09-24 12:22 ` Jan Grashöfer [this message]
2018-09-24 14:25   ` Michael Walle
2018-10-02  8:13 ` Michael Walle

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=29cdf22a-eceb-eab9-979d-049e261a6064@gmail.com \
    --to=jan.grashoefer@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=heiko.thiery@gmail.com \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=sesse@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).