Commit graph android_packages_modules_Co.../tests/net/java/android
Message SHA1
Merge "Fix setCapabilities." into pi-dev
am: cb42feb502

Change-Id: I13d7782a6c0c7b1f94137995bbb0d257a58d89c1

Chalard Jean   authored and   android-build-merger   commited 2018-05-22 01:01:39 -07:00
2e7a6c1b8f
Fix setCapabilities.
P introduced setSSID, UIDs and unwanted capabilities.
None of these exhibit commutative behavior through combineCapabilities
because their semantics don't allow it. Therefore
NetworkRequest.setCapabilities() is badly broken around any of
these. Look at the comments in the new tests to realize the
extent of the damage.

Bug: 79748782
Test: new tests written, old tests pass
Change-Id: Ie46581bdaf9ecc2f14aab44788bbdb27a3fec8c1

Chalard Jean   commited 2018-05-21 14:46:40 +09:00
e15627ef72
Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev
am: f12a2130a4

Change-Id: I4b739c56e658690532ae9deb0b9a3bc9b2adf8b0

Chalard Jean   authored and   android-build-merger   commited 2018-04-20 04:49:43 -07:00
2cc723e410
Add the list of private DNS addresses to LinkProperties
Test: atest android.net.LinkPropertiesTest, also new tests pass
Bug: 73641539
Change-Id: If33a35b1354a67db09411ff098f20064797296ad

Chalard Jean   commited 2018-04-20 16:48:43 +09:00
3e0a46a439
Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
am: f920300665

Change-Id: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda

Chalard Jean   authored and   android-build-merger   commited 2018-04-13 02:14:02 -07:00
33ada883b8
Add a new ssid field in NetworkCapabilities.
Bug: 77891227
Test: frameworks-net
Change-Id: Ifba33ecd48ccecce7e8f8d05ff70bb85653f6163

Chalard Jean   commited 2018-04-13 15:38:35 +09:00
3ec2c0fc84
Merge "Force creation of Socket upon Transform application" into pi-dev
Benedict Wong   authored and   Android (Google) Code Review   commited 2018-04-09 20:55:30 +00:00
534cfd2477
Merge "Update IpSecManager to use InetAddress and prefixLen" into pi-dev
am: b172d5b437

Change-Id: I03c0745662ab8868f719dc65c9ff8502e2ff817c

Benedict Wong   authored and   android-build-merger   commited 2018-04-05 17:34:11 -07:00
d370c857f5
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
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848

Benedict Wong   authored and   Nathan Harold   commited 2018-04-05 17:41:11 +00:00
2ea91aee42
Merge "Force creation of Socket upon Transform application" am: 4acfd60844
am: 1f8c0950b1

Change-Id: I2034448a22461d51728e66bcc0e965821aa4a42f

Benedict Wong   authored and   android-build-merger   commited 2018-04-04 12:52:00 -07:00
218bfc4751
Force creation of Socket upon Transform application
This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Merged-In: I40da08b031357710eb794e0f866aec5660c79594
Change-Id: I40da08b031357710eb794e0f866aec5660c79594
(cherry picked from commit d175a3d3a01cfdb5ab6d4e61d15950583f8006d6)

Benedict Wong   commited 2018-04-04 10:33:49 -07:00
031d447363
Merge "Mark networks with OEM_PAID always restricted" into pi-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2018-04-04 16:54:46 +00:00
4f58ec4b83
Mark networks with OEM_PAID always restricted
Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Cherry-picked from AOSP with no conflicts

Merged-in: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
Change-Id: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
(cherry picked from commit efbacc0ccb70917b2782272e6b8f1a0fb3f56cbe)

Lorenzo Colitti   authored and   Pavel Maltsev   commited 2018-04-04 05:35:54 +00:00
9b58dd356c
Force creation of Socket upon Transform application
This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Change-Id: I40da08b031357710eb794e0f866aec5660c79594

Benedict Wong   commited 2018-04-03 17:04:55 -07:00
412ff4144b
Merge "Add AppOps Checks for MANAGE_IPSEC_TUNNELS" into pi-dev
am: 80a2bba9a6

Change-Id: Icd1b2cfc699ab44e4ca536b98298d5b23db7372e

Nathan Harold   authored and   android-build-merger   commited 2018-04-03 14:41:56 -07:00
78fd96e934
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
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4

Nathan Harold   commited 2018-04-03 18:23:11 +00:00
68a7edf1cb
Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52

Remi NGUYEN VAN   commited 2018-04-02 13:30:02 +00:00
1720e75aa2
Merge "Add method to NetworkStatsService for UID stats." into pi-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2018-04-02 05:40:04 +00:00
d197642ba8
Merge changes from topic "encap-api" into pi-dev
* changes:
  Require explicitly supplied truncation length
  Clarify UDP encapsulation socket API

Benedict Wong   authored and   Android (Google) Code Review   commited 2018-03-30 20:28:19 +00:00
c37a5742a2
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.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f13145ea52207bdead0d7e454a6f3ce)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1

Remi NGUYEN VAN   commited 2018-03-30 18:58:18 +09:00
ef7e3afa1e
Merge "Mark networks with OEM_PAID always restricted" am: dbc568ceaf
am: e019e0e240

Change-Id: I88500f6add4f1a6c8a77eb976a489c11c7dc5b6d

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 09:05:09 +00:00
3754e152e7
Merge "Require explicitly supplied truncation length" am: 2db4d5fbda
am: d78344d704

Change-Id: I347bfd43be54d162dea831770ab08d792ea1443f

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 07:45:04 +00:00
56d68c37ea
Merge "Mark networks with OEM_PAID always restricted"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 07:00:54 +00:00
dbc568ceaf
Mark networks with OEM_PAID always restricted
Bug: 68762530
Exempt-From-Owner-Approval: OWNERS have approved, but gerrit doesn't see it
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: Ieadef7c42634d890281543226203530fb18eb0a3

