Commit Graph

9523 Commits

Author SHA1 Message Date
Maciej Zenczykowski
53b7a2a8ab [automerger skipped] Merge "Rename the *Nat64Prefix to *Nat64PrefixFromDns." into rvc-dev am: e7d685f488 am: 36da7897f1 -s ours
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 6c0cbccf96 is in history

Change-Id: Ic85370f7dd42d5c3b38058363538b9563d6acce8
2020-04-07 00:28:15 +00:00
Maciej Zenczykowski
cc3f09073e [automerger skipped] Merge "Rename the *Nat64Prefix to *Nat64PrefixFromDns." into rvc-dev am: e7d685f488 -s ours am: f07a33158f -s ours
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 d523d1416d is in history

Change-Id: I605e7b6f6f1a63b90cf48f2ceba7778aa8571e90
2020-04-07 00:27:54 +00:00
Maciej Zenczykowski
f07a33158f [automerger skipped] Merge "Rename the *Nat64Prefix to *Nat64PrefixFromDns." into rvc-dev am: e7d685f488 -s ours
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 d523d1416d is in history

Change-Id: I4646da7aaeb7844ef2c0dc9e3a15b15607f095ea
2020-04-06 23:59:33 +00:00
Maciej Zenczykowski
36da7897f1 Merge "Rename the *Nat64Prefix to *Nat64PrefixFromDns." into rvc-dev am: e7d685f488
Change-Id: I4bc61d98c2dea4dd3edad2b3657adf3757ca728a
2020-04-06 23:59:23 +00:00
Lorenzo Colitti
6c0cbccf96 Rename the *Nat64Prefix to *Nat64PrefixFromDns.
This just a rename with no functional changes at all. It is
preparation for supporting getting the NAT64 prefix from the
RA.

Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ia9a09a708870827b1e4cf068f930fa9542dd116c
Change-Id: Ia9a09a708870827b1e4cf068f930fa9542dd116c
2020-04-06 15:45:14 +00:00
Chalard Jean
dfe2200177 [automerger skipped] Fix a bug where the legacy extra info is reset on connect. am: 26fc3f31ff am: 47f1e830a6 -s ours
am skip reason: Change-Id I3e437f0fe2eb28f1d621551a8daf164a06af83fc with SHA-1 26fc3f31ff is in history

Change-Id: I565a7396eb1d42edfaea3bb71ddb77f0618c43ad
2020-04-06 13:14:49 +00:00
Chalard Jean
ba62094f3d Fix a bug where the legacy extra info is reset on connect. am: 26fc3f31ff am: 417465419b
Change-Id: I318c30661d2ca6cc745ee6b830c1e2fecffe9131
2020-04-06 13:13:52 +00:00
Chalard Jean
47f1e830a6 Fix a bug where the legacy extra info is reset on connect. am: 26fc3f31ff
Change-Id: I0e21281a7cccbcd095ac6e6e26111ecc9ce5ab35
2020-04-06 12:49:13 +00:00
Chalard Jean
417465419b Fix a bug where the legacy extra info is reset on connect. am: 26fc3f31ff
Change-Id: I40f25bc1af74f45bb442baae0a89f96c00f5e8ac
2020-04-06 12:49:11 +00:00
Lorenzo Colitti
9dd20e012e Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b am: 55462d27a2 am: ee85002f9b
Change-Id: I0f598e2e79c596903d25e5852b982951da03093c
2020-04-06 11:42:51 +00:00
Lorenzo Colitti
ee85002f9b Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b am: 55462d27a2
Change-Id: I8cb3fb435baae54f5e811cae1efb603d585a28e9
2020-04-06 11:24:19 +00:00
Chalard Jean
26fc3f31ff Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests

