Adds ingress rate limiting functionality to ConnectivityService. The tc
rate limit is installed before we tell netd about the interface, and
removed after the network is removed from netd. When the setting
changes, the old rate limit needs to be removed before a new one can be
added (unfortunately, we cannot use NLM_F_REPLACE when configuring the
tc-police filter).
Currently, this functionality is always enabled, but may or may not work
based on kernel support.
Bug: 157552970
Test: atest FrameworksNetTests:ConnectivityServiceTest
Change-Id: I4e64b2c40490f061e42b40a1b1b3a6618c3d1a87
When the network is a VPN, NetworkMonitor needs to know whether
the VPN requests validation, and that information is stored in
NetworkAgentConfig. Pass it.
Test: FrameworksNetTests
Change-Id: I3616f0796b69ce054d92213aafdef43ba7041596
Passing one of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED is
required for all code targeting T or above. The correct value
here is RECEIVER_NOT_EXPORTED because the receiver is being
registered in the system server and the broadcast comes from
the system server itself (same UID).
This does not need to be guarded by OS version because
CarrierPrivilegeAuthenticator is only used on T+.
Test: m
Fix: 217642082
Change-Id: I09840b17bd54352896607737b56c6a692ffbd2c2
Test that NsdManager specifies the correct network when a service is
discovered, and that services can be resolved on a specified network.
Also test that service discovery can be started on a specific network.
Bug: 190249673
Test: atest NsdManagerTest
Change-Id: Ie8b551ce9e33e3adf35f75508f91bbd0df71f837
* changes:
Prevent native_init from starting TrafficController
Remove libutils dependency from libservice-connectivity
Merge libtraffic_controller_jni into libservice-connectivity
[NETD-TC#15] Make ConnectivityService and PermissionMonitor calls BpfNetMaps on T
* changes:
Expose access UIDs.
Send access UIDs to netd
Add accessUids to NetworkCapabilities.
Clean up restrictions on network agent capabilities
Sanitize NetworkCapabilities from agent on the handler thread
calls BpfNetMaps on T
Since TrafficController moves to mainline module for T, so some netd binder
interfaces revelant to BPF are going to deprecated. Provide JNI APIs to
call TrafficController inside mainline module for T.
Bug: 209935649
Test: atest CtsHostsideNetworkTests
Change-Id: Ib3b43cf2840e02806395af9f1e019ca6fccd032e
For now, all entry points reject this. Followup changes
will allow the supported use cases.
Test: new unit tests and CTS for this in this patch
Change-Id: I7262811a2e46336d3bb63c80886fc0578a36da94
NetworkManagementSocketTagger#kernelToTag is moving to
NetworkStatsFactory. Fix the import path in the test.
Test: atest FrameworksNetTest
Change-Id: I8797d9e589e68b4980ff5b38ba09d091420d30fd
NETWORK_TYPE_5G_NSA is moved to NetworkStatsManager
Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: I9226119ee4f67688a1b4ffdab7e5a86ec0b8e974
Introduce ClatCoordinatorTest for unit tests of class ClatCoordinator.
Add the tests:
- testStartStopClatd
- testGetFwmark
- testAdjustMtu
Bug: 212345928
Test: atest FrameworksNetTests
Change-Id: I6908eac05b14077b450d51e1432d340c8a247eb1
This is the corresponding test change with netd usage replacement
in NetworkManagementService.
Bug: 209935649
Test: atest NetworkManagementServiceTest
Change-Id: Id25f2d7d291eef7c8bb12a7fcf67b1619cce6da5
This is the corresponding test change with INetd#trafficSwapActiveStatsMap
usage replacement.
Bug: 209935649
Test: atest NetworkStatsFactoryTest
Change-Id: Ic5e29f6a928c4230322ed658fe8ddbd71d7ea56a
Correct the SDK for those tests are expected running in T+
device. Check @IgnoreUpTo(S) may be incorrect after receiving
patches before T release.
Refer to temporary constant definition in DevSdkIgnoreRule until
the SDK constant being pushed into AOSP and synced with branch
used for mainline.
BUg: 215294242
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: Ide6a241f7944dd1e75bc33b21aa29471a5df94c6
Correct the NetworkStatsServiceTest
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I47dc377a5cce7d8a0029dc808ad0f46e651764b1