Commit graph android_packages_modules_Co.../core/java
Message SHA1
Merge "Adjust map names due to new bpfloader" am: 0317e9e374 am: 37cec67bdc
am: 50252f86f3

Change-Id: Iedbb541ba2fa5916048e3f40d5cc128a83d0dc6b

Chenbo Feng   authored and   android-build-merger   commited 2019-01-09 11:34:54 -08:00
14c16b87a9
Merge "Adjust map names due to new bpfloader"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-01-09 18:34:49 +00:00
0317e9e374
Adjust map names due to new bpfloader
With the new loader support added. The bpf map format is defined by bpf
kernel program as well. Change the netd bpf program to the new format.

Test: CtsUsageStatsTestCases
Bug: 112334572
Change-Id: I34e38e0a8cf0cca54dc52ec897771452f9d90525

Chenbo Feng   commited 2019-01-04 12:06:35 -08:00
150dc6f187
Merge "Ignore ipv6 tx traffic on clat uid." am: 191f32fdc7 am: 9c0075aad0
am: 59c7f1a494

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b

Junyu Lai   authored and   android-build-merger   commited 2019-01-04 08:47:41 -08:00
92c56063be
Merge "Ignore ipv6 tx traffic on clat uid."
Junyu Lai   authored and   Gerrit Code Review   commited 2019-01-04 09:29:10 +00:00
191f32fdc7
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-12-13 05:45:20 +00:00
ab3b396c45
API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup

Adrian Roos   commited 2018-12-12 15:02:26 +01:00
be53fbb8d5
DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd

Xin Li   commited 2018-12-11 14:13:44 -08:00
6f9c73f8c9
API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup

Adrian Roos   commited 2018-12-11 20:38:02 +01:00
ef420e9754
Merge "Refactoring of deleting stats in NetworkStats based on uids." am: c8dcfb8b4b am: 2d00948a0c
am: 2d79ef94f8

Change-Id: I29c57276424464afd54e184c369d30a5e9707f14

Junyu Lai   authored and   android-build-merger   commited 2018-12-10 03:10:15 -08:00
83a52f5fb2
Ignore ipv6 tx traffic on clat uid.
Currently, 464xlat counts its ipv6 tx traffic into root uid.
When user is making ipv4 upload over ipv6-only network, ipv4
tx traffic may sometimes be counted faster then ipv6 tx
traffic.

Thus, NetworkStatsService may detect non-monotonic values due
to 464xlat adjustment.

So the solution is that: for clatd, make ipv6 tx traffic counts
into clat uid, and then ignore it in the framework side.

Bug: 118602783
Test: 1. manually verify clatd traffic on clat uid.
      2. runtest frameworks-net

Change-Id: Ifb478b79e3e281918c70e16d1f90682c78f33db1

junyulai   commited 2018-12-10 15:19:03 +08:00
6fe079615b
Merge "Refactoring of deleting stats in NetworkStats based on uids." am: c8dcfb8b4b
am: 2d00948a0c

Change-Id: Icfe86f71f9416dcd5fcc9aafd8c346197cde7cff

Junyu Lai   authored and   android-build-merger   commited 2018-12-09 21:46:07 -08:00
2d79ef94f8
Refactoring of deleting stats in NetworkStats based on uids.
In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d

junyulai   commited 2018-12-06 19:01:17 +09:00
bbaddec5d7
Merge changes from topic "xfrmi-support" am: f928c1e4b9 am: 719761f60c
am: 0cfc49485c

Change-Id: I9c543d38c88181b12cdbc7bdb93d7e38f1dfd425

Benedict Wong   authored and   android-build-merger   commited 2018-11-25 19:38:35 -08:00
a041d6fb80
Merge changes from topic "xfrmi-support" am: f928c1e4b9
am: 719761f60c

Change-Id: I13a826f5ae3c4cb700be789b369848685da1bc41

