- Oct 23, 2023
-
-
Jordan Silva authored
-
Jordan Silva authored
Revert submission 2745215-npmsbpf DroidMonitor: Potential culprit for Bug 307256512 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reason for revert: 307256512 Reverted changes: /q/submissionid:2745215-npmsbpf Change-Id: I27119a7484453d1369bbdf71ad2479edec7d664f
-
Hansen Kurli authored
* changes: Add tests for always on lockdown VPN on system user. Remove MockVpn.setAlwaysOnPackage() non-lockdown. Mock onUserAdded() and onUserRemoved() Refactor helper method to return integer ranges. Add tests for onUserAdded and onUserRemoved
-
Junyu Lai authored
-
Hansen Kurli authored
Add test coverage for Vpn.setAlwaysOnPackage() where the caller is system user to ensure uid = 0 is not restricted. Bug: 230548427 Test: atest FrameworksNetTests Change-Id: Id9f81fdf0147597f64f8440b971930b3bd7b55e5
-
Hansen Kurli authored
Remove calls to MockVpn.setAlwaysOnPackage() where lockdown is false as this does not cause any changes to occur. Also verify setRequireVpnForUids() is not called for this case in VpnTest. Bug: 230548427 Test: atest FrameworksNetTests Change-Id: I3428e8b31b02975975be9e943e1f88cf0e80c5ee
-
Hansen Kurli authored
Replace calls to onUserAdded() and onUserRemoved() to their equivalent setUids() or setRequireVpnForUids() calls. Note coverage for the calls to Vpn were added in VpnTest. Bug: 230548427 Test: atest FrameworksNetTests Change-Id: Ifa895f71f78bd3376216fd2759c7a5a33cd3aff1
-
Hansen Kurli authored
Calls to setRequireVpnForUids() for Vpn lockdown actually uses a List instead of a Set of integer ranges. Add intRangesExcludingUids() to return the needed List of integer ranges and replace relevant usages of UidRange.toIntRanges() with it. Bug: 230548427 Test: atest FrameworksNetTests Change-Id: I61cd4751ce2faeb129daa5ad5da7181e3c1df73c
-
- Oct 22, 2023
-
-
Sudheer Shanka authored
-
- Oct 21, 2023
-
-
Jean Chalard authored
-
Maciej Żenczykowski authored
-
Maciej Żenczykowski authored
Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I447880763bbc506f08b578f862f09be91ab3d14d
-
Treehugger Robot authored
-
Maciej Żenczykowski authored
-
Ken Chen authored
UidOwnerMatchType Java definition moved from BpfNetMaps.java to BpfNetMapsConstants.java in change I6d7ea044e43180. Bug: 297836825 Test: presubmit Change-Id: I4fc28406750cac9143ea47e9304b455ab616d462
-
Maciej Żenczykowski authored
This mostly reverts commit 1d2c93d5. Test: N/A Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I0d7fdaeae508c0250114f7af8700d0fc40b0f27a
-
- Oct 20, 2023
-
-
Maciej Żenczykowski authored
change of design: we'll call netbpfload before bpfloader Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I2d7a04a1bf1aa1d163f2b3936e2cde61308c4aa4
-
Jean Chalard authored
-
Junyu Lai authored
-
Xiao Ma authored
-
- Oct 19, 2023
-
-
Maciej Żenczykowski authored
-
Maciej Żenczykowski authored
-
Sudheer Shanka authored
Bug: 305826147 Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4c137f7fa7827a9794165b86a5cc7ade85f017bf) Merged-In: I1840e091ebbc9812da56a3522e009ba67a18c476 Change-Id: I1840e091ebbc9812da56a3522e009ba67a18c476
-
Junyu Lai authored
Currently, data saver switch is controlled in NPMS, which calls into NetworkManagementService and netd when switching status. In netd, BandwidthController manipulates the bw_data_saver chain to control the overall behavior. However, this code are all platform implementation, which are not updatable. In order to migrate data saver switch from iptables to bpf, this API is needed for Connectivity to change the implementation to directly write bpf in later patches. Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideRestrictBackgroundNetworkTests Test: atest FrameworksServicesTests:NetworkManagementServiceTest Bug: 297836825 Change-Id: I71fa41ca739fef8e191fba91b02758ad5f732d5c
-
Junyu Lai authored
-
Junyu Lai authored
-
Paul Hu authored
-
Junyu Lai authored
Follow-up from aosp/2788197, the CL does not work since SkipPresubmit annotation is not excluded from TEST_MAPPING for ConnectivityCoverageTests. Test: TH Bug: 302325928 Change-Id: Ibfa509aadc9e54da14738714be46abd25f46f3fb
-
- Oct 18, 2023
-
-
Paul Hu authored
The TTL check and removal of expired services is currently only performed when a mDNS query is sent. This can result in expired services remaining in the cache if no queries are sent. To address this, the remaining TTL will be checked when retrieving services from the MdnsServiceCache. Add a new flag to enable the expired services removal feature. This feature will be implemented in subsequent changes. Bug: 265787401 Bug: 304649384 Test: atest FrameworksNetTests CtsNetTestCases Change-Id: I30f0eea568ee45d363cc02821de0921d6040f981
-
Junyu Lai authored
Test: atest NetworkStatsIntegrationTest#testBpfProgramAttachStatus Bug: 292156770 Change-Id: I815be0f3f3592442939872f98e3ad9d224a6aeb6
-
Junyu Lai authored
Sample output: Bpf Program Status: CGROUP_INET_INGRESS: 21 CGROUP_INET_EGRESS: 22 CGROUP_INET_SOCK_CREATE: 28 CGROUP_INET4_BIND: 30 CGROUP_INET6_BIND: 31 Test: adb shell dumpsys connectivity Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest#testDumpDoesNotCrash Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest#testDumpDoesNotCrash Bug: 292156770 Change-Id: I312c90c524af12d093536156d6d5c6febd64305a
-
Chalard Jean authored
This reverts commit 316346be. Change-Id: I86977f6e7a5451d037c7ea6fee5c4bc7082935ff
-
Chalard Jean authored
This reverts commit 6eea22b1. Change-Id: I0a2cef4ee992577674c92ecd384dc6f4361afa02
-
Junyu Lai authored
-
- Oct 17, 2023
-
-
Jean Chalard authored
-
Junyu Lai authored
-
Junyu Lai authored
Follow-up from aosp/2788197, the CL does not work since SkipPresubmit annotation is not excluded from TEST_MAPPING for ConnectivityCoverageTests. Test: TH Bug: 302325928 Change-Id: I2d953f19e5d5eb5f5d8fdf4faf335d603bae42a0
-
Junyu Lai authored
I0afdda023208c3f8620cb5b89add66448af596d7 added some assertions to ensure NetworkAgentInfo can only be accessed from the handler thread. This is good to eliminate any potential concurrent accessing problem. Howver, dumpsys runs on binder thread, this change breaks dumpsys functionality. Thus, this change: 1. Copy Handler#runWithScissors() and related class locally since they are @hide methods. 2. Run doDump on the handler thread and waits for return. Test: adb shell dumpsys connectivity Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.HandlerUtilsTest Fix: 303348620 Change-Id: Ic3a22f5d370bbf8c18b1972e86d695b6ad61bd0d
-
Chalard Jean authored
This reverts commit cc409153. Change-Id: Ied6bdb9b94e08e2bfe1092765d0f4591e603c3eb
-
Junyu Lai authored
This is catched by errorprone where global variables accessing is not protected by the declared lock, which could lead to a potiential race problem where these variables are changed but cannot be seen for the invocation. This is also safe since: 1. The method called inside mDefaultNetworks is already holding the same lock. 2. Multiple global variables are protected by this synchronized block. Test: TH Fix: 181642673 Change-Id: I58e7f124de1f0291e9323ab0b9cf8f52cec32818
-