Commit graph android_packages_modules_Co.../tests/net/java
Message SHA1
Merge "Adjust tests for renaming groupHint to cluster." am: f1b1600637 am: 3d2d28eac5
Change-Id: Ifd2d659c4c386fb8895230ffc85b2a9086ee1a84

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-05-28 04:41:05 +00:00
53f0c18b8a
Merge "Adjust tests for renaming groupHint to cluster."
Chalard Jean   authored and   Gerrit Code Review   commited 2020-05-28 04:20:26 +00:00
f1b1600637
Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." am: c0ba5bf41d am: df775be39f
Change-Id: I06278ddff31d8c0dbb4ce6cfded01a38369d8a3c

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-05-26 10:13:17 +00:00
79fde3a970
Merge "Inform the DNS resolver when it needs to do DNS64 synthesis."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-05-26 09:26:46 +00:00
c0ba5bf41d
Merge "Test that if an RA sets the same prefix as DNS, nothing happens." am: eafdd034f8 am: fcf8e6a45a
Change-Id: Ib2eb07e3794630cc636759ce6a6529b7b56a3cfe

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-05-24 11:30:55 +00:00
cc2ab62176
Merge "Test that if an RA sets the same prefix as DNS, nothing happens."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-05-24 10:59:40 +00:00
eafdd034f8
Inform the DNS resolver when it needs to do DNS64 synthesis.
This is only necessary when learning the NAT64 prefix from the
RA, because if the NAT64 prefix is learned from DNS, the DNS
resolver already knows the prefix and automatically enables
DNS64 synthesis.

The DNS resolver needs to be informed of the prefix any time
clat is running on a prefix learned from an RA. This is simple to
implement: just set the prefix when starting clat if prefix
discovery is not running, and clear the prefix when stopping clat
if prefix discovery was not running. This ensures that the prefix
is cleared iff it was set.

Bug: 156914456
Test: new unit test coverage
Change-Id: If8ad2d30712a6df3e207c8d3e8a129705242191e

Lorenzo Colitti   commited 2020-05-21 23:32:57 +09:00
b432bc75e5
Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." am: 8d55b55f60 am: 2911ce534e
Change-Id: I77fdf03484bd0da36ebffd025a33ab4859a0a5a2

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-21 08:31:13 +00:00
da847627ad
Test that if an RA sets the same prefix as DNS, nothing happens.
This is not particularly likely to happen unless the pref64 RA is
sent by a different router than the main RA. But more tests are
always good, and this additional coverage will be more useful
in an upcoming change.

Bug: 150648313
Test: test-only change
Change-Id: I3316d49d42100800740afadc4edf0a13a4d8377c

Lorenzo Colitti   commited 2020-05-21 17:26:00 +09:00
16b28e2b22
Merge "Suppress deprecation warnings in LegacyTypeTrackerTest."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-05-21 07:47:45 +00:00
8d55b55f60
Suppress deprecation warnings in LegacyTypeTrackerTest.
This saves dozens of warnings every time FrameworkNetTests is
compiled. There is nothing we can do about those warnings because
LegacyTypeTracker's reason for existence is to power deprecated
APIs.

Test: m FrameworksNetTests
Change-Id: I4d65b0aade493e12b56a94247efbf9d1ad7bb4b9

Lorenzo Colitti   commited 2020-05-20 20:53:16 +09:00
84f1909fb1
Adjust tests for renaming groupHint to cluster.
Bug: 146460486
Test: atest android.net.IpMemoryStoreTest
Test: atest com.android.server.connectivity.ipmemorystore.IpMemoryStoreServiceTest
Change-Id: I69f7a2971cc5985d0f0078aecc39d4d6a6130033

