From 4dfce18208b46aa8352e757f6f9601d88148324e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Thu, 12 May 2022 08:47:05 +0000 Subject: [PATCH] bpfloader: add support for netd_shared and net_private subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: I613b84342fba7b425fb10af157fe0a6a731b71cb (cherry picked from commit 7acf938127d2b9e92d038e9c77977cc209003f61) Merged-In: I613b84342fba7b425fb10af157fe0a6a731b71cb --- bpfloader/BpfLoader.cpp | 12 +++++++++++- libbpf_android/Loader.cpp | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp index 8b49cec..739932d 100644 --- a/bpfloader/BpfLoader.cpp +++ b/bpfloader/BpfLoader.cpp @@ -74,11 +74,21 @@ const Location locations[] = { .dir = "/apex/com.android.tethering/etc/bpf/", .prefix = "tethering/", }, - // Tethering mainline module: netd, clatd, ...etc + // Tethering mainline module (shared with netd & system server) + { + .dir = "/apex/com.android.tethering/etc/bpf/netd_shared/", + .prefix = "netd_shared/", + }, + // Tethering mainline module (shared with system server) { .dir = "/apex/com.android.tethering/etc/bpf/net_shared/", .prefix = "net_shared/", }, + // Tethering mainline module (not shared) + { + .dir = "/apex/com.android.tethering/etc/bpf/net_private/", + .prefix = "net_private/", + }, // Core operating system { .dir = "/system/etc/bpf/", diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp index e181f71..b2f15cc 100644 --- a/libbpf_android/Loader.cpp +++ b/libbpf_android/Loader.cpp @@ -30,9 +30,9 @@ #include #include -// This is BpfLoader v0.12 +// This is BpfLoader v0.13 #define BPFLOADER_VERSION_MAJOR 0u -#define BPFLOADER_VERSION_MINOR 12u +#define BPFLOADER_VERSION_MINOR 13u #define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR) #include "bpf/BpfUtils.h"