Commit Graph

1434 Commits

Author SHA1 Message Date
Benedict Wong
0721bd0ff4 Merge "Add documentation for TCP interactions with transforms" 2018-03-27 22:19:37 +00:00
Jeff Sharkey
367d402c6e Merge "Don't let callers OOM the system process." into pi-dev
am: 662cedc67c

Change-Id: I9698aab0d98c564ad7779462485576121e9bc815
2018-03-27 20:08:50 +00:00
TreeHugger Robot
662cedc67c Merge "Don't let callers OOM the system process." into pi-dev 2018-03-27 19:05:24 +00:00
Jeff Sharkey
33851627b0 Don't let callers OOM the system process.
Constrain our default history size to 180 days; if we end up needing
more, we'll dynamically grow the history object.

Test: manual
Bug: 70916680
Change-Id: Id885f9800ad8f45fb0c1a89dab5a4b10ffd9e2f2
2018-03-27 11:09:18 -06:00
android-build-team Robot
38d995bf0f Snap for 4680594 from bf47ae315220dc0ad9d360d063e2fe9fe01c2990 to pi-release
Change-Id: Idb73fa3ffe3aacbe11a4175b1fbbb169a6c826be
2018-03-27 07:26:17 +00:00
Jeff Sharkey
80ab927810 Merge "API council requested tweaks to TrafficStats." into pi-dev
am: 9a6bc76ee8

Change-Id: I6b969377a6e268c1377fcc17f2443cb73072fda2
2018-03-27 03:57:46 +00:00
Jeff Sharkey
17a3875fb6 API council requested tweaks to TrafficStats.
Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
2018-03-26 13:12:39 -06:00
Benedict Wong
0a8e73c1b3 Add documentation for TCP interactions with transforms
Updates API documentation to mention that TCP sockets where transforms
are deactivated will not send FIN packets.

Bug: 74851550
Test: API updates only
Change-Id: I8169f221c8c747538a8bddfbf02dcc73c9337189
2018-03-26 11:33:05 -07:00
android-build-team Robot
5fcf723341 Snap for 4677756 from 6da53af9c55ba2231cd2f47c7dffb150f2c22a89 to pi-release
Change-Id: I97ad116a96610d781a8652edd3535863294657f5
2018-03-25 07:25:42 +00:00
Remi NGUYEN VAN
a2d63a7043 Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12
am: af2fafe743

Change-Id: I2527d95000c7500c824ede70f87ecb38e21ed323
2018-03-23 04:01:09 +00:00
Nathan Harold
07a10f38c7 Merge "Add MANAGE_IPSEC_TUNNELS Permission" into pi-dev
am: 0205fd1064

Change-Id: I7f1c987901c3634fb81d93402d5cb0af80fff11e
2018-03-23 01:57:41 +00:00
Nathan Harold
00e77247eb Add MANAGE_IPSEC_TUNNELS Permission
Add a new MANAGE_IPSEC_TUNNELS permission and
protect all IPsec Tunnel mode APIs with it.
This permission is only granted to the system or
through an AppOp.

Bug: 66955045
Test: compilation
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
2018-03-22 14:16:50 -07:00
Nathan Harold
dea33f2b3c [automerger skipped]Merge "Add NonNull Annotations To IpSec API Surface" into pi-dev
am: 9594175655  -s ours

Change-Id: Ieca39ff6788ca7293ff95516120b947e502f4085
2018-03-22 19:11:11 +00:00
Nathan Harold
9594175655 Merge "Add NonNull Annotations To IpSec API Surface" into pi-dev 2018-03-22 18:31:03 +00:00
android-build-team Robot
b0b463ca59 Snap for 4670666 from b3029a4f72d884bc1931e372a0851a5fdfadf251 to pi-release
Change-Id: I38b91fc0587445a0fc1526b6fceacf159de94a4a
2018-03-22 07:25:10 +00:00
Remi NGUYEN VAN
a6cf27f302 Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Change-Id: I763b77f601c827fd2963204694fb5b45425cc791
2018-03-22 15:31:28 +09:00
Nathan Harold
5164ebd0d5 Merge changes I4c26aea7,I79911434 into pi-dev
am: 4f1703787d  -s ours

Change-Id: I19626bf87d31c759939c6aafc42ae679f6cb18e4
2018-03-21 21:35:13 +00:00
Nathan Harold
4f1703787d Merge changes I4c26aea7,I79911434 into pi-dev
* changes:
  Check mOwnedByTransform to avoid DELSA on SPI
  Expose add/removeAddress for IpSecInterfaces
2018-03-21 20:59:02 +00:00
nharold
331a93825d Merge "Add NonNull Annotations To IpSec API Surface" am: baa4bf51c1
am: 08949e354f

Change-Id: I1aa2077978eba9e13586aeb4501769e2dd42728a
2018-03-21 20:37:59 +00:00
Nathan Harold
6303d9ef32 Add NonNull Annotations To IpSec API Surface
This CL adds NonNull annotations to a large
number of method returns and parameters as
part of API council feedback.

