bpf: reuse tc bpf prologue for sk skb progs
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Aug 2017 15:22:37 +0000 (17:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Aug 2017 17:25:19 +0000 (10:25 -0700)
commit047b0ecd683045dcea371f9d4d2917dcf3c553da
treefac249e34e4080b24edcacba128b5ae4a5a0cdd3
parent976d28bfd1f62a3f8e5370c5e7127ff5b3499359
bpf: reuse tc bpf prologue for sk skb progs

Given both program types are effecitvely doing the same in the
prologue, just reuse the one that we had for tc and only adapt
to the corresponding drop verdict value. That way, we don't need
to have the duplicate from 8a31db561566 ("bpf: add access to sock
fields and pkt data from sk_skb programs") to maintain.

Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c