Re: [PATCH] AF_PACKET doesnt strip VLAN information
From: Willem de Bruijn
Date: Tue Oct 01 2019 - 11:52:54 EST
On Tue, Oct 1, 2019 at 11:44 AM Stephen Hemminger
<stephen@xxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, 30 Sep 2019 11:16:14 -0400
> Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx> wrote:
>
> > On Mon, Sep 30, 2019 at 1:24 AM Sriram Krishnan <srirakr2@xxxxxxxxx> wrote:
> > >
> > > When an application sends with AF_PACKET and places a vlan header on
> > > the raw packet; then the AF_PACKET needs to move the tag into the skb
> > > so that it gets processed normally through the rest of the transmit
> > > path.
> > >
> > > This is particularly a problem on Hyper-V where the host only allows
> > > vlan in the offload info.
> >
> > This sounds like behavior that needs to be addressed in the driver, instead?
>
> This was what we did first, but the problem was more general.
> For example, many filtering functions assume that vlan tag is in
> skb meta data, not the packet data itself.
Out of curiosity, can you share an example?
> Therefore AF_PACKET would
> get around any filter rules.
Packet sockets are not the only way to inject packets into the kernel.
This probably also affects tap.