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
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 @@
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"