Commit graph android_packages_modules_Co.../tests/net/java
Message SHA1
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
98d4e9d1c6
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
9ea008ff62
Merge "Revert "Revert "OP_GET_USAGE_STATS should be noted, not checked.""" into pi-dev
am: 629091d727

Change-Id: Ie9bcdc9736c04ab787efc193311a20d03718b593

Jeff Sharkey   authored and   android-build-merger   commited 2018-04-16 10:19:39 -07:00
04aa1ff87a
Merge "Revert "OP_GET_USAGE_STATS should be noted, not checked."" into pi-dev
am: 7f11c98a55

Change-Id: I2cc76316bca81c12e56337d6e36d82b0de6d9ded

Jeff Sharkey   authored and   android-build-merger   commited 2018-04-16 10:07:52 -07:00
8708f5a0b5
Revert "Revert "OP_GET_USAGE_STATS should be noted, not checked.""
This reverts commit 4de48809c0.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I596d330d64942105f447bb613012bb11e281a805
Exempt-From-Owner-Approval: keep tests passing

Jeff Sharkey   commited 2018-04-16 16:50:34 +00:00
33a25ec466
Revert "OP_GET_USAGE_STATS should be noted, not checked."
This reverts commit fbb37a7f61.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I5dd0ad5038df90ea8a80ba6f583ee46fb24600c2
Exempt-From-Owner-Approval: keep tests passing

Jeff Sharkey   commited 2018-04-16 16:39:55 +00:00
4de48809c0
Merge "OP_GET_USAGE_STATS should be noted, not checked." into pi-dev
am: 64bbb2014e

Change-Id: I38f5aecdb94c8b886ca4eba5908ab1b4a9c1fb89

Jeff Sharkey   authored and   android-build-merger   commited 2018-04-14 18:11:58 -07:00
876c34224d
OP_GET_USAGE_STATS should be noted, not checked.
Per email feedback, we should be using "noteOp" instead of "checkOp"
when testing if caller holds OP_GET_USAGE_STATS, so that we record
that caller used the operation.

Bug: 77662908
Test: builds, boots
Exempt-From-Owner-Approval: keep tests passing
Change-Id: I3a60345d590534fdbc2c1248e0d30dc85a5d6772

Jeff Sharkey   commited 2018-04-13 19:32:25 +00:00
fbb37a7f61
Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
am: 53d1a8d88d

Change-Id: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda

Chalard Jean   authored and   android-build-merger   commited 2018-04-13 02:14:02 -07:00
527920ddeb
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
058cd31b1b
Merge "Added tests for MultipathPolicyTracker." into pi-dev
am: 471d6f0465

Change-Id: I2f47dd30f44722a0611967ce5375aa164f40c718

Remi NGUYEN VAN   authored and   android-build-merger   commited 2018-04-10 20:37:06 -07:00
9f4c89d433
Merge "Added tests for MultipathPolicyTracker." into pi-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2018-04-11 02:53:14 +00:00
471d6f0465
Added tests for MultipathPolicyTracker.
Test: atest com.android.server.connectivity.MultipathPolicyTrackerTest
Bug: b/72631572
Bug: b/72877610
Change-Id: I33d9cd77948ff76008a125e4e2786fbbc2b03032

Remi NGUYEN VAN   commited 2018-04-10 15:27:59 +09:00
abdb6e76b2
Trigger NetworkCallback events when private DNS usage has changed.
Relies on events sent from netd in aosp/578162.

Test: Added tests to ConnectivityServiceTest. Added a new test
class DnsManagerTest. Built a simple app that appears to
receive onLinkProperties events correctly upon manual changes
to the private DNS settings on a Pixel.
Bug: 71828272

Merged-In: I1e6c54ba016f6a165a302bd135a29d9332aaa235
Merged-In: I7705412803fb9aa707a18ae5a1c50292e084d851
Change-Id: I3223c1285a73d5d531c5051ce70007857caa57e3
(cherry picked from commit f4977499c4)

dalyk   authored and   Erik Kline   commited 2018-04-09 23:04:20 -07:00
0e57ff69ef
Merge "Trigger NetworkCallback events when private DNS usage has changed." am: ee7a76bfea
am: f6e025bddc

Change-Id: I1e6c54ba016f6a165a302bd135a29d9332aaa235

Erik Kline   authored and   android-build-merger   commited 2018-04-09 22:13:36 -07:00
924e61e1df
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
80c8724285
Trigger NetworkCallback events when private DNS usage has changed.
Relies on events sent from netd in aosp/578162.

Test: Added tests to ConnectivityServiceTest. Added a new test
class DnsManagerTest. Built a simple app that appears to
receive onLinkProperties events correctly upon manual changes
to the private DNS settings on a Pixel.
Bug: 71828272
Change-Id: I68665aaf74b7d59182cc6f9586b80b55b0dfe427

