mark cgroupsock/inet/create ebpf program as requiring 4.14+ kernel
It doesn't actually load on 4.9 kernels.
Test: build, atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibdacda626a7496c66145960d1d0e5004bb98cb08
diff --git a/bpf_progs/netd.c b/bpf_progs/netd.c
index 40725ca..8bcb3dc 100644
--- a/bpf_progs/netd.c
+++ b/bpf_progs/netd.c
@@ -313,8 +313,9 @@
DEFINE_BPF_MAP(uid_permission_map, HASH, uint32_t, uint8_t, UID_OWNER_MAP_SIZE)
-SEC("cgroupsock/inet/create")
-int inet_socket_create(struct bpf_sock* sk) {
+DEFINE_BPF_PROG_KVER("cgroupsock/inet/create", AID_ROOT, AID_ROOT, inet_socket_create,
+ KVER(4, 14, 0))
+(struct bpf_sock* sk) {
uint64_t gid_uid = bpf_get_current_uid_gid();
/*
* A given app is guaranteed to have the same app ID in all the profiles in