Skip to content
Commit 257d7d4f authored by David Ahern's avatar David Ahern Committed by Alexei Starovoitov
Browse files

libbpf: Only check mode flags in get_xdp_id

The commit in the Fixes tag changed get_xdp_id to only return prog_id
if flags is 0, but there are other XDP flags than the modes - e.g.,
XDP_FLAGS_UPDATE_IF_NOEXIST. Since the intention was only to look at
MODE flags, clear other ones before checking if flags is 0.

Fixes: f07cbad2

 ("libbpf: Fix bpf_get_link_xdp_id flags handling")
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrey Ignatov <rdna@fb.com>
parent d2b6c3ab
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