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

bpf: Setup socket family and addresses in bpf_prog_test_run_skb



Now it's impossible to test all branches of cgroup_skb bpf program which
accesses skb->family and skb->{local,remote}_ip{4,6} fields because they
are zeroed during socket allocation. This commit fills socket family and
addresses from related fields in constructed skb.

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-2-zeil@yandex-team.ru
parent cfa3eb65
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