Benedict Wong   authored and   android-build-merger   commited 2018-11-25 19:26:26 -08:00
0cfc49485c
Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78

Benedict Wong   commited 2018-11-21 08:34:54 -08:00
5d74984c24
Disable attempted updating of SA marks
SA marks are never updated during the UPDSA call. This change disables
the attempts to update the specified SAs, ensuring that the config
stored in IpSecService matches that of the allocated kernel resources.

Bug: 111854872
Test: Unit, CTS tests passing
Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9

Benedict Wong   commited 2018-11-21 08:34:54 -08:00
683441d87a
Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2 am: a38302f84f
am: fcb523e095

Change-Id: I9d0d8b67ed0159ba2a71059620ebe5698eb79ccb

Junyu Lai   authored and   android-build-merger   commited 2018-10-30 19:56:01 -07:00
0ab82da19f
Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2
am: a38302f84f

Change-Id: I3ee791e4b6fdd9d508807810183dc02c69bd2c0b

Junyu Lai   authored and   android-build-merger   commited 2018-10-30 19:46:18 -07:00
fcb523e095
Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac

junyulai   commited 2018-10-30 21:23:38 +08:00
7d412d0b46
Merge "Refactor UidRange by using stable aidl structure" am: 55012f2249 am: 96c61c9fa2
am: 9a3586aa00

Change-Id: I82e06fe93a3ed88368b649ef8d3283322191ffe7

Luke Huang   authored and   android-build-merger   commited 2018-10-28 18:06:15 -07:00
4f2898674e
Merge "Refactor UidRange by using stable aidl structure" am: 55012f2249
am: 96c61c9fa2

Change-Id: I09ac7fc6525948b76114ef936dc1b3d2d1bae0fb

Luke Huang   authored and   android-build-merger   commited 2018-10-28 17:55:57 -07:00
9a3586aa00
Refactor UidRange by using stable aidl structure
Use stable aidl generated structure instead of UidRange

Test: runtest frameworks-net passes
Test: manual testing of UidRange related function works
Change-Id: Iaf1c10777dc1e71df2be2a57533a10257b12626b

Luke Huang   commited 2018-10-24 19:45:09 +09:00
e67f2178dc
Merge "Add DhcpServer" am: e3a0f42e8e am: 7f3130c488
am: fb294eb16e

Change-Id: I602efdb3cb4b3316dada80361381404af1c3615c

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-08-28 20:51:09 -07:00
33ca705a18
Merge "Add DhcpServer" am: e3a0f42e8e
am: 7f3130c488

Change-Id: Ic3b1cd87389ade162c1c7441132f3e0451f1b78c

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-08-28 20:42:08 -07:00
fb294eb16e
Add DhcpServer
This first version can serve discover/request/release, although there
are some small behavior changes with current implementation which will
be addressed later.

Also removes final modifiers on start() and stop() in FdEventsReader, to
allow mocking the methods in tests with the current mockito lib.

Test: Added tests pass, manual: flashed a device using the server
Change-Id: I025366ff7d51c4ba31152af50f3dd2b5e280a54d

Remi NGUYEN VAN   commited 2018-08-28 12:50:47 +09:00
c9fc125bb4
Merge "Add @UnsupportedAppUsage annotations" am: 90660f8990
am: 7a5bf4e2dd

Change-Id: I99215dd5430968df2e2dd514d21b396b00c1403e

Mathew Inwood   authored and   android-build-merger   commited 2018-08-16 03:29:58 -07:00
add296617f
Merge "Add @UnsupportedAppUsage annotations" am: d08509363c
am: d825eeefa4

Change-Id: I52585645e23519cfc6d216e344710ad76aeea9e8