Chalard Jean   commited 2020-05-20 14:37:17 +09:00
3cd880b4bb
Merge "Address nit from aosp/1301317" am: 1894a79964 am: 2dc15b02b2
Change-Id: I7ae9b80954309b18eb6923da3aeaab3d1b8e3231

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-15 07:14:29 +00:00
4e94c06d29
Merge "Address nit from aosp/1301317"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-05-15 06:43:42 +00:00
1894a79964
Merge "Add methods for IKEv2/IPsec test mode profiles" am: 56b98b0206 am: 099b0b8700
Change-Id: I353d999ebcdd108a900abfe20be232e83147b6d2

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-05-15 02:51:43 +00:00
317aa920aa
Merge "Add methods for IKEv2/IPsec test mode profiles"
Benedict Wong   authored and   Gerrit Code Review   commited 2020-05-15 02:18:02 +00:00
56b98b0206
Add methods for IKEv2/IPsec test mode profiles
This change adds the ability for IKEv2/IPsec VPN profiles to run on Test
Networks. If enabled, the IKEv2/IPsec VPN profiles will request ONLY
test networks.

Bug: 148582947
Test: FrameworksNetTests passing
Test: Added for testing
Change-Id: I2511b39b27a1e29ae97907cdb12728d13fb1628f

Benedict Wong   commited 2020-05-12 22:55:55 -07:00
0d7bed76cb
Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1 am: f9877d902e
Change-Id: I7af702ff5eafbd0f5bb2247e0debf975e51accd1

Cody Kesting   authored and   Automerger Merge Worker   commited 2020-05-12 17:26:44 +00:00
801b5b9ea3
Merge "Set owner and administrator UIDs for test networks."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-05-12 16:52:07 +00:00
2ba1b8ecd1
Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: e428a22b07
Change-Id: I368308ded731b221be7fae6ddf1723c587ae4d20

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-05-11 04:59:35 +00:00
9b010a98db
Address nit from aosp/1301317
Test: atest ConnectivityServiceTest#testVpnSetUnderlyingNetworks
Bug: 150570873
Change-Id: If5e5439b22f05e08a293fd83da4d54f6a4363ca5

Chalard Jean   commited 2020-05-11 13:25:16 +09:00
4f8109f638
Fix a bug where VPNs start out suspended on cellular
As NetworkAgent is in a transition where all agents need
to include the NOT_SUSPENDED capability as part of their
migration to the system API, ConnectivityService adds it
forcefully to all agents that don't have the CELLULAR
transport. This doesn't include VPNs when VPNs have some
cellular network as their underlying network.

The best way to solve this is to make sure the VPN
capabilities reflect those of the underlying networks as
far as the NOT_SUSPENDED capability is concerned. This
is how they work for other similar capabilities.

