Commit Graph

2467 Commits

Author SHA1 Message Date
Lorenzo Colitti
ff949864da Merge "Cleanup commit to remove @SkipPresubmit and fix nits" am: 81ede794c7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1729418

Change-Id: I9816ee225b2c647a3127e5a4647722e366c0ddf8
2021-06-15 15:14:30 +00:00
Lorenzo Colitti
61cad6e216 Merge "Verify kernel implementation of AES-CMAC" am: a1363cbd82
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1697312

Change-Id: Iffd5043dc798773405cf10c41c60597c0b8aaaa7
2021-06-15 15:13:18 +00:00
Lorenzo Colitti
81ede794c7 Merge "Cleanup commit to remove @SkipPresubmit and fix nits" 2021-06-15 14:54:07 +00:00
Lorenzo Colitti
a1363cbd82 Merge "Verify kernel implementation of AES-CMAC" 2021-06-15 14:53:36 +00:00
Lorenzo Colitti
ec110e2e24 Merge "Don't run testGetAllNetworkStateSnapshots in instant app mode" am: b91372a50f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1737396

Change-Id: I9807baa0089b208c6831c73b86cfcee8026f1d6b
2021-06-15 13:38:58 +00:00
Lorenzo Colitti
b91372a50f Merge "Don't run testGetAllNetworkStateSnapshots in instant app mode" 2021-06-15 13:29:19 +00:00
Lucas Lin
f7aa7c51ee Merge "Send a proxy broadcast when apps moved from/to a VPN" am: cfc86ef0f6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1717735

Change-Id: I2fc18571e6ecf36d919d9c5971c275f5c26ddfa4
2021-06-15 09:28:16 +00:00
Lucas Lin
cfc86ef0f6 Merge "Send a proxy broadcast when apps moved from/to a VPN" 2021-06-15 09:26:21 +00:00
Lorenzo Colitti
6c08a1824b Merge "Verify kernel implementation of AES-XCBC" am: ea56397997
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503696

Change-Id: Icd06cea452718f8771677a5737305c5a7fb4a720
2021-06-15 09:20:10 +00:00
Lorenzo Colitti
069c4c996a Merge "Verify kernel implementation of AES-CTR" am: b8aeaa220c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503695

Change-Id: I3be7be57d109bc44e35826bf6629f79a67c1eae8
2021-06-15 09:20:00 +00:00
Lorenzo Colitti
ea56397997 Merge "Verify kernel implementation of AES-XCBC" 2021-06-15 09:12:35 +00:00
Lorenzo Colitti
b8aeaa220c Merge "Verify kernel implementation of AES-CTR" 2021-06-15 09:09:05 +00:00
Remi NGUYEN VAN
ddca01a6af Merge "Fix KeepalivePacketDataUtilTest crash on eng build" am: efdffa82f8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736261

Change-Id: I5debd8529ba5018ef421ca0dd1fc41905c014ac2
2021-06-15 07:17:28 +00:00
Remi NGUYEN VAN
efdffa82f8 Merge "Fix KeepalivePacketDataUtilTest crash on eng build" 2021-06-15 07:08:23 +00:00
Treehugger Robot
703321fc81 Merge "Add unit test when querying TYPE_WIFI + null/empty/non-null subscriberId" am: 1dba7454b3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1727826

Change-Id: I7468430e5e00282e63860bf6edcfcc5730bebed4
2021-06-15 06:58:54 +00:00
Treehugger Robot
1dba7454b3 Merge "Add unit test when querying TYPE_WIFI + null/empty/non-null subscriberId" 2021-06-15 06:46:49 +00:00
Aaron Huang
3d35a9736f Don't run testGetAllNetworkStateSnapshots in instant app mode
Instant app mode doesn't have permission to request networks.
Thus, ignore the test in instant app mode.

Bug: 189724761
Test: CtsNetTestCases:ConnectivityManagerTest#testGetAllNetworkStateSnapshots \
      --instant
Change-Id: I2897462f4ef6c019b80a3b5159b1c41f397af8de
2021-06-15 14:17:07 +08:00
Lorenzo Colitti
2ddc21f483 Merge "Verify kernel implementation of ChaCha20Poly1305" am: 69c14d531c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503694

Change-Id: Ibcb5a3ace65e96497bc969f85c0febff32d80fec
2021-06-15 05:31:37 +00:00
Lorenzo Colitti
3231562efc Merge "Support algorithm configurability in PacketUtils EspHeader" am: ec5d07c59e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503693