Mathew Inwood   authored and   android-build-merger   commited 2018-08-16 03:10:41 -07:00
b5d1f26d20
Merge "Add @UnsupportedAppUsage annotations"
Mathew Inwood   authored and   Gerrit Code Review   commited 2018-08-15 15:41:26 +00:00
90660f8990
Merge "Add @UnsupportedAppUsage annotations"
Mathew Inwood   authored and   Android (Google) Code Review   commited 2018-08-15 11:36:32 +00:00
98639c2c19
Add @UnsupportedAppUsage annotations
For packages:
  android.net.wimax
  android.net.wifi.p2p.nsd
  android.net.wifi.p2p
  android.net.wifi.hotspot2.pps
  android.net.wifi.hotspot2.omadm
  android.net.wifi.hotspot2
  android.net.wifi.aware
  android.net.wifi
  android.net.util
  android.net.sip
  android.net.rtp
  android.net.nsd
  android.net.metrics
  android.net.lowpan
  android.net.http
  android.net.captiveportal
  android.net

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1

Mathew Inwood   commited 2018-08-14 14:44:29 +01:00
ce3a48c05f
Add @UnsupportedAppUsage annotations
For packages:
  android.net.wimax
  android.net.wifi.p2p.nsd
  android.net.wifi.p2p
  android.net.wifi.hotspot2.pps
  android.net.wifi.hotspot2.omadm
  android.net.wifi.hotspot2
  android.net.wifi.aware
  android.net.wifi
  android.net.util
  android.net.sip
  android.net.rtp
  android.net.nsd
  android.net.metrics
  android.net.lowpan
  android.net.http
  android.net.captiveportal
  android.net

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I520be7a4c79e68310c12e4f55bf66acaa94145a1

Mathew Inwood   commited 2018-08-14 14:39:24 +01:00
ac005192ea
Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I5d15d50344d7178617418846917f693cfabf006b
Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c

Mathew Inwood   commited 2018-08-14 14:25:44 +01:00
cf9b6cd10a
Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c

Mathew Inwood   commited 2018-08-14 14:17:44 +01:00
ed334ebbd1
docs: added Android P behavior change note to untagSocket reference am: c134e24a77
am: bc81ceab91

Change-Id: Ib4bb5d2d1b3f33bab69b5e109b23978a5f90da13

kopriva   authored and   android-build-merger   commited 2018-07-26 17:25:49 -07:00
5ea1eb31f0
docs: added Android P behavior change note to untagSocket reference
am: c134e24a77

Change-Id: I814224210475078c4ab01f53e42202a538c8a444

kopriva   authored and   android-build-merger   commited 2018-07-26 17:17:16 -07:00
bc81ceab91
docs: added Android P behavior change note to untagSocket reference
staged here:
https://android-dot-devsite.googleplex.com/reference/android/net/TrafficStats#untagSocket(java.net.Socket)

Test: make ds-docs

Exempt-From-Owner-Approval: Docs-only change

Bug: 110484513
Change-Id: I24575e6f4451a019b60c5bf60e17e14a928c6cc3

kopriva   authored and   Todd Kopriva   commited 2018-07-26 20:29:39 +00:00
c134e24a77
Merge "Track constructor changes in libcore/" am: f94eb29500 am: 33a26e3ee4
am: fa52de540c

Change-Id: I7e7115799180d17e4ad6468e155aed79fc8600cb

Neil Fuller   authored and   android-build-merger   commited 2018-07-05 05:34:45 -07:00
8b95a1f8f7
Merge "Track constructor changes in libcore/"
am: f94eb29500

Change-Id: I344d9210bd173f78651318366c852f65afe969d6

Neil Fuller   authored and   android-build-merger   commited 2018-07-05 05:14:26 -07:00
33a26e3ee4
Track constructor changes in libcore/
The 2-arg constructor is being removed.

Test: build / boot
Bug: 111055375
Change-Id: I72413a8c7885f9514a88f59deb649fa755deff92

