summaryrefslogtreecommitdiff
path: root/samples/bpf/sockex2_user.c
diff options
context:
space:
mode:
authorWang Hai <wanghai38@huawei.com>2021-06-16 12:23:24 +0800
committerAndrii Nakryiko <andrii@kernel.org>2021-06-18 11:10:26 -0700
commit85102ba58b4125ebad941d7555c3c248b23efd16 (patch)
treec2851ff389ee9ff9db5df9ba36416d929a96efd0 /samples/bpf/sockex2_user.c
parent0c38740c08962ab109267cb23f4a40df2ccf2bbf (diff)
downloadlinux-85102ba58b4125ebad941d7555c3c248b23efd16.tar.gz
samples/bpf: Fix Segmentation fault for xdp_redirect command
A Segmentation fault error is caused when the following command is executed. $ sudo ./samples/bpf/xdp_redirect lo Segmentation fault This command is missing a device <IFNAME|IFINDEX> as an argument, resulting in out-of-bounds access from argv. If the number of devices for the xdp_redirect parameter is not 2, we should report an error and exit. Fixes: 24251c264798 ("samples/bpf: add option for native and skb mode for redirect apps") Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210616042324.314832-1-wanghai38@huawei.com
Diffstat (limited to 'samples/bpf/sockex2_user.c')
0 files changed, 0 insertions, 0 deletions