]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: Fix attaching flow dissector
authorLorenz Bauer <lmb@cloudflare.com>
Thu, 5 Nov 2020 11:52:30 +0000 (11:52 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Nov 2020 02:20:41 +0000 (18:20 -0800)
commit5d4fad845d9f9fd723863b225c4b4a7a01f1092b
tree7df91abb77173377acb9dc37b7f89830cf6e3dc9
parentd1d5e65dd831bfd3bd039f47f6545d9e83472d7e
tools/bpftool: Fix attaching flow dissector

My earlier patch to reject non-zero arguments to flow dissector attach
broke attaching via bpftool. Instead of 0 it uses -1 for target_fd.
Fix this by passing a zero argument when attaching the flow dissector.

Fixes: 726232787c23 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH")
Reported-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201105115230.296657-1-lmb@cloudflare.com
tools/bpf/bpftool/prog.c