Pavel Maltsev   authored and   Lorenzo Colitti   commited 2018-03-30 07:00:39 +00:00
8cb5245570
Merge "Clarify UDP encapsulation socket API" am: db1e624ee1
am: bdc59ca370

Change-Id: I5fcf79691c670e710e46b3a9eac8a580c44028fb

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 06:48:17 +00:00
57498b9359
Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Merged-In: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
(cherry picked from commit bb7f2820f5bcccf8618078c2cbe4ea9836797e3b)

Benedict Wong   commited 2018-03-29 23:07:42 -07:00
2e1ebb60e6
Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Merged-In: I0afebd432c5d04c47c93daa1ce616d712aa323d7
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
(cherry picked from commit 4c987ebade580d4abc8a3d549e0df90baab33140)

Benedict Wong   commited 2018-03-29 23:05:42 -07:00
c165885206
Merge "Require explicitly supplied truncation length"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 04:59:22 +00:00
2db4d5fbda
Merge "Clarify UDP encapsulation socket API"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 04:58:47 +00:00
db1e624ee1
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: I8296220472a9ba37044dd1a5ede9bdb45d3ed339
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
Merged-In: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
Merged-In: Ia84d2c7cc63bf8b8bf30f133e0382fd7103bf490
(cherry-picked from aosp I4b39e7031416cb33b23d89aa36ff0f774eaa942f)

Remi NGUYEN VAN   commited 2018-03-30 12:18:23 +09:00
65ffbafe88
Merge "Fix network usage stats on 464xlat tethered." am: 83088dcd8e
am: 7ea8c51311

Change-Id: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-03-29 07:46:34 +00:00
c83f2378e3
Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97

Benedict Wong   commited 2018-03-28 18:02:54 -07:00
5f38c02385
Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage

Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda

Remi NGUYEN VAN   commited 2018-03-28 12:14:14 +09:00
c19a5eb8e4
Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7

Benedict Wong   commited 2018-03-27 19:46:50 -07:00
a042c3f82b
Merge "Minor clean-up in NetworkCapabilities" am: 539f85a18d am: b1e2bfe4df
am: 8a956a5141

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: I2f45d2c70c7c0142ae3b3ce9e6329c5f25b63380
(cherry picked from commit feb8d1498a822730e29cf346fe3382e3f5293a58)

Pavel Maltsev   commited 2018-03-27 22:45:49 +00:00
51f4d8a11d
Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12
am: f61f5ff462

Change-Id: I2527d95000c7500c824ede70f87ecb38e21ed323

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-03-23 04:01:09 +00:00
7370f4270e
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

Remi NGUYEN VAN   commited 2018-03-22 15:31:28 +09:00
1cb92c713f
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)

Benedict Wong   authored and   Nathan Harold   commited 2018-03-20 16:01:27 -07:00
76df78ffbf
Merge "Added implementation for VTI add/remove address" am: 3f3410ae6b
am: c9b0114429

Change-Id: Idaab45998f4765655bde6cf0274f2ba3c1b3ecf1

Benedict Wong   authored and   android-build-merger   commited 2018-03-20 00:09:15 +00:00
696b853a11
Merge "Added implementation for VTI add/remove address"
Benedict Wong   authored and   Gerrit Code Review   commited 2018-03-19 22:05:09 +00:00
3f3410ae6b
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

Benedict Wong   commited 2018-03-16 10:25:43 -07:00
0da1f39e22
Merge "Fixing comments in Network Capabilities" am: b6477d22ca
am: 2c36870f3d

Change-Id: If3c0d76f9598d931d801271c4d0634e15f4b9ed4

Pavel Maltsev   authored and   android-build-merger   commited 2018-03-12 08:08:31 +00:00
3152f214df
Fixing comments in Network Capabilities
Clean up after aosp/606338

Test: m -j (only comments has been changed)
Change-Id: I2627654450244024c2be92f9067534dfc2a80891

Pavel Maltsev   commited 2018-03-09 10:42:32 -08:00
1f9f48e1c4
Merge "Minor clean-up in NetworkCapabilities" am: 1dd43b192c
am: 6ab3c9c246

Change-Id: Ie6839576f61563f2a82fec53afc42208f5a37f3c

Pavel Maltsev   authored and   android-build-merger   commited 2018-03-07 23:09:04 +00:00
5d97ad9fe4
Merge "Minor clean-up in NetworkCapabilities"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-03-07 21:06:59 +00:00
1dd43b192c
Merge "Allow null subscriberId in NetworkStatsManager." am: 09639d8ad0
am: cbcf2a49ea

Change-Id: I1e4e283c6eaecf33d12488e41e0c524f6ff83954

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-03-06 19:52:57 +00:00
1252af5564
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

Remi NGUYEN VAN   commited 2018-03-06 13:28:19 +09:00
a08eb7203b
Merge "Extend network request to query networks w/o capabilites" am: 47d4d15483 am: 334cde1ec2
am: fa04c2d802

Change-Id: I3bf776767be61577f1bca0d98d4aaf82a0e45336

Pavel Maltsev   authored and   android-build-merger   commited 2018-03-03 00:14:52 +00:00
1016f7327a
Merge "Extend network request to query networks w/o capabilites"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-03-02 19:04:31 +00:00
47d4d15483
Merge "Give apps with NETWORK_SETTINGS right to see any VPN." am: faed85f2b0 am: 331e50f601
am: ec7c68cb2b

Change-Id: I9a9d0eb212f6de105abc070a1eb5ff698b4e67bc

Chalard Jean   authored and   android-build-merger   commited 2018-03-02 13:25:02 +00:00
0a8dbc7886