Skip to content
Commit 21594c44 authored by Dmitry Yakunin's avatar Dmitry Yakunin Committed by Daniel Borkmann
Browse files

bpf: Allow to specify ifindex for skb in bpf_prog_test_run_skb



Now skb->dev is unconditionally set to the loopback device in current net
namespace. But if we want to test bpf program which contains code branch
based on ifindex condition (eg filters out localhost packets) it is useful
to allow specifying of ifindex from userspace. This patch adds such option
through ctx_in (__sk_buff) parameter.

Signed-off-by: default avatarDmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200803090545.82046-3-zeil@yandex-team.ru
parent fa5cb548
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