Neil Fuller   commited 2018-07-03 19:22:45 +01:00
4b6b8dee0d
Rework Exception Handling for IpSecManager
In order to properly support EOPNOTSUPP this CL
applies a consistent approach to handling Exceptions.
Hereafter, all exceptions that aren't of a special
method-specific type (such as SpiUnavailableException)
will all be returned to the calling process unchanged.
At the API call site, the ServiceSpecificException,
which is really an Errno, will be inspected and either
converted to an unchecked exception for types we know,
or it will be converted to an IOException in cases where
that method can return a checked exception. In cases
where we do not expect an errno, we will simply throw
a generic RuntimeException. This means all API calls
will now properly throw UnsupportedOperationException
and may be CTS tested accordingly.

Bug: 72420898
Test: runtest frameworks-net
Merged-In: I4a00e221618896223fcdb4b4279fb14cd14e34d8
Change-Id: I4a00e221618896223fcdb4b4279fb14cd14e34d8
(cherry picked from commit beed0b61b7)

Nathan Harold   commited 2018-06-07 18:42:52 -07:00
d21e909fd3
Update IpSecManager to use InetAddress and prefixLen
LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Merged-In: I19e124adef6d9f4992d8293db3190bcf74c95848
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
(cherry picked from commit d39837f7e2)

Benedict Wong   authored and   Nathan Harold   commited 2018-06-07 18:42:52 -07:00
b25e678b4b
Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Merged-In: I17a4a286225b432c3e15ea1587d946189931b4f4
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
(cherry picked from commit 65ef843176)

Nathan Harold   commited 2018-06-07 18:42:52 -07:00
cac8775b2a
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
Merged-In: I0f618373b500c493ef2211bece681f74652a1833
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
(cherry picked from commit 00e77247eb)

Nathan Harold   commited 2018-06-07 18:42:52 -07:00
b9df8b1fca
Merge "Last-ditch clamping of negative NetworkStats." into pi-dev am: 0026f5eb18
am: eecce38819

Change-Id: I572ef538dafb59d8947958df8eac155e890d08f0

Jeff Sharkey   authored and   android-build-merger   commited 2018-05-23 17:43:05 -07:00
d811e74b93
Last-ditch clamping of negative NetworkStats.
We've seen reports of negative values flowing through to attempt
being recorded, which will outright crash.  This change does one
last-ditch check to see if we're about to work with negative values,
reporting any trouble and clamping them to zero so we don't crash.

This gives us the data we need to continue investigating without
triggering runtime restarts in the field.

Bug: 80057433
Test: atest android.net.NetworkStatsTest
Change-Id: I8174391c6cf5dadc2c2c10a8d841ee07e1f7d934

Jeff Sharkey   commited 2018-05-22 11:35:32 -06:00
d631c5836d
Merge changes from topic "ifaceStatsDetail" into pi-dev
* changes:
  Remove the unused file parsing function
  Use eBPF map data for per iface stats

android-build-team Robot   authored and   Android (Google) Code Review   commited 2018-05-02 19:17:27 +00:00
4b561abcaa
Merge changes from topic "am-b4a6d70f84a44081adc7240053891656" into pi-dev-plus-aosp
am: 5e5a150dbd

Change-Id: Ice5d3c6c975c0945785332c09a876754441d536d

android-build-prod (mdb)   authored and   android-build-merger   commited 2018-05-01 20:11:28 -07:00
868479ce7b
Merge changes from topic "ifaceStats" am: eab28ef97c
am: b86d2b4b84

Change-Id: I460bc25806182bc2dc5fcc2512ab01e776a0e8e6

android-build-prod (mdb)   authored and   android-build-merger   commited 2018-05-01 19:53:30 -07:00
93f2f28a66
Use eBPF map data for per iface stats am: 2dc99dc445
am: 2e13ecc88d

Change-Id: If4944a4a5a0c49235731afb4ae3220cf72240a83

Chenbo Feng   authored and   android-build-merger   commited 2018-05-01 19:49:53 -07:00
3654e617c0