From 25c028576d83a068aae724c21b2b1abb368d2fec Mon Sep 17 00:00:00 2001 From: Tyler Wear Date: Tue, 26 Oct 2021 15:38:48 -0700 Subject: [PATCH] Add Bpf Prog Type for CGROUP_SOCK_ADDR When loading a BPF program check for CGROUP_SOCK_ADDR program type. Bug: 179733303 Change-Id: I0464052065ec6f77a639a12a8dd343b7bf6f6ef8 --- libbpf_android/Loader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp index d2380a2..b7f38ce 100644 --- a/libbpf_android/Loader.cpp +++ b/libbpf_android/Loader.cpp @@ -28,9 +28,9 @@ #include #include -// This is BpfLoader v0.4 +// This is BpfLoader v0.5 #define BPFLOADER_VERSION_MAJOR 0u -#define BPFLOADER_VERSION_MINOR 4u +#define BPFLOADER_VERSION_MINOR 5u #define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR) #include "../progs/include/bpf_map_def.h" @@ -95,6 +95,7 @@ sectionType sectionNameTypes[] = { {"schedact", BPF_PROG_TYPE_SCHED_ACT}, {"cgroupsock", BPF_PROG_TYPE_CGROUP_SOCK}, {"xdp", BPF_PROG_TYPE_XDP}, + {"cgroupsockaddr", BPF_PROG_TYPE_CGROUP_SOCK_ADDR}, /* End of table */ {"END", BPF_PROG_TYPE_UNSPEC},