Commit Graph

1885 Commits

Author SHA1 Message Date
Lorenzo Colitti
662ab7bf25 Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." am: eed51faa49 am: f5a5cd3bd7 am: d0cf1afac5 am: cff8146b4d am: 29d3636dd4
Change-Id: I6bb6f038af9988502f15894349039fec51dc8a86
2020-05-26 10:59:30 +00:00
Lorenzo Colitti
d0cf1afac5 Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." am: eed51faa49 am: f5a5cd3bd7
Change-Id: I06278ddff31d8c0dbb4ce6cfded01a38369d8a3c
2020-05-26 10:13:17 +00:00
Lorenzo Colitti
eed51faa49 Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." 2020-05-26 09:26:46 +00:00
Lorenzo Colitti
25045a554a Merge "Test that if an RA sets the same prefix as DNS, nothing happens." am: 82db920da4 am: 6d866bcd5f am: 352e8c2aa5 am: 7a35f41cf7 am: ccc05a0bc8
Change-Id: I58fbdf5bf51a1048acf61bd25107e2f2caa86617
2020-05-24 12:14:57 +00:00
Lorenzo Colitti
352e8c2aa5 Merge "Test that if an RA sets the same prefix as DNS, nothing happens." am: 82db920da4 am: 6d866bcd5f
Change-Id: Ib2eb07e3794630cc636759ce6a6529b7b56a3cfe
2020-05-24 11:30:55 +00:00
Lorenzo Colitti
82db920da4 Merge "Test that if an RA sets the same prefix as DNS, nothing happens." 2020-05-24 10:59:40 +00:00
Lorenzo Colitti
f28b6b705c 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
Treehugger Robot
582c1a8e05 Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." am: 585dc0665e am: 212e497cbc am: 4ca97a469c am: c1a0fffef6 am: 978aa17285
Change-Id: Ia7a29777227d1780e620c6c6b0ad84925512be12
2020-05-21 09:17:22 +00:00
Treehugger Robot
4ca97a469c Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." am: 585dc0665e am: 212e497cbc
Change-Id: I77fdf03484bd0da36ebffd025a33ab4859a0a5a2
2020-05-21 08:31:13 +00:00
Lorenzo Colitti
2a0ef00bb9 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
585dc0665e Merge "Suppress deprecation warnings in LegacyTypeTrackerTest." 2020-05-21 07:47:45 +00:00
Lorenzo Colitti
2f0583946a 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
288b065c0f Merge "Add integration test for capport API" am: f2853503c3 am: 987e504c1e am: bd08afe9e1 am: 10eb9435df am: 7e94dd9c5e
Change-Id: I062b86c3c03dc2f280cec0e7bb95618213e38f6f
2020-05-20 10:40:33 +00:00
Remi NGUYEN VAN
bd08afe9e1 Merge "Add integration test for capport API" am: f2853503c3 am: 987e504c1e
Change-Id: Ib0051ca4bf36f88cac7ab15741c0a7e8bc53c005
2020-05-20 09:42:15 +00:00
Remi NGUYEN VAN
c8e627feb5 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
Treehugger Robot
faff36977c Merge "Add an exported flag in integration tests manifest" am: 17df6cbb6d am: 2d35a023b5
Change-Id: I566ae57dc9a64636a72aba836f61d1686f5377c9
2020-05-19 10:20:31 +00:00
Remi NGUYEN VAN
cdd6f0e9ea 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
Treehugger Robot
cda9dbd5aa Merge "Address nit from aosp/1301317" am: 14a5bf9510 am: 7b20fde8c9 am: b0af0ee400 am: 7af6037609 am: 02e86a3687
Change-Id: Id24f6eadf126616a8585ce56aef0de7f1c68c44b
2020-05-15 08:15:35 +00:00
Treehugger Robot
b0af0ee400 Merge "Address nit from aosp/1301317" am: 14a5bf9510 am: 7b20fde8c9
Change-Id: I7ae9b80954309b18eb6923da3aeaab3d1b8e3231
2020-05-15 07:14:29 +00:00
Treehugger Robot
14a5bf9510 Merge "Address nit from aosp/1301317" 2020-05-15 06:43:42 +00:00
Benedict Wong
8b89272659 Merge "Add methods for IKEv2/IPsec test mode profiles" am: 0dfb2b7b68 am: c2bdca3a27 am: b1368b92eb am: d65104d078 am: 623c8c9b7f
Change-Id: Ica5592c8b02effa49a8d672fb30ee703147e025e
2020-05-15 03:50:20 +00:00
Benedict Wong
b1368b92eb Merge "Add methods for IKEv2/IPsec test mode profiles" am: 0dfb2b7b68 am: c2bdca3a27
Change-Id: I353d999ebcdd108a900abfe20be232e83147b6d2
2020-05-15 02:51:43 +00:00
Benedict Wong
0dfb2b7b68 Merge "Add methods for IKEv2/IPsec test mode profiles" 2020-05-15 02:18:02 +00:00
Benedict Wong
cb09f72f47 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
5e6cc3187b Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb am: e4e48c22c5 am: 51edeeeb65 am: 88d1b83af6 am: e0336ca4d6
Change-Id: I4925d5a7f9c4dd063e87b138806a7b562a7390e4
2020-05-12 18:47:10 +00:00
Cody Kesting
51edeeeb65 Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb am: e4e48c22c5
Change-Id: I7af702ff5eafbd0f5bb2247e0debf975e51accd1
2020-05-12 17:26:44 +00:00
Cody Kesting
eb44b7b1bb Merge "Set owner and administrator UIDs for test networks." 2020-05-12 16:52:07 +00:00
Chalard Jean
e854cdbf3d Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: cbb9c78350 am: 986a8a1b76 am: 57ba9149dc am: e857684f7d
Change-Id: I94536a7867592ea4c2823f6dcaad1ac4420a3230
2020-05-11 05:41:59 +00:00
Chalard Jean
986a8a1b76 Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: cbb9c78350
Change-Id: I368308ded731b221be7fae6ddf1723c587ae4d20
2020-05-11 04:59:35 +00:00
Chalard Jean
1f9e9ce3d5 Address nit from aosp/1301317
Test: atest ConnectivityServiceTest#testVpnSetUnderlyingNetworks
Bug: 150570873
Change-Id: If5e5439b22f05e08a293fd83da4d54f6a4363ca5
2020-05-11 13:25:16 +09:00
Chalard Jean
91a1beddcc 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
2020-05-11 10:44:50 +09:00
Chalard Jean
a19816b63c Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9 am: fbf7472187 am: 3cfa50040f am: eb1b770994 am: f788a488fa
Change-Id: I18ba5d615df6c8a43aca01563f97ac451b48493a
2020-05-08 02:35:29 +00:00
Chalard Jean
3cfa50040f Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9 am: fbf7472187
Change-Id: Ied089ed5ca553b206bdb3f7195f9e623aaabfa00
2020-05-08 01:33:13 +00:00
Chalard Jean
a4a379d6c9 Merge "Fix a bug where a spurious capabilities callback is sent." 2020-05-08 00:49:33 +00:00
Chalard Jean
8c5e45895d 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
2020-05-07 12:07:03 +09:00
junyulai
5e3d346655 [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 9f2e38da19)
2020-05-05 18:37:29 +08:00
Remi NGUYEN VAN
b3f320ae17 Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7 am: 23687eceeb am: 2fff694481 am: dab917bd65 am: a14d3e90ac
Change-Id: Icbf3295eca37703f2ca41bd78914c5434fa26bdc
2020-05-01 05:21:56 +00:00
Remi NGUYEN VAN
2fff694481 Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7 am: 23687eceeb
Change-Id: I6bf23b1716706aaa757170ec3a60062ff4fcb1e0
2020-05-01 04:47:17 +00:00
Remi NGUYEN VAN
e294fb81c7 Merge "Use the new NetworkStackConnector constructor" 2020-05-01 04:19:29 +00:00
Automerger Merge Worker
19ecc3b610 Merge "Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 7db902bf07 am: 3492cce255" into rvc-d1-dev-plus-aosp am: cb4807f190 am: 5eb9880d2b
Change-Id: I9956cd267a8d1394293c2f52ebc3af2dd559e9fe
2020-04-30 23:27:12 +00:00
Rambo Wang
ae7f1b1d58 Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 7db902bf07 am: 3492cce255
Change-Id: If62e7535d1417ceb0b2869007b87e37b34325972
2020-04-30 22:49:08 +00:00
Rambo Wang
1ec5abe098 Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 7db902bf07
Change-Id: I84be6ef46eb2e99749a86f24304555bff51ebfe6
2020-04-30 22:40:29 +00:00
Rambo Wang
7db902bf07 Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev 2020-04-30 22:23:13 +00:00
Benedict Wong
b3ce2bb050 Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" into rvc-dev 2020-04-30 17:29:29 +00:00
Rambo Wang
520e142b63 Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: bb82d3d2f0 am: 5e75c447f8 am: 19082fb048 am: ac7a8235a4 am: d72d906ecd
Change-Id: Ib6de8d56a91183fa20ab840cd17ac14dd825cc9a
2020-04-30 16:33:53 +00:00
Rambo Wang
19082fb048 Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: bb82d3d2f0 am: 5e75c447f8
Change-Id: I80164890061f1f3ba6900e6f5e73e3bc6fc04b5c
2020-04-30 15:31:31 +00:00
Rambo Wang
bb82d3d2f0 Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" 2020-04-30 15:07:18 +00:00
Rambo Wang
4d1afeb672 Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier
MatchAllNetworkSpecifier is a subclass of NetworkSpecifer. The method
satisfiedBy should be renamed to canBeSatisfiedBy together with other
subclass of NetworkSpecifer in b/152238712.

Add annotation @Overide for the method to make sure it will not get
ignored when refactor in the future.

Bug: 154956584
Test: atest android.net.MatchAllNetworkSpecifierTest
Change-Id: Ibe32fd50fae43aa635c1c0dad66eaea82011c8b7
2020-04-30 15:06:35 +00:00
Benedict Wong
22d1b7df13 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 a435ff8bf8)
2020-04-29 23:05:35 -07:00
Remi NGUYEN VAN
3551e00976 Merge "Address comments on NetworkStack AIDL v6" into rvc-dev 2020-04-30 06:02:32 +00:00