Commit Graph

8618 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
6642ec61c3 Merge "Allow TRANSPORT_TEST ethernet networks" 2020-05-29 06:26:14 +00:00
Benedict Wong
de684cfa06 Merge "Add RequiresFeature annotations for IKEv2 VPN profiles" 2020-05-29 01:55:08 +00:00
Remi NGUYEN VAN
656c566cf1 Allow TRANSPORT_TEST ethernet networks
Ethernet networks using tap interfaces should have TRANSPORT_TEST so
they are not considered by network selection.

Test: atest CaptivePortalApiTest FrameworksNetTests
Bug: 156319532
Change-Id: I0d9477977c88aa055625ab4046577a41e76b05ff
2020-05-29 10:22:50 +09:00
Treehugger Robot
843c1661c7 Merge changes I289d935f,I0121a4ac am: 84af34369d
Change-Id: I7c413c9e1f2efc3aba55453c6b98bf682f3d4116
2020-05-28 10:55:48 +00:00
Treehugger Robot
84af34369d Merge changes I289d935f,I0121a4ac
* changes:
  NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
  NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
2020-05-28 10:34:01 +00:00
Maciej Żenczykowski
62cf792d3f Merge changes Ie73ba058,I4393afcb,Ifebd946e,Ib12ee882,Ia171b779 am: 9fb791c62d
Change-Id: I7b9ae6590c67f89b023417e511fa823b79ad53b1
2020-05-28 09:18:16 +00:00
Maciej Żenczykowski
9fb791c62d Merge changes Ie73ba058,I4393afcb,Ifebd946e,Ib12ee882,Ia171b779
* changes:
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting100MBDownload
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccountingSimple
  fix android.net.NetworkStatsTest#testApply464xlatAdjustments
  NetworkStats - no need for xt_qtaguid clat bw fixups
2020-05-28 09:04:42 +00:00
Maciej Żenczykowski
bcd2b09b35 NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
This should no longer be needed after all the cleanups.

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
2020-05-28 01:47:30 -07:00
Maciej Żenczykowski
4bfcfc5f02 NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0121a4ac7ee824adc5930bab786d550b2f00b05b
2020-05-28 01:33:25 -07:00
Maciej Żenczykowski
b053a337e3 fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting100MBDownload
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

(so just copy over the rx stats from the before file)

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie73ba0586dafde67bc2726db26e07f7268c18be3
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
2cc6ec11d7 fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

Test: atest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4393afcbe8e1bb886ecf4f5c1573f6ac8a0e29f5
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
51531ee376 fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccountingSimple
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

Test: atest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifebd946e06b5fa2eeb7ff4fc0b1c423097021692
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
f24ada13aa fix android.net.NetworkStatsTest#testApply464xlatAdjustments
Test: atest NetworkStatsTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib12ee88295eb502f6da13d212b4fd6298dea380f
2020-05-28 00:26:18 -07:00
Chalard Jean
3d2d28eac5 Merge "Adjust tests for renaming groupHint to cluster." am: f1b1600637
Change-Id: I65d0298b17b60c9b4266766bf74928bf967c8b60
2020-05-28 04:29:24 +00:00
Chalard Jean
f1b1600637 Merge "Adjust tests for renaming groupHint to cluster." 2020-05-28 04:20:26 +00:00
Cody Kesting
f67675fb76 Merge "Comment reason for simulateDataStall structure." am: f79e9c87aa
Change-Id: I4ef90859ba5a9b4a829016f7b20711d8734492e4
2020-05-27 17:24:20 +00:00
Cody Kesting
f79e9c87aa Merge "Comment reason for simulateDataStall structure." 2020-05-27 17:11:57 +00:00
Benedict Wong
d196714698 Add RequiresFeature annotations for IKEv2 VPN profiles
This change adds the @RequiresFeature annotation to Ikev2VpnProfile
Builder methods, and checks before provisioning VPN profiles.

Bug: 156681625
Test: New tests added, passing.
Change-Id: I125d8fbe5d67fb877ad7d0636c007cb3e1a9f59b
2020-05-27 02:05:49 -07:00
Lorenzo Colitti
df775be39f Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." am: c0ba5bf41d
Change-Id: Ia18f83bd6a22f255bf17792ebc14e485810a39cd
2020-05-26 09:49:13 +00:00
Lorenzo Colitti
c0ba5bf41d Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." 2020-05-26 09:26:46 +00:00
Lorenzo Colitti
fcf8e6a45a Merge "Test that if an RA sets the same prefix as DNS, nothing happens." am: eafdd034f8
Change-Id: I61f7ad698fb5b086f5e284309a21f56314d8163f
2020-05-24 11:17:02 +00:00
Lorenzo Colitti
eafdd034f8 Merge "Test that if an RA sets the same prefix as DNS, nothing happens." 2020-05-24 10:59:40 +00:00
Cody Kesting
8c5375cec3 Merge "Forward unknown Data Stall types to Connectivity Diagnostics." am: b10df0da89
Change-Id: Ifc49eb81c219d1ba036c11887e2bc686a68dd67d
2020-05-21 23:19:30 +00:00
Cody Kesting
b10df0da89 Merge "Forward unknown Data Stall types to Connectivity Diagnostics." 2020-05-21 22:58:29 +00:00
Cody Kesting
652e3ec4f1 Comment reason for simulateDataStall structure.
This change adds a comment to CS#simulateDataStall to explain why the
Data Stall is wrapped in a DataStallReportParcelable before being passed
to the ConnectivityDiagnostics handler. This approach is taken to ensure
that simulated data stalls are handled the exact same as Data Stalls
received directly from NetworkMonitor (including Data Stalls detected by
methods that the platform does not understand).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I751054418bf328c72b977a1cc99c27cb9b8ab7ba
2020-05-21 12:08:21 -07:00
Lorenzo Colitti
b432bc75e5 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
2020-05-21 23:32:57 +09:00
Lorenzo Colitti
16b28e2b22 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
2020-05-21 17:26:00 +09:00
Treehugger Robot
2911ce534e Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." am: 8d55b55f60
Change-Id: If35be28eac763d01b99078f171da8ff56d90d93f
2020-05-21 08:11:05 +00:00
Treehugger Robot
8d55b55f60 Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." 2020-05-21 07:47:45 +00:00
Lorenzo Colitti
84f1909fb1 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
2020-05-20 20:53:16 +09:00
Remi NGUYEN VAN
d7b408a8d8 Merge "Add integration test for capport API" am: f2853503c3
Change-Id: I9e4ebb0e6746806a466544261def371eff4c8e21
2020-05-20 09:41:45 +00:00
Remi NGUYEN VAN
2ce373abf2 Add integration test for capport API
Add a test to verify the ConnectivityService / NetworkMonitor
integration around the captive portal API.

