Subject: Re: [PATCH v3 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc

From: Daniel Borkmann <[email-masked]>
Date: Thu, 09 Apr 2015 17:15:20 +0200

On 04/09/2015 07:20 AM, Alexei Starovoitov wrote:
...
> we cannot change the meaning of ld_abs, since for dgram sockets
> offset is actually not pointing to L2.
> af_packet is doing:
>   if (sk->sk_type != SOCK_DGRAM)
>        skb_push(skb, skb->data - skb_mac_header(skb));
>   res = run_filter(skb, sk, snaplen);
> so not everything assumes L2.

It would be not just that e.g. sock_queue_rcv_skb() users
have differing offset assumptions as well when they call
from their protocols into sk_filter().