Commit 9eebfe47 authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle

MIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE

The SKF_AD_PKTTYPE uses the skb pointer so make sure it's in the
flags so it will be initialized in time.
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7125/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 9ee1606e
...@@ -1322,6 +1322,8 @@ static int build_body(struct jit_ctx *ctx) ...@@ -1322,6 +1322,8 @@ static int build_body(struct jit_ctx *ctx)
emit_andi(r_A, r_s0, VLAN_TAG_PRESENT, ctx); emit_andi(r_A, r_s0, VLAN_TAG_PRESENT, ctx);
break; break;
case BPF_ANC | SKF_AD_PKTTYPE: case BPF_ANC | SKF_AD_PKTTYPE:
ctx->flags |= SEEN_SKB;
off = pkt_type_offset(); off = pkt_type_offset();
if (off < 0) if (off < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment