]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Fix dummy program unloading for xdp_redirect samples
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 21 Feb 2019 16:05:39 +0000 (17:05 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 22 Feb 2019 15:21:59 +0000 (16:21 +0100)
commit1a9933336d3a1ba8fc1a36efd31cfbcbd2e40175
treef80fe5dae9fe4dc35db88369f64bf9183152644f
parenteb642ec63d9f82eee6a14f5bc8c7c8bc50b37c28
samples/bpf: Fix dummy program unloading for xdp_redirect samples

The xdp_redirect and xdp_redirect_map sample programs both load a dummy
program onto the egress interfaces. However, the unload code checks these
programs against the wrong id number, and thus refuses to unload them. Fix
the comparison to avoid this.

Fixes: 789e664bc194 ("samples/bpf: Check the prog id before exiting")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdp_redirect_map_user.c
samples/bpf/xdp_redirect_user.c