Change-Id: Ieced25169b51cf1db1f97447d5f754dd7443d524
2021-06-15 05:31:25 +00:00
Lorenzo Colitti
69c14d531c Merge "Verify kernel implementation of ChaCha20Poly1305" 2021-06-15 05:18:24 +00:00
Lorenzo Colitti
ec5d07c59e Merge "Support algorithm configurability in PacketUtils EspHeader" 2021-06-15 05:17:51 +00:00
Les Lee
a0592d3e06 Add unit test when querying TYPE_WIFI + null/empty/non-null subscriberId
Starting with API level 31, the subscriberId is applicable
for the wifi network. Considering applications may use
null or an empty string as subscriberId (for instance, cts),
frameworks create MATCH_WIFI_WILDCARD NetworkTemplate when querying
wifi network with null or an empty string which is the behavior before
API level 31.

Bug: 188915450
Test: atest -c NetworkStatsManagerTest
Change-Id: Id4ae06840e1749997e970b8f1ec391060967bd47
2021-06-15 12:04:23 +08:00
Paul Hu
136bd35a67 Merge "Add DEFAULT_NETWORK_PRIORITY constants" am: c323f6502d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1718950

Change-Id: I8167aaded9a7e2125cbe317401cc45365313b76d
2021-06-15 02:55:44 +00:00
Paul Hu
c323f6502d Merge "Add DEFAULT_NETWORK_PRIORITY constants" 2021-06-15 02:42:03 +00:00
Paul Hu
c639d88a44 Merge "Add more unit tests for mobile data preferred uids feature" am: c6741064d0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1717436

Change-Id: I0791a23eef801c24bf4605264a7478edd9167b88
2021-06-15 01:39:32 +00:00
Paul Hu
c6741064d0 Merge "Add more unit tests for mobile data preferred uids feature" 2021-06-15 01:28:19 +00:00
Yan Yan
83f08bd8ee Merge "Set up and tear down test network in TestNetworkRunnable" am: 1e071f9120
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503692

Change-Id: I051f69d58f9511fb6ad0574963b217324f54b155
2021-06-15 00:51:17 +00:00
Yan Yan
1e071f9120 Merge "Set up and tear down test network in TestNetworkRunnable" 2021-06-15 00:36:12 +00:00
Sudheer Shanka
16063e8281 Merge "Avoid waiting unnecessarily if there is no data to return." am: 7184887d71
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1735977

Change-Id: I9bc8d90381baf74cfe38bc0f30f61a284c86f339
2021-06-14 18:58:27 +00:00
Sudheer Shanka
7184887d71 Merge "Avoid waiting unnecessarily if there is no data to return." 2021-06-14 18:39:30 +00:00
paulhu
e99137226e Add DEFAULT_NETWORK_PRIORITY constants
- Add default network priority to NetworkRequestInfo.
- The default network priority value is used when issue uid
  ranges rules to netd. Netd will use the priority value and uid
  ranges to generate corresponding ip rules specific to the given
  network preference.

Bug: 171872461
Test: atest FrameworksNetTests
Merged-In: I0ea71b348492aeb4784d487bed4cfd5d387426ba

Change-Id: I0ea71b348492aeb4784d487bed4cfd5d387426ba
2021-06-14 15:55:55 +00:00
paulhu
01f52e7cce Add more unit tests for mobile data preferred uids feature
- Add more tests for mobile data preferred uids.
- Also address leftover comments on implementation commit.

Bug: 171872461
Test: atest FrameworksNetTests
Merged-In: I63f65bffc1b8883ddfd774222e26e629d7ea1f94

Change-Id: I63f65bffc1b8883ddfd774222e26e629d7ea1f94
2021-06-14 15:53:05 +00:00
Remi NGUYEN VAN
b397b5645a Fix KeepalivePacketDataUtilTest crash on eng build
The test causes a Log.wtf to be logged, because it tests a method that
should not be used after R. Mock the terrible failure handler to avoid
crashes on eng builds.

Test: atest KeepalivePacketDataUtilTest

Change-Id: Ic06a0db7fefb4acf38b66feba9b47e21f9927b1c
2021-06-14 18:13:39 +09:00
Lorenzo Colitti
d9c5536026 Merge "Correctly get uids for per-app network preferences" am: 473ddeaebb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1723617

Change-Id: Ibe5eac43f2c21c9ad5ea956a645d4ce59dcd7759
2021-06-14 06:19:02 +00:00
Lorenzo Colitti
473ddeaebb Merge "Correctly get uids for per-app network preferences" 2021-06-14 06:07:56 +00:00
Sudheer Shanka
f3d8c6f70e Avoid waiting unnecessarily if there is no data to return.
Bug: 189790442
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I091991aac8eb11319bd60dc8f07124ace1ad52f1
2021-06-14 03:13:41 +00:00
Luke Huang
31f8527bca Merge "Modify NsdServiceTest to conform to its new mechanism" am: c9a2bdf2b9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1719018

