summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Chen <cken@google.com>2022-01-17 17:22:34 +0800
committerMaciej Żenczykowski <maze@google.com>2022-01-19 04:18:53 +0000
commit6d69784cdcdb68e609a8d4efe03819559bea49ca (patch)
tree583a8953fdf27cd8104b6ffa3b3a7a59e5f80dbc
parentd568947cd742e5eeb1c53edc8e3853a85ed66865 (diff)
downloadbpf-6d69784cdcdb68e609a8d4efe03819559bea49ca.tar.gz
Allow bpfloader to handle 'net_shared' subdirectory
netd.c is moved from netd to tethering mainline module. Bump BpfLoader to v0.9 Bug: 202086915 Test: cd system/netd; atest Test: atest TrafficStatsTest NetworkUsageStatsTest Change-Id: I0b8ba90bbbe4e16d979c4a40d6fdbbaac0d14d27
-rw-r--r--bpfloader/BpfLoader.cpp7
-rw-r--r--libbpf_android/Loader.cpp4
2 files changed, 8 insertions, 3 deletions
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index 7a68894..1fc44f4 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -55,11 +55,16 @@ struct {
const char* const dir;
const char* const prefix;
} locations[] = {
- // Tethering mainline module
+ // Tethering mainline module: tether offload
{
.dir = "/apex/com.android.tethering/etc/bpf/",
.prefix = "tethering/",
},
+ // Tethering mainline module: netd, clatd, ...etc
+ {
+ .dir = "/apex/com.android.tethering/etc/bpf/net_shared/",
+ .prefix = "",
+ },
// Core operating system
{
.dir = "/system/etc/bpf/",
diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp
index abe1704..74a1ee6 100644
--- a/libbpf_android/Loader.cpp
+++ b/libbpf_android/Loader.cpp
@@ -28,9 +28,9 @@
#include <sys/utsname.h>
#include <unistd.h>
-// This is BpfLoader v0.8
+// This is BpfLoader v0.9
#define BPFLOADER_VERSION_MAJOR 0u
-#define BPFLOADER_VERSION_MINOR 8u
+#define BPFLOADER_VERSION_MINOR 9u
#define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR)
#include "bpf/BpfUtils.h"