dalyk   commited 2018-04-09 16:45:22 -04:00
f4977499c4
Merge "Move the logic of (re)evaluation of Private DNS" into pi-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2018-04-06 06:48:25 +00:00
857cc19432
Move the logic of (re)evaluation of Private DNS
Moves this out of ConnectivityService and into each NetworkMonitor
(where it's more self-contained).

Test: as follows
    - builds, flashes, boots
    - runtest frameworks-net passes
    - manual testing with working and non-working hostnames behaves
      somewhat (but not entirely) as expected, and not always quickly
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 77140445
Merged-In: I5dc90ecfe6f6f10967b7501645ad8e030cb38982
Merged-In: Ida4967d22f0781524f0f269e30e653b8ec867258
Change-Id: Ic4322af3cb49149f2d975cb31f54b2ac7927f907
(cherry picked from commit 076bd3d8e3)

Erik Kline   commited 2018-04-05 19:18:47 -07:00
ab8b0f7c38
Merge "Move the logic of (re)evaluation of Private DNS" am: 5fa5c6a45f
am: 7eca54a614

Change-Id: I5dc90ecfe6f6f10967b7501645ad8e030cb38982

Erik Kline   authored and   android-build-merger   commited 2018-04-05 18:53:08 -07:00
5ad6030802
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
9ba93eb131
Move the logic of (re)evaluation of Private DNS
Moves this out of ConnectivityService and into each NetworkMonitor
(where it's more self-contained).

Test: as follows
    - builds, flashes, boots
    - runtest frameworks-net passes
    - manual testing with working and non-working hostnames behaves
      somewhat (but not entirely) as expected, and not always quickly
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 77140445
Change-Id: Ic4322af3cb49149f2d975cb31f54b2ac7927f907

Erik Kline   commited 2018-04-05 15:17:38 -07:00
076bd3d8e3
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
8d2b143a65
Merge "Force creation of Socket upon Transform application" am: b5615519e0
am: c3fb781d74

Change-Id: I2034448a22461d51728e66bcc0e965821aa4a42f

Benedict Wong   authored and   android-build-merger   commited 2018-04-04 12:52:00 -07:00
91d76f41a5
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 de3816b30d)

Benedict Wong   commited 2018-04-04 10:33:49 -07:00
f23b199a02
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
af07949fe5
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
653a5c203c
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
de3816b30d
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
2212205a5b
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
34633df7e9
Merge "Fix PermissionMonitorTest that has been failing." into pi-dev
am: 6e66280d35

Change-Id: Ifb04fdda2b54b0bde8b6eeead3e0240d5cc1ff79

Chalard Jean   authored and   android-build-merger   commited 2018-04-02 20:14:29 +00:00
6c1be75558
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
24c949481e
Fix PermissionMonitorTest that has been failing.
The fail is related to a recent fix to PermissionMonitor
that went into pi-dev only : ag/3799094, which fixed getting
the remote package name for the correct macro user instead of
the default. That fix had broken the test, this change fixes it.

Test: test now passes
Bug: 77315205
Change-Id: I26f8276eafe80478d5fefcff92e7dc2f12128bb4

Chalard Jean   commited 2018-04-02 07:44:21 +00:00
d5fa0ef148
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
ce5d395bb1
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
167464627a
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 6f124c455f)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1

Remi NGUYEN VAN   commited 2018-03-30 18:58:18 +09:00
1a81431b16
Merge "Mark networks with OEM_PAID always restricted" am: 99613ff80b
am: 88650629fa

Change-Id: I88500f6add4f1a6c8a77eb976a489c11c7dc5b6d

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 09:05:09 +00:00
1f594309aa
Merge "Limit the number of routes for performance" am: 9b4dc28bd3
am: 782450b691

Change-Id: I1fcf34b553b4a7cbadd0a2a7bf697140e948243e

Chalard Jean   authored and   android-build-merger   commited 2018-03-30 08:58:44 +00:00
cc039fddf8
Merge "Limit the number of routes for performance" into pi-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2018-03-30 08:48:25 +00:00
3957f6dc0d
Merge "Require explicitly supplied truncation length" am: 83f01be8d5
am: 8c65f40004

Change-Id: I347bfd43be54d162dea831770ab08d792ea1443f

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 07:45:04 +00:00
63c49de81c
Merge "Mark networks with OEM_PAID always restricted"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 07:00:54 +00:00
99613ff80b
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
fa0f612d29
Merge "Clarify UDP encapsulation socket API" am: b676aef03c
am: 9ef3a6cf3f

Change-Id: I5fcf79691c670e710e46b3a9eac8a580c44028fb

Lorenzo Colitti   authored and   android-build-merger   commited 2018-03-30 06:48:17 +00:00
4424759827
Limit the number of routes for performance
In evaluating whether "most" of the addressing space is
covered, the list of routes are obtained from a third-party
app, so it's possbile the system service stalls unless
some limit is enforced on how much work it has to do.
This change limits the number of routes to 400, as determined
by time measurement on various devices.

Bug: 74176086
Test: runtest framework-net
Change-Id: Ie4a96098bc044ade87b188839586f14dd101c100

Chalard Jean   commited 2018-03-30 15:41:50 +09:00
e876507ce9
Merge "Limit the number of routes for performance"
Chalard Jean   authored and   Gerrit Code Review   commited 2018-03-30 06:40:29 +00:00
9b4dc28bd3
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 b0571f55db)

Benedict Wong   commited 2018-03-29 23:07:42 -07:00
ce07a39d78
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 9660f605b6)

Benedict Wong   commited 2018-03-29 23:05:42 -07:00
1d51c1161b
Merge "Require explicitly supplied truncation length"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 04:59:22 +00:00
83f01be8d5
Merge "Clarify UDP encapsulation socket API"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-03-30 04:58:47 +00:00
b676aef03c
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
42e2185505