Change-Id: I3e437f0fe2eb28f1d621551a8daf164a06af83fc
Merged-In: I3e437f0fe2eb28f1d621551a8daf164a06af83fc
(cherry picked from commit a3fdb94a32eda40e322b7dbdaf3fad9b42bfbbb9, originally aosp/1277602)
2020-04-06 11:14:59 +00:00
Lorenzo Colitti
55462d27a2 Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b
Change-Id: I4947abc132dcd0c83b44f2c23362049ee1073214
2020-04-06 11:01:50 +00:00
Lorenzo Colitti
b51a47360b Merge "Refactor the Nat464Xlat function for simplicity." 2020-04-06 10:38:54 +00:00
Lucas Lin
6b9fd85bd1 [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e -s ours am: b8b60d252d -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: I499cb4ab198cd203664d9c04fa394e3e2baa88cc
2020-04-06 10:07:12 +00:00
Lucas Lin
98856ab26a [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e am: 74c73dc3b2 -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: If07a38514039f836988794719ceaf5c1c6acce20
2020-04-06 10:06:21 +00:00
Lucas Lin
74c73dc3b2 Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e
Change-Id: Ice0a1fad4a430175b49a047b824e97b1a8df955e
2020-04-06 09:46:21 +00:00
Lucas Lin
b8b60d252d [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: Ib67921fdf3384f3c79d8b859ed068578575cdaa9
2020-04-06 09:46:19 +00:00
Lucas Lin
5123e0509e Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev 2020-04-06 09:35:27 +00:00
Chalard Jean
ebf3cf3aa3 Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e am: 9f964ebc15 am: a6e848328a
Change-Id: I0406172efbdbbffe5db66efc3b94844bf14d6f04
2020-04-06 06:53:58 +00:00
Chalard Jean
a6e848328a Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e am: 9f964ebc15
Change-Id: I127bf621caa39a24265f30cd4c781248410e5348
2020-04-06 06:34:09 +00:00
Chalard Jean
9f964ebc15 Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e
Change-Id: Ia0a2afe359cac6adfd33d2f839eddb8bd14b5f43
2020-04-06 06:17:46 +00:00
Chalard Jean
7e2d55206e Merge "Fix a bug where the legacy extra info is reset on connect." 2020-04-06 06:04:46 +00:00
Junyu Lai
7678472859 [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 -s ours am: c7222f9fbe -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 b80fe74899 is in history

Change-Id: I91c97fec88b2275764d5804523a39922c6257340
2020-04-06 04:52:38 +00:00
Junyu Lai
aaa6381a8b [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 am: 48d226dd0c -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history

Change-Id: I71a8317ba7e296356aee4d6e60c431d5c7836604
2020-04-06 04:52:11 +00:00
junyulai
ecf8308cc3 [automerger skipped] [SP26.2] add a method in NetworkStats that removes empty entries am: 56f59c493b am: 254fddb571 -s ours
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 1052557f33 is in history

Change-Id: If3793def11b38b66cc7dd788af82f6c0f394cd99
2020-04-06 04:52:05 +00:00
Junyu Lai
48d226dd0c Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1
Change-Id: Ie62147dc37f99d05fae4eecccc00f1b15f429220
2020-04-06 04:28:36 +00:00
junyulai
254fddb571 [SP26.2] add a method in NetworkStats that removes empty entries am: 56f59c493b
Change-Id: Ib92c9cff431d5f6f72598550cc7cc869b340c396
2020-04-06 04:28:34 +00:00
Junyu Lai
c7222f9fbe [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history

Change-Id: I1a97a8cb46302c29425781b9252640c1eec4b50b
2020-04-06 04:27:56 +00:00
Junyu Lai
c6b106fbc1 Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev
* changes:
  [SP26] add CTS for NetworkStats
  [SP26.2] add a method in NetworkStats that removes empty entries
2020-04-06 04:15:39 +00:00
Chalard Jean
56c327341e Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I5f8f6d962ee3317e101d19518c767b3c327c0c47
2020-04-06 12:46:19 +09:00
Remi NGUYEN VAN
7aa97d2b77 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 -s ours am: a678d4fd51 -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 24260d5e6d is in history

Change-Id: I6d2d3f2b568b39f0ae385a3aff63c84452bce28f
2020-04-06 02:42:49 +00:00
Remi NGUYEN VAN
a760a047d3 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 am: c69180459a -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history

Change-Id: I12f74893d28783a0299ddf24228e7695cfab667f
2020-04-06 02:42:37 +00:00
Remi NGUYEN VAN
a678d4fd51 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history

Change-Id: I16bc94e46e253b70ed58f4bbd5d14c1214024f30
2020-04-06 02:24:59 +00:00
Remi NGUYEN VAN
c69180459a Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5
Change-Id: Ic59499e070b009dddedcaeb2e6905fb563779841
2020-04-06 02:24:38 +00:00
Remi NGUYEN VAN
0b4ad3a9d5 Merge "Fix setAdministratorUids tests on Q" into rvc-dev 2020-04-06 02:22:37 +00:00
Junyu Lai
b80fe74899 [SP26] add CTS for NetworkStats
Test: atest NetworkStatsApiTest
Test: atest CtsNetTestCasesLatestSdk:NetworkStatsApiTest on Q device
Bug: 150644692
Change-Id: I690704b43cfd16de70c4c83916f6d750cf613f67
Merged-In: I690704b43cfd16de70c4c83916f6d750cf613f67
(cherry picked from commit 5c670a2714f3ed783b6d5245714d0039c8fd1e9c)
2020-04-06 02:21:17 +00:00
junyulai
56f59c493b [SP26.2] add a method in NetworkStats that removes empty entries
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.

However, change the behavior in the original NetworkStats
is considered risky in current stage.

Thus, this change provide a function that could remove these
empty entries in tests.

Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692

Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
Merged-In: I40a76935d55712b8083ee1e17e137a8a4ef5e029
(cherry picked from commit 6c7bef3064dbe949b7b213036b8e70c125ddd343)
2020-04-06 02:18:50 +00:00
Lorenzo Colitti
0d6e50a29d Refactor the Nat464Xlat function for simplicity.
This makes the code easier to understand by making state
transitions more explicit. It also makes it easier to address a
TODO to turn the class into a StateMachine.

This should be an exact no-op refactoring. The current cases
covered by the code (all mutually exclusive) are:

1. requiresClat && !isPrefixDiscoveryStarted
   Action: startPrefixDiscovery()
   Equivalent to IDLE && requiresClat, because
   isPrefixDiscoveryStarted returns true for every state except
   IDLE.

2. requiresClat && isPrefixDiscoveryStarted && shouldStartClat
   Action: start()
   Equivalent to DISCOVERING && shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but start() does nothing if mState is
   STARTING or RUNNING.

3. requiresClat && isPrefixDiscoveryStarted && !shouldStartClat
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but stop() does nothing if mState is
   not STARTING or RUNNING.

4. !requiresClat && isStarted
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !requiresClat,
   because isStarted() is only true in STARTING and RUNNING.

5. !requiresClat && !isStarted && isPrefixDiscoveryStarted
   Action: leaveStartedState()
   Equivalent to DISCOVERING && !requiresClat, because
   the only state with isPrefixDiscoveryStarted and !isStarted
   is DISCOVERING.

Also, simplify case #5. In this case, calling leaveStartedState
is superfluous, because in the DISCOVERING state:
- There is no need to call unregisterObserver, since the observer
  is only registered when entering STARTING and is unregistered
  when going back to DISCOVERING or IDLE.
- mIface and mBaseIface don't need to be set to null because they
  are only set to non-null when entering STARTING and nulled out
  when going back to DISCOVERING or IDLE.

Bug: 126113090
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
2020-04-04 16:24:58 +09:00
TreeHugger Robot
ba808127e6 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 -s ours am: caa3a41ed6 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 7fb7c3e0bf is in history

Change-Id: I831d43cc9ba89ef8f632c2306b65378895d63499
2020-04-04 04:10:13 +00:00
TreeHugger Robot
b5c22182e8 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 am: 1c221a5295 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history

Change-Id: I28e2ff1095f168d1e3c7321ab52629b0a9391c1d
2020-04-04 04:10:04 +00:00
TreeHugger Robot
1c221a5295 Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1
Change-Id: Ibd13db0076a1dcaefd3b006001d24ad3e763409f
2020-04-04 03:48:35 +00:00
TreeHugger Robot
caa3a41ed6 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history

Change-Id: I46103ffe30615b2949cf9d600c32785b3c28b816
2020-04-04 03:48:18 +00:00
TreeHugger Robot
147d1574b1 Merge "Only apply VPN isolation if it's fully routed" into rvc-dev 2020-04-04 03:44:46 +00:00
Remi NGUYEN VAN
24260d5e6d Fix setAdministratorUids tests on Q
setAdministratorUids does not exist on Q, so such tests must be skipped
on Q devices.

Bug: 147903575
Test: atest CtsNetTestCasesLatestSdk on Q and AOSP devices
Merged-In: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
Change-Id: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
2020-04-03 09:42:33 +00:00
Remi NGUYEN VAN
e1c94d6fd5 Merge "Fix setAdministratorUids tests on Q" am: 7e3fc61cf1 am: a59e208450 am: 91627585e3
Change-Id: I0044469ee26a2e29969b9a04d68f3e6e1faaba34
2020-04-03 09:04:27 +00:00
Remi NGUYEN VAN
91627585e3 Merge "Fix setAdministratorUids tests on Q" am: 7e3fc61cf1 am: a59e208450
Change-Id: Ifbcb485fad3a61c2cf48fb6e264bcdc130119ff0
2020-04-03 08:41:32 +00:00
Remi NGUYEN VAN
95e3e52b6e [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc am: 03d15b5453 -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 ccd5ba288a is in history

Change-Id: I4a36bd6fe06407f343fa6a518367c3b9630cbec9
2020-04-03 08:20:08 +00:00
Remi NGUYEN VAN
0d8275588e [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc -s ours am: af77f3649c -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history

Change-Id: Ieef14cead5cecaa554553fda864c4275a85a3edb
2020-04-03 08:19:14 +00:00
Remi NGUYEN VAN
af77f3649c [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history

Change-Id: I329d322e10096178ea82d213414c2866f596ff12
2020-04-03 08:17:11 +00:00