Test: atest ConnectivityServiceIntegrationTest
Bug: 156062304
Change-Id: I4eed02e09fc4943c011d871c58ba97ec572c7763
2020-05-20 15:11:14 +09:00
Chalard Jean
3cd880b4bb 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
2020-05-20 14:37:17 +09:00
Cody Kesting
b37958eec9 Forward unknown Data Stall types to Connectivity Diagnostics.
This CL forwards suspected Data Stall events detected with unknown
detection methods to ConnectivityDiagnostics.

Currently, ConnectivityService drops any data stall events with unknown
detection methods, which leads to false negatives for Connectivity
Diagnostics registrants. This change ensures that registrants will still
be notified as NetworkStack is updated to use new detection methods.

The documentation for ConnectivityDiagnosticsManager#DataStallReport is
also updated to reflect that the detection methods included in the
report are a bit mask of detection methods used. Implicitly, this means
that data stalls detected via unknown methods will have an empty bit
mask (0x00).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I62d0bf91fcc17c7921afd519c72551399906bd6b
2020-05-19 10:57:29 -07:00
Treehugger Robot
379edab69e Merge "Add an exported flag in integration tests manifest" am: 8598423cc4
Change-Id: Iadfaca436895055de90e8018f881b07a6bab4bea
2020-05-19 09:58:50 +00:00
Treehugger Robot
8598423cc4 Merge "Add an exported flag in integration tests manifest" 2020-05-19 09:32:39 +00:00
Remi NGUYEN VAN
d68de90e40 Add an exported flag in integration tests manifest
(partial cherry-pick of internal change:
I4457ff2bd466a4c56fed2570e110f251031c2385)

With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Test: TH
Merged-In: I4457ff2bd466a4c56fed2570e110f251031c2385
Change-Id: I65a1ca1678048bbf09edc9a0485b673644c8109d
2020-05-19 17:53:32 +09:00
Cody Kesting
5d19c0ae7f Merge "Move Data Stall logic to CS from NetworkMonitorCallbacks." am: feac618a1a
Change-Id: I0884098a86de1e96b93dd1c753d7863641f34f0b
2020-05-18 17:38:34 +00:00
Cody Kesting
feac618a1a Merge "Move Data Stall logic to CS from NetworkMonitorCallbacks." 2020-05-18 17:21:21 +00:00
Treehugger Robot
2dc15b02b2 Merge "Address nit from aosp/1301317" am: 1894a79964
Change-Id: I2443c5da4b69bce693a39e894c41db5b25b6cf03
2020-05-15 07:03:31 +00:00
Treehugger Robot
1894a79964 Merge "Address nit from aosp/1301317" 2020-05-15 06:43:42 +00:00
Benedict Wong
099b0b8700 Merge "Add methods for IKEv2/IPsec test mode profiles" am: 56b98b0206
Change-Id: I9ff22188a641fce6b7bd44f7619d1b825988667a
2020-05-15 02:35:39 +00:00
Benedict Wong
56b98b0206 Merge "Add methods for IKEv2/IPsec test mode profiles" 2020-05-15 02:18:02 +00:00
Benedict Wong
0d7bed76cb 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
2020-05-12 22:55:55 -07:00
Cody Kesting
f5cc4eae9e Move Data Stall logic to CS from NetworkMonitorCallbacks.
This change moves the logic for handling Data Stall notifications from
NetworkMonitorCallbacks to ConnectivityService. This avoids duplicate
logic for managing data stall simulation requests from
ConnectivityManager. This also puts all of the logic for proxying Data
Stall notifications to the ConnectivityDiagnosticsHandler into one
place.

Bug: 148032944
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Ie2f6a1a2376c5c452750ab417cb5e8c24fc44fc3
2020-05-12 16:24:46 -07:00
Cody Kesting
b36fa34041 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: e743a30aa7
Change-Id: Ie14ab9cbcf8f7b291fb88f4b4abedab1b5978c3e
2020-05-12 17:10:10 +00:00
Cody Kesting
f9877d902e Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1
Change-Id: I3b1c29b30912c4dddc3524a9a28fb3ad8c3ac318
2020-05-12 17:09:14 +00:00
Cody Kesting
e743a30aa7 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." 2020-05-12 16:52:35 +00:00
Cody Kesting
2ba1b8ecd1 Merge "Set owner and administrator UIDs for test networks." 2020-05-12 16:52:07 +00:00
Remi NGUYEN VAN
167f06836c Merge "Send full LinkProperties to NetworkMonitor" am: bdbe7b72fe
Change-Id: Ib33f33a1998b61b980315e7278162e57f8f56cf2
2020-05-12 08:37:41 +00:00