bpf: offload/test: remove use of TETHERING_{UID,GID}
This was added only because this used to depend on
in vs out-of-process network stack, but we don't support
in-process-tethering any more.
Generated via:
sed -i -r 's@TETHERING_UID@AID_ROOT@' test.c
sed -i -r 's@TETHERING_UID@AID_ROOT@' offload.c
sed -i -r 's@TETHERING_GID@AID_NETWORK_STACK@' offload.c
sed -i -r 's@TETHERING_GID@AID_NETWORK_STACK@' test.c
then removing the now spurious #defines at the top of the files.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id3da93ee52b1ea9357388a2b045dfafa150af0ab
diff --git a/bpf_progs/test.c b/bpf_progs/test.c
index 8a0de0d..aa6d8de 100644
--- a/bpf_progs/test.c
+++ b/bpf_progs/test.c
@@ -25,11 +25,6 @@
#define BPFLOADER_MAX_VER BPFLOADER_T_VERSION
#endif /* MAINLINE */
-// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21
-#define TETHERING_UID AID_ROOT
-
-#define TETHERING_GID AID_NETWORK_STACK
-
// This is non production code, only used for testing
// Needed because the bitmap array definition is non-kosher for pre-T OS devices.
#define THIS_BPF_PROGRAM_IS_FOR_TEST_PURPOSES_ONLY
@@ -39,15 +34,15 @@
// Used only by TetheringPrivilegedTests, not by production code.
DEFINE_BPF_MAP_GRW(tether_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
- TETHERING_GID)
+ AID_NETWORK_STACK)
DEFINE_BPF_MAP_GRW(tether2_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
- TETHERING_GID)
+ AID_NETWORK_STACK)
DEFINE_BPF_MAP_GRW(tether3_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
- TETHERING_GID)
+ AID_NETWORK_STACK)
// Used only by BpfBitmapTest, not by production code.
-DEFINE_BPF_MAP_GRW(bitmap, ARRAY, int, uint64_t, 2, TETHERING_GID)
+DEFINE_BPF_MAP_GRW(bitmap, ARRAY, int, uint64_t, 2, AID_NETWORK_STACK)
-DEFINE_BPF_PROG_KVER("xdp/drop_ipv4_udp_ether", TETHERING_UID, TETHERING_GID,
+DEFINE_BPF_PROG_KVER("xdp/drop_ipv4_udp_ether", AID_ROOT, AID_NETWORK_STACK,
xdp_test, KVER_5_9)
(struct xdp_md *ctx) {
void *data = (void *)(long)ctx->data;