This also happens to contain a drive-by fix for an issue
with a spurious capabilities callback is triggered when
a VPN connects and it has any underlying network (which
means almost always, because it will take the default
network if it doesn't declare any). Fixing this was
necessary to have a cogent test of this issue, but it
could be moved to another patch or it could stay unfixed
with some minor ajustment to the tests if judged too
dangerous to include in R at this point.

Test: New tests in this patch. Also manually tested with
      tcpdump as described in b/150570873.
Bug: 150570873
Change-Id: I3e4ff990c0d4825b21c7679be29a482a2d1324ec

Chalard Jean   commited 2020-05-11 10:44:50 +09:00
fbd6a2c012
Merge "Fix a bug where a spurious capabilities callback is sent." am: 0d4995dcb7 am: 4726fe863c
Change-Id: Ied089ed5ca553b206bdb3f7195f9e623aaabfa00

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-05-08 01:33:13 +00:00
5cc55c46d0
Merge "Fix a bug where a spurious capabilities callback is sent."
Chalard Jean   authored and   Gerrit Code Review   commited 2020-05-08 00:49:33 +00:00
0d4995dcb7
Fix a bug where a spurious capabilities callback is sent.
When a VPN connects and it has any underlying network (which
means almost always, because it will take the default network
if it doesn't declare any), it has default capabilities and
will only take the capabilities of its underlying network
as part of an update happening after making the network
available but before the rematch can take place. This in turn
causes the capabilities callback sent as part of the rematch
to be spuriously sent.

Test: FrameworksNetTests. Also tested together with a
      followup that adds tests with drive-by coverage for this.
Bug: 150570873
Change-Id: Id7d8bba486bada1a7ba5b0f152d2aa02e407f249

Chalard Jean   commited 2020-05-07 12:07:03 +09:00
d568791283
[SM10] Adopt helper class to monitor RAT type change per sub
Test: atest NetworkStatsServiceTest
Bug: 146415925
Change-Id: I45c3aa9046b316c8cd0943543d620a22e4afefd1
Merged-In: I45c3aa9046b316c8cd0943543d620a22e4afefd1
(cherry picked from commit 219faff07bdc58c14fe58fc525e86383db1f8167)

junyulai   commited 2020-05-05 18:37:29 +08:00
d33735c952
Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: c19bf4fb3f
Change-Id: I84be6ef46eb2e99749a86f24304555bff51ebfe6

Rambo Wang   authored and   Automerger Merge Worker   commited 2020-04-30 22:40:29 +00:00
a0cc785ec6
Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev
Rambo Wang   authored and   Android (Google) Code Review   commited 2020-04-30 22:23:13 +00:00
c19bf4fb3f
Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" into rvc-dev
Benedict Wong   authored and   Android (Google) Code Review   commited 2020-04-30 17:29:29 +00:00
89ff63b804
Add filtering for IPsec algorithms in IKEv2 VPNs
This commit adds support for validating and filtering IPsec algorithms.
Without a public API exposing IKEv2 algorithms (and their respective
public APIs), the allowedAlgorithms can only filter the proposals for
IPsec (Child) SA algorithms.

Additionally, this removes the HMAC_SHA1 from the IKE SA's integrity
algorithm proposals due to insecurity

Bug: 153701879
Test: FrameworksNetTests passing, new tests added
Change-Id: I7e61a1612692db275b751330af5bacbf86836a8c
Merged-In: I7e61a1612692db275b751330af5bacbf86836a8c
(cherry picked from commit 94e1c08a9ad4b0ff17e0f3a77fff0d3364040ba5)

Benedict Wong   commited 2020-04-29 23:05:35 -07:00
0fff1ed7b9
Merge "Address comments on NetworkStack AIDL v6" into rvc-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-04-30 06:02:32 +00:00
cc9f73cad3
Filter debug entries for each vpn
NetworkStats calculation needs to filter out debug entries to
prevent over counting. While NetworkStatsFactory migrates data
usage over a VPN to the TUN network, NetworkStatsFactory does
not filter out debug entries per vpn which will cause debug
entries left and cause exception.

Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
      and verify no exception
Change-Id: I3525edc385b07858b48c7add2d331c4b5a2e84ad
Merged-In: I3525edc385b07858b48c7add2d331c4b5a2e84ad

Chiachang Wang   commited 2020-04-30 02:39:15 +00:00
bd16241678
Add test prefix into test cases
Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
Change-Id: I6e18915e383ac20072cb238d0136d7a8e4ceb811
Merged-In: I6e18915e383ac20072cb238d0136d7a8e4ceb811

Chiachang Wang   commited 2020-04-30 02:38:18 +00:00
3cb1e03082
Merge changes I3525edc3,I6e18915e am: 7752ddf0b7 am: 098a24b8d4
Change-Id: I85b8798fc82873d22c338937bb61092fbde259e6

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-04-29 09:24:10 +00:00
6c3df199cd
Merge changes I3525edc3,I6e18915e
* changes:
  Filter debug entries for each vpn
  Add test prefix into test cases

Chiachang Wang   authored and   Gerrit Code Review   commited 2020-04-29 08:43:02 +00:00
7752ddf0b7
Filter debug entries for each vpn
NetworkStats calculation needs to filter out debug entries to
prevent over counting. While NetworkStatsFactory migrates data
usage over a VPN to the TUN network, NetworkStatsFactory does
not filter out debug entries per vpn which will cause debug
entries left and cause exception.

Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
      and verify no exception
Change-Id: I3525edc385b07858b48c7add2d331c4b5a2e84ad

Chiachang Wang   commited 2020-04-29 15:07:45 +08:00
1d5c290e38
Add test prefix into test cases
Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
Change-Id: I6e18915e383ac20072cb238d0136d7a8e4ceb811

Chiachang Wang   commited 2020-04-29 13:44:50 +08:00
88fa813bd7
Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" am: eb8393aa09 am: a7c8c64284
Change-Id: I7ef93d318b795754eea3511caf7c3ae9187a88b2

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-04-28 18:17:10 +00:00
60b787f922
Merge "Add filtering for IPsec algorithms in IKEv2 VPNs"
Benedict Wong   authored and   Gerrit Code Review   commited 2020-04-28 17:33:46 +00:00
eb8393aa09
Address comments on NetworkStack AIDL v6
Address issues found during AIDL review:
 - Rename clientAddr to singleClientAddr
 - Do not use a ParcelableBundle for notifyNetworkTested or
   notifyDataStallSuspected; instead use AIDL parcelables for stronger
   backwards compatibility guarantees.

Test: atest NetworkMonitorTest ConnectivityServiceTest
      ConnectivityServiceIntegrationTest, manual
Bug: 153500847
Merged-In: Id9b71784e5f6294d203230e57737979e063ff0f8
Change-Id: Id9b71784e5f6294d203230e57737979e063ff0f8

Remi NGUYEN VAN   commited 2020-04-28 08:09:17 +00:00
f577197908
Set owner and administrator UIDs for test networks.
This change sets the owner and administrator UIDs for test networks when
their initial values match the UID for the app creating the test
network. This ensures that apps registering test networks can only make
themselves owners / administrators of the network.

Bug: 153449964
Test: atest NetworkAgentTest
Change-Id: I3a974700aa1d83cb285295ed1de0aa263e2e5b58

Cody Kesting   commited 2020-04-27 20:54:57 -07:00
fc7cad313d
Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied
TelephonyNetworkSpecifier will now treat null as matching nothing. When
the request specifies a TelephonyNetworkSpecifier while the network does
not, this should not be treated as a match.

Bug: 154703135
Test: atest android.net.TelephonyNetworkSpecifierTest
Change-Id: I329110e929995c9eae6c6ce33b5414777acea1e1

Rambo Wang   commited 2020-04-27 14:25:39 -07:00
3745c39f98
Merge "Add tests for Tunnel, Transport mode application with released SPIs" am: 27a2f1dff8 am: aed6b6ff17
Change-Id: I91a4f355cd2a397a9f24c0d5f5381a51523a1fe0

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-04-24 23:27:48 +00:00
9c42a8e601
Merge "Use TransformRecord to get SPI instead of SpiRecord" am: 88c8a19311 am: fc7ba96b15
Change-Id: Ibc3090627699aecb4ab5e183219b5848005d0412

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-04-24 23:27:36 +00:00
25dec3b6e5
Merge "Add tests for Tunnel, Transport mode application with released SPIs"
Benedict Wong   authored and   Gerrit Code Review   commited 2020-04-24 22:32:41 +00:00
27a2f1dff8
Merge "Use TransformRecord to get SPI instead of SpiRecord"
Benedict Wong   authored and   Gerrit Code Review   commited 2020-04-24 22:32:41 +00:00
88c8a19311
Merge "Address comments on NetworkStack AIDL v6" am: 0e93810453 am: e468a26c7a
Change-Id: Id385210ccd8d08bc2d15e964bbca25c452a3cde8

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2020-04-24 12:19:37 +00:00
6819fe0fc9
Merge "Address comments on NetworkStack AIDL v6"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-04-24 11:56:32 +00:00
0e93810453
Address comments on NetworkStack AIDL v6
Address issues found during AIDL review:
 - Rename clientAddr to singleClientAddr
 - Do not use a ParcelableBundle for notifyNetworkTested or
   notifyDataStallSuspected; instead use AIDL parcelables for stronger
   backwards compatibility guarantees.

Test: atest NetworkMonitorTest ConnectivityServiceTest
      ConnectivityServiceIntegrationTest, manual
Bug: 153500847
Change-Id: Id9b71784e5f6294d203230e57737979e063ff0f8

Remi NGUYEN VAN   commited 2020-04-24 18:52:02 +09:00
9b647ca69a
Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b am: 7b3866f284
Change-Id: I099944752fc3006c1e98750dd46dbebf5e50789f

Philip P. Moltmann   authored and   Automerger Merge Worker   commited 2020-04-22 15:19:14 +00:00
84091e184a