Skip to content

Commit 01210f0

Browse files
bpf: add get_netns_cookie helper to cgroup_skb programs
JIRA: https://issues.redhat.com/browse/RHEL-110279 commit c221d37 Author: Mahe Tardy <mahe.tardy@gmail.com> Date: Tue Feb 25 12:50:30 2025 +0000 bpf: add get_netns_cookie helper to cgroup_skb programs This is needed in the context of Cilium and Tetragon to retrieve netns cookie from hostns when traffic leaves Pod, so that we can correlate skb->sk's netns cookie. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com> Link: https://lore.kernel.org/r/20250225125031.258740-1-mahe.tardy@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
1 parent 15654a7 commit 01210f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/core/filter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7996,6 +7996,8 @@ sk_filter_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
79967996
return &bpf_skb_load_bytes_relative_proto;
79977997
case BPF_FUNC_get_socket_cookie:
79987998
return &bpf_get_socket_cookie_proto;
7999+
case BPF_FUNC_get_netns_cookie:
8000+
return &bpf_get_netns_cookie_proto;
79998001
case BPF_FUNC_get_socket_uid:
80008002
return &bpf_get_socket_uid_proto;
80018003
case BPF_FUNC_perf_event_output:

0 commit comments

Comments
 (0)