Commit Graph

7 Commits

Author SHA1 Message Date
Treehugger Robot
b6ac308b50 Merge changes I5ffa2faf,Id5f14d6e
* changes:
  add proper minimum bpfloader version annotations for block/clatd/dscp_policy/netd
  move netd maps and progs into /sys/fs/bpf/netd_shared/...
2022-05-17 15:39:02 +00:00
Maciej Żenczykowski
6d116d0f38 move netd maps and progs into /sys/fs/bpf/netd_shared/...
(out of current /sys/fs/bpf/net_shared/...)

This will allow genfscon regexp changes in a followup selinux commit.

Note that this has a hard dependency on system/bpf change
  'bpfloader: add support for netd_shared and net_private subdirs'
which also bumps bpfloader to v0.13.

This was merged May 12, 2022 (into both aosp/master and tm-dev)
and it is in Android T starting with Beta 3 release.

This isn't really an issue since amusingly T Beta 2 is already
incompatible with current mainline releases due to the snap
reverting a previous required bpfloader system/bpf change:
  move net_shared bpf programs into net_shared subdirectory
See: http://b/232050459#comment14

So this doesn't break T Beta1/2, since they already don't work,
and Beta3 will work.

Bug: 218408035
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id5f14d6e3f11cfe35d9d8a9496548a2bc4d022ec
2022-05-16 23:24:37 +00:00
Motomu Utsumi
b08654ca04 Block incoming packets in VPN Lockdown mode.
Currently, even when VPN Lockdown mode is enabled, incoming packets are
not dropped if VPN is not connected.

This commit fixed this issue.
After this commit, If VPN Lockdown mode is enabled, incoming packets
are dropped regardless of the VPN connectivity.

Bug: 206482423
Test: atest TrafficControllerTest ConnectivityServiceTest PermissionMonitorTest
Change-Id: If52ece613c8aac1073355e43b6fb9cb3fcc87d1d
2022-05-16 10:40:59 +00:00
Maciej Żenczykowski
0736d7bd91 adjust for new T bpfloader net_shared location
(this is safe because on pre-T none of these maps and programs are mainlined
 and thus safe to access from mainline code anyway)

Test: TreeHugger, manual
Bug: 218408035
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I23e565d665247f33e084978890a1ee8ffe0fe568
2022-04-23 09:03:06 +00:00
Robert Horvath
54423027fa Implement Low Power Standby packet filtering in BPF program
Bug: 190822356
Test: atest NetworkManagementServiceTest
Change-Id: I664414fbb744a118d4d0fea4ed91680bb38efe07
2022-02-02 22:54:21 +01:00
Ken Chen
f426b2b287 Rename libnetdbpf to libnetworkstats
Two reason for renaming:
1. Avoid module name collision in sc-mainline-prod branch.
2. The libnetdbpf was misnamed before.

Bug: 202086915
Test: atest libnetworkstats_test FrameworksNetTests
      ConnectivityCoverageTests FrameworksNetSmokeTests
      CtsAppOpsTestCases
Change-Id: I87fcf4b1a9d58780a45743a9aa91b9b936e54266
2022-01-24 11:53:59 +08:00
Ken Chen
335c0d4249 [NETD-BPF#4] Move bpf_shared.h from netd to module
The header file is referenced by the part going to be mainlined in Netd.
Note that some platform visibility is required with this commit, since
users of bpf_shared.h is currently located in platform. The visibility
can be removed when all users are moved out of platform.

Bug: 202086915
Test: m; flash; boot
Test: cd system/netd && atest
Test: cd packages/modules/Connectivity && atest
Test: atest FrameworksNetTests
Change-Id: I5c16511b6a2d4eb80dfd93157cbc98d5030bd5ac
2021-11-23 11:53:46 +08:00