Bug: 72473424
Test: compilation (docstring-only change)
Merged-In: I2f865dde56fe12116c461ad98e9460bf1802ce18
Change-Id: I2f865dde56fe12116c461ad98e9460bf1802ce18
(cherry picked from commit 8fd26f67fdfdedb535ddb8c7d5ededa5dcba40f8)
2018-03-21 11:15:28 -07:00
Benedict Wong
db1294de24 Merge "Added implementation for VTI add/remove address" into pi-dev
am: d99c2eb909  -s ours

Change-Id: I1f77872860e705606ba9f0c7f95200ee5bdbe499
2018-03-21 17:39:56 +00:00
Benedict Wong
5500e8baa8 Merge "Add support for auth-only transforms" into pi-dev
am: d7582684b6  -s ours

Change-Id: Id0bffdfbf90c4780108702bcd98c48d458292444
2018-03-21 17:34:08 +00:00
Nathan Harold
ff7939a846 Add NonNull Annotations To IpSec API Surface
This CL adds NonNull annotations to a large
number of method returns and parameters as
part of API council feedback.

Bug: 72473424
Test: compilation (docstring-only change)
Change-Id: I2f865dde56fe12116c461ad98e9460bf1802ce18
2018-03-21 17:08:34 +00:00
Benedict Wong
d99c2eb909 Merge "Added implementation for VTI add/remove address" into pi-dev 2018-03-21 17:03:52 +00:00
nharold
8788f3944a Merge "Check mOwnedByTransform to avoid DELSA on SPI" am: 197361431c
am: ad1edf143f

Change-Id: Ie505e32e6f3bef3fe39198396a40a2b534e2bcda
2018-03-21 05:01:47 +00:00
nharold
e16763a960 Merge "Expose add/removeAddress for IpSecInterfaces" am: a32b8e710d
am: 189292cc36

Change-Id: Ib6780094b6b6b13146829b92fb3942a98cd96100
2018-03-21 04:45:15 +00:00
Nathan Harold
fdde4d633f Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Merged-In: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
(cherry picked from commit 22795302be4ec35449908cf566aa7c16945df836)
2018-03-20 18:29:02 -07:00
nharold
197361431c Merge "Check mOwnedByTransform to avoid DELSA on SPI" 2018-03-21 01:27:22 +00:00
Nathan Harold
49cd8d7268 Expose add/removeAddress for IpSecInterfaces
When exposing the APIs, these were missed.
The outer structure is exposed, so this exposes
the addAddress and removeAddress methods.

Bug: 75234273
Test: compilation
Merged-In: I79911434f9baa660e4d8564cc59d80da4a710c42
Change-Id: I79911434f9baa660e4d8564cc59d80da4a710c42
(cherry picked from commit a83601a511c3f11470109d78d1a736acdb9c6bd8)
2018-03-20 16:01:28 -07:00
Benedict Wong
97c3c945d7 Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Merged-In: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
(cherry picked from commit ecc9f7cc08804e3fa15fea04ae94ea1bc74edbfe)
2018-03-20 16:01:27 -07:00
nharold
a32b8e710d Merge "Expose add/removeAddress for IpSecInterfaces" 2018-03-20 22:53:39 +00:00
Benedict Wong
f91c619d2b Merge "Add support for auth-only transforms" am: 22b39848a6
am: 51ca645608

Change-Id: I8a8a89c40ab97b81225520b80950937b11863134
2018-03-20 22:28:27 +00:00
Benedict Wong
778327e548 Add support for auth-only transforms
Kernel limitations prevent auth-only SAs from being created. Explicitly
request a null encryption algorithm instead of omitting the algorithm
to comply with the kernel requirement for ESP.

Bug: 75049573
Test: CTS tests for auth-only, crypt-only transforms added for all
combinations of (UDP, TCP, IPv4, IPv6, UDP-encap) Also added unit
tests to ensure correct triggering of NULL_CRYPT usage.
Merged-In: Ia9a5cfee9c7786412846bc039f326420f6211c08
Change-Id: Ia9a5cfee9c7786412846bc039f326420f6211c08
(cherry picked from commit bf013a3820c69348e034c6340b28e95f3441ebe8)
2018-03-20 12:34:52 -07:00
Nathan Harold
e4a6258658 Expose add/removeAddress for IpSecInterfaces
When exposing the APIs, these were missed.
The outer structure is exposed, so this exposes
the addAddress and removeAddress methods.

Bug: 75234273
Test: compilation
Change-Id: I79911434f9baa660e4d8564cc59d80da4a710c42
2018-03-20 12:32:20 -07:00
Treehugger Robot
22b39848a6 Merge "Add support for auth-only transforms" 2018-03-20 18:36:04 +00:00
Nathan Harold
feebc885a2 Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
2018-03-20 11:26:29 -07:00
Benedict Wong
0fd27deb7f Merge "Added implementation for VTI add/remove address" am: 8c05fd7155
am: 9dda91f806