Change-Id: I7f81b5f807114c223f53fe8417d904c4dbe5cb39
2021-06-13 16:09:50 +00:00
Luke Huang
c9a2bdf2b9 Merge "Modify NsdServiceTest to conform to its new mechanism" 2021-06-13 15:20:52 +00:00
Frank Li
2cb6dca3f6 Merge "Add test for ConnectivityService API isPrivateDnsBroken" am: 67fe28455d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1719395

Change-Id: I2ce2517dd8657316d9d8e57e85cf1d8026845be6
2021-06-12 13:14:36 +00:00
Frank Li
67fe28455d Merge "Add test for ConnectivityService API isPrivateDnsBroken" 2021-06-12 13:02:24 +00:00
Yan Yan
a42e8215d8 Cleanup commit to remove @SkipPresubmit and fix nits
This commit removes @SkipPresubmit annotations in IpSecManagerTest to
re-enable Tcp6 tests in presubmit, since b/186608065 is fixed.

This commit also addresses nits in previous code reviews that include:
- Make EspAuthNull, EspAeadCipher, EspCryptCipher, EspCipherNull
  final classes
- Rename "INSTANCE" to "sInstance", "IPSEC_MANAGER" to "sIpSecManager"
- Rename protected field "iv" to "mIv"
- Use ArraySet instead of HashSet
- Remove unnecessary "public" and "final" in IpSecAlgorithmImplTest

Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: Idde90ce5e4fc6f56ad617d5ba9735b1bcc2ce8cd
2021-06-11 11:58:09 -07:00
Yan Yan
1f423e06e2 Verify kernel implementation of AES-CMAC
This CL adds a test to verify kernel implementation of AES-CMAC

Since there is no hardware that first launched with SDK beyond R
at the time of writing this CL, the test for AES-CMAC was manually
enabled and verified on redfin (redfin kernel already supports
AES-CMAC)

Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: I8b7ee9272722aebdd84ca02475a6107ef61287a9
2021-06-11 11:53:07 -07:00
Yan Yan
df24620850 Verify kernel implementation of AES-XCBC
This CL adds a test to verify kernel implementation of AES-XCBC.

Since there is no hardware that first launched with SDK beyond R
at the time of writing this CL, the test for AES-XCBC was manually
enabled and verified on coral (coral-kernel already supports
AES-XCBC)

Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: I57e2bbed2954e4c7de906caae20390f7aebac0e3
2021-06-11 11:35:12 -07:00
Yan Yan
0c60279648 Verify kernel implementation of AES-CTR
This CL adds a test to verify kernel implementation of AES-CTR

Since there is no hardware that first launched with SDK beyond R
at the time of writing this CL, new tests for AES-CTR were manually
enabled and verified on coral (coral-kernel already supports
AES-CTR)

Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: Ib626a6c3999b7d682d0858e92d0dbb5138fdc45d
2021-06-11 11:34:52 -07:00
Yan Yan
80be81b302 Verify kernel implementation of ChaCha20Poly1305
This CL adds the test infra for testing kernel implementation of IPsec
algorithms and a test for ChaCha20Poly1305

Since there is no hardware that first launched with SDK beyond R at the
time of writing this CL, the test for ChaChaPoly was manually
enabled and verified on the pixel with an updated kernel

Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: Ia29540c7fd6848a89bfa2d25c6a87921e45d98da
2021-06-11 11:34:29 -07:00
Yan Yan
00db30f3a0 Support algorithm configurability in PacketUtils EspHeader
This CL adds support to configure the IPsec algortihms to build
EspHeader.

This is a prepration CL to test kernel implementation of IPsec
algorithms.

Bug: 171083832
Test: atest CtsNetTestCases
Change-Id: I53f59815d6cb879dae622fcbd17616564a97111a
2021-06-11 11:29:13 -07:00
Yan Yan
29487b12d5 Set up and tear down test network in TestNetworkRunnable
Allow test caller to construct a TestNetworkRunnable to run a
test with a test network.

This is a preparation for adding tests to verify kernel
implementation of IPsec algorithms.

Bug: 171083832
Test: atest Ikev2VpnTest
Change-Id: I0e08a6ea299e6ad94d69806a2d76fa155653b62a
2021-06-11 11:27:44 -07:00
Remi NGUYEN VAN
6f6035a29e Merge "Revert "Use mockito-extended in FrameworksNetTests"" am: a6c06af0fa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1734372

Change-Id: I0b5b976cf9de9beb0db7eca9205196a5afd3eab6
2021-06-11 01:38:23 +00:00
Remi NGUYEN VAN
a6c06af0fa Merge "Revert "Use mockito-extended in FrameworksNetTests"" 2021-06-11 01:26:44 +00:00
Remi NGUYEN VAN
3cc611d69a Merge changes I8d15b626,I993e8da9 am: d15e52eca9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733772

Change-Id: I5bfe6d82ce37628a8b7dfec59f9a8216a3c5dcdf
2021-06-10 23:50:06 +00:00