Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples/bpf: Fix incorrect use of strlen in xdp_redirect_cpu
Commit b599015 ("samples/bpf: Fix application of sizeof to pointer") tried to fix a bug where sizeof was incorrectly applied to a pointer instead of the array string was being copied to, to find the destination buffer size, but ended up using strlen, which is still incorrect. However, on closer look ifname_buf has no other use, hence directly use optarg. Fixes: b599015 ("samples/bpf: Fix application of sizeof to pointer") Fixes: e531a22 ("samples: bpf: Convert xdp_redirect_cpu to XDP samples helper") Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Alexander Lobakin <[email protected]> Tested-by: Alexander Lobakin <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
- Loading branch information