Change-Id: Idaab45998f4765655bde6cf0274f2ba3c1b3ecf1
2018-03-20 00:09:15 +00:00
Benedict Wong
8c05fd7155 Merge "Added implementation for VTI add/remove address" 2018-03-19 22:05:09 +00:00
android-build-team Robot
c95fa12d4e Snap for 4662252 from c5d0ed9f3c9c7472354b2cd34fb158f72c219b3a to pi-release
Change-Id: Idceaaf72503dfebc1c23739907977c2846c6b734
2018-03-18 07:27:15 +00:00
Nathan Harold
0d6111feab Merge "Docstring Updates for applyTransportModeTransform" into pi-dev
am: 685288127d  -s ours

Change-Id: I98698ebd0a3aa97250274830dadb4c70e41a7e3e
2018-03-17 03:59:36 +00:00
nharold
15c9f6d269 Merge "Docstring Updates for applyTransportModeTransform" am: 00ef20e853
am: e3a6b678c3

Change-Id: I58ab2b451ef1d0c20efe80d30a679e8870a39a8e
2018-03-17 02:16:38 +00:00
Nathan Harold
e3536f066d Docstring Updates for applyTransportModeTransform
-Add anotations to usages of PolicyDirection for
 apply...() methods.
-Update the comments on DIRECTION_IN and DIRECTION_OUT
 to better reflect their current usage.
-Add a better explanation to the rekey procedure doc.
-Remove disused createTunnelInterface() stub.

Bug: 73751066
Test: make docs
Merged-In: I9f2ec864466148a18899f1e952c74a525902ccbc
Change-Id: I9f2ec864466148a18899f1e952c74a525902ccbc
(cherry picked from commit f4cdf25a906d0f52ffd76508d660b843b13b3ff8)
2018-03-16 17:46:05 -07:00
Benedict Wong
2ba4a65fe0 Add support for auth-only transforms
Kernel limitations prevent auth-only SAs from being created. Explicitly
request a null encryption algorithm instead of omitting the algorithm
to comply with the kernel requirement for ESP.

Bug: 75049573
Test: CTS tests for auth-only, crypt-only transforms added for all
combinations of (UDP, TCP, IPv4, IPv6, UDP-encap) Also added unit
tests to ensure correct triggering of NULL_CRYPT usage.
Change-Id: Ia9a5cfee9c7786412846bc039f326420f6211c08
2018-03-16 17:36:59 -07:00
Nathan Harold
e917321c4e Docstring Updates for applyTransportModeTransform
-Add anotations to usages of PolicyDirection for
 apply...() methods.
-Update the comments on DIRECTION_IN and DIRECTION_OUT
 to better reflect their current usage.
-Add a better explanation to the rekey procedure doc.
-Remove disused createTunnelInterface() stub.

Bug: 73751066
Test: make docs
Change-Id: I9f2ec864466148a18899f1e952c74a525902ccbc
2018-03-16 17:29:45 -07:00
Benedict Wong
23b86a6d99 Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
2018-03-16 10:25:43 -07:00
Remi NGUYEN VAN
4950f3c810 Merge "Allow null subscriberId in NetworkStatsManager." am: 6bd13af46a
am: a6905db1d8

Change-Id: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
2018-03-06 19:52:57 +00:00
Lorenzo Colitti
1546bc83fc Merge "Minor cleanups to NetworkStats interface tracking." am: 6455e31b76
am: 65777e4b61

Change-Id: Ifa76adb79440b1d97c6cfc637509c0ddaefa76fa
2018-03-06 07:47:11 +00:00
Remi NGUYEN VAN
41737af07d Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I4b39e7031416cb33b23d89aa36ff0f774eaa942f
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
2018-03-06 13:28:19 +09:00
Lorenzo Colitti
8f5d138277 Minor cleanups to NetworkStats interface tracking.
Currently, when a network goes into CONNECTED state, we call
updateLinkProperties and then notifyIfacesChangedForNetworkStats.
The latter is unnecessary, as there are exactly two cases:

1. networkAgent.linkProperties != null: updateLinkProperties will
   call notifyIfacesChangedForNetworkStats, because oldLp is null
   and networkAgent.linkProperties is not null.
2. networkAgent.linkProperties is null: there is no need to call
   notifyIfacesChangedForNetworkStats, because no interfaces were
   added or removed. When they are, updateLinkProperties will be
   called again.

Removing the call to notifyIfacesChangedForNetworkStats avoids
a stats poll, which is a minor performance improvement.

Also, remove the NetworkStatsService code to do asynchronous
interface updates, since it has no callers.

Bug: 72107146
Test: builds, boots
Test: runtest frameworks-net
Change-Id: I9337ea26c0505a1c66ceda01254b68e25cd7972c
2018-03-05 15:48:23 +09:00
android-build-team Robot
90b14389f7 Snap for 4623514 from 3a1b5d186786bf41a73370f31f90033b23a5a70a to pi-release
Change-Id: Ibc8214e4308dcb2cd5a235568017ab2d37db089e
2018-02-27 08:20:48 +00:00