Netdev List
 help / color / mirror / Atom feed
From: "Peter Palúch" <Peter.Paluch@fri.uniza.sk>
To: netdev@vger.kernel.org
Subject: VLAN aux info for AF_PACKET available only with ETH_P_ALL
Date: Tue, 12 Apr 2016 16:40:20 +0200	[thread overview]
Message-ID: <570D08D4.6040000@fri.uniza.sk> (raw)

Greetings,

I am running vanilla Linux kernel v4.4.6.

When using AF_PACKET sockets with PACKET_AUXDATA socket option to access 
the VLAN TCI information of received frames, I have noticed that the 
VLAN information in struct tpacket_auxdata, namely,

- tp_vlan_tci
- tp_vlan_tpid
- TP_STATUS_VLAN_VALID and TP_STATUS_VLAN_TPID_VALID flags

is filled in only when the socket is bound to htons (ETH_P_ALL). If the 
socket is bound to any specific protocol, the VLAN information fields in 
struct tpacket_auxdata are set to 0 even if the datagram of the specific 
protocol was received in an 802.1Q-tagged frame.

Is this behavior intentional? If not, I would be honored to try to 
provide a patch but I am not well-versed in kernel internals so any 
guidance would be most appreciated.

Thanks!

Best regards,
Peter

                 reply	other threads:[~2016-04-12 14:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=570D08D4.6040000@fri.uniza.sk \
    --to=peter.paluch@fri.uniza.sk \
    --cc=netdev@vger.kernel.org \
    /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