Tag socket as uid AID_CLAT to avoid duplicated data usage counting by
bpf program.
Bug: 237369591
Test: ClatCoordinatorTest
Change-Id: Ic18521b63b3feadd53d77d7f4f0b44ab983e5fbf
This is a no-op and test only change. Some parameters use many
times, so add common parameters to reduce duplicated code.
Bug: 236788977
Test: atest FrameworksNetTests
Change-Id: I94370817ea87d1da5c30ea2ed467c1746edecba3
This commit is a preparation for replacing JNI codes that modify
UidOwnerMap by Java.
Bug: 217624062
Test: atest BpfNetMapsTest HostsideRestrictBackgroundNetworkTests
android.net.cts.ConnectivityManagerTest#testFirewallBlocking
Change-Id: Ie595cf1f77a3ed86addbcdaea1a1be972e0265b3
Use mock intent receiver to handle intent related events instead
of exposing the private methods even for testing only.
The visibility for onPackageAdded, onPackageRemoved and
onUserStarted were exposed for testing only in former commit.
The test coverage for intent receiver part may be missed.
The other intent related methods will be verified in the
follow up commits. This refactor will also help to not to
expose further private methods.
Bug: 230548427
Test: atest VpnManagerServiceTest
Change-Id: If2aa88d8d5c1643e8bd4937673aa792186047fd8
Verify reconnect using startVpnProfile with the same package with
always-on package should work without exception.
Bug: 235322391
Test: atest FrameworksNetTests
Change-Id: I9a780d970208032e2468e9c5b3334373627c6a20
Update the string according to the change in Vpn.java
Bug: 237345836
Test: atest FrameworksNetTests
Change-Id: I9bfe0a1fad29ba1435eeb8b8b2cffa9d385b1cb5
Add tests to verify that calling getProvisionedVpnProfileState works
normally from the same package but gets a security exception from a
differnet package.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: I0132c42dce1b8269859fca8d0143304142162838
Address review comments from aosp/2131752 and aosp/2117045
sConfigurationMap must have a entry for UID_RULES_CONFIGURATION_KEY
because this bpf map is an array
Bug: 217624062
Test: atest BpfNetMapsTest
Change-Id: Ic52623e11c1f53e363416d57c0d8705d5510ef04
Decouple security exception check test from ConnectivityServiceTest
to VpnManagerServiceTest.
These security exception tests landed in ConnectivityServiceTest
because of no VpnManagerServiceTest. Move the tests to the
VpnManagerServiceTest where is better place to put the VPN related
tests to reduce the size of ConnectivityServiceTest.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: I94b691c4d1f63bd5226e3296e6d0160dcb03107c
This is a no-op change to move some common codes that share
between different VPN unit tests to the new base class.
It's helpful to reduce the code duplication for the follow up
work to add the VpnManagerServiceTest and other test codes
refactor.
Bug: 231373589
Test: atest FrameworksNetTests
Change-Id: Id5111e7ca33ea8f9eb4bcc6c13d0e681f0664d24
- Put mdns code to service/mdns because we don't want to impact
coverage for code that's not yet in use.
- Also fix some lint errors
- Common typo errors
- Lines longer than 100 characters
- Update IgnoreUpTo from S to SC_V2 because the tests should be
ignored until T.
Bug: 232766079
Test: atest FrameworksNetTests
Change-Id: I19af3bf7ae004bd37960f2ad9014cf0c6a804c8d
This commit adds ConnectivityManager#getFirewallChainEnabled to read the
current firewall chain status
Bug: 208371987
Test: m
Change-Id: I1eadb69f953af5d031cd8dabde3e1f098cf0f4df
The test verifies arguments used to start the daemon
Bug: 201660636
Test: atest VpnTest
Change-Id: I0854fbeaf1a3e3554c157fde227a7bfa187b1013
Merged-In: I0854fbeaf1a3e3554c157fde227a7bfa187b1013
When a calling the updateInterface API, if no eth specifier was set it
would be removed not allowing follow-up network requests to request by
ethernet specifier.
This CL makes sure that the eth specifier is always set as expected when
updateInterface is called by either validating the input or setting the
specifier if the passed one is null.
Bug: 236294399
Bug: 229207021
Test: atest FrameworksNetTests
:com.android.server.ethernet.EthernetNetworkFactoryTest
Change-Id: Ic05ca7fe4adaa94f79e59758569f7595ab4c4f54
If reading data happens exception while doing data migration,
the file will be deleted by legacy recorders. This would cause
legacy persistent data being lost and cannot be retrieved by
any method. To avoid the files being deleted, add a wipeOnError
flag to recorder which indicates this recorder will wipe on
error or not . If the flag is set to true then deletes all files
when it throws, otherwise keeps all files.
(cherry-picked from ag/18910973)
Bug: 233828210
Test: FrameworksNetTests:NetworkStatsRecorderTest
Change-Id: Id7a3d8bebf8a00d814f9e84bf4c10d927e6ff749
Merged-In: Id7a3d8bebf8a00d814f9e84bf4c10d927e6ff749
This CL disable the comparison mechanism introduced
in previous beta releases to stop receiving log.wtf signals
from beta users.
This CL only affects logging on user release builds.
Test: 1. NetworkStatsServiceTest
2. manual test with script
Bug: 233752318
Change-Id: I7047106b1019c29460d6633b148f501ffa62f139
Merged-In: I7047106b1019c29460d6633b148f501ffa62f139
(cherry-picked from ag/18869740)
Follow-up from ag/18452103, where we add fallback code that runs
with the importer to make sure they are identical.
When the result is different, we'll take the result from fallback
code to minimize the rollout risk. However, since the OEMs might
change the importer implementation. The fallback code would no
longer valid and that makes OEM modified code not working. Hence
the fallback code must be disabled before release.
This change keeps comparison enabled for all cases to keep getting
signals from beta users. And will switch it to read overlay value
for OEM to debug their solution.
Test: 1. NetworkStatsServiceTest
2. Test all datasets with script
Bug: 233752318
Change-Id: I869ff05297149bde6e13a204bd8c5a4fece75de0
Merged-In: I869ff05297149bde6e13a204bd8c5a4fece75de0
(cherry-picked from ag/18849946)
This CL also stop from incresing "successes" counter if the
importer finishes with fallback.
Test: manual
Bug: 230289468
Change-Id: I88fce1b2d0dea3772a8b31df8f8fa93bf13bffad
Merged-In: I88fce1b2d0dea3772a8b31df8f8fa93bf13bffad
(cherry-picked from ag/18486388)
This commit also
- verifies that during network switch with MOBIKE
enabled, the cleanup task is scheduled upon network loss and
cancelled when new network is available.
- improves the retry tests to avoid waiting for actual timeout
Bug: 192077544
Test: atest VpnTest (new tests)
Change-Id: I5b47ba98116ac4523a36bc495e8788f29a9ecf20