Commit Graph

2992 Commits

Author SHA1 Message Date
Hugo Benichi
f9cf8728b7 Merge "NetdEventListener: add rolling log of connect and dns stats" am: 64ef2a4d28 am: a3e7c1a3db
am: 47fb2aa929

Change-Id: I2a46f705a2a28c1e09d50a853f11edef13ad6821
2017-10-24 00:35:31 +00:00
Hugo Benichi
47fb2aa929 Merge "NetdEventListener: add rolling log of connect and dns stats" am: 64ef2a4d28
am: a3e7c1a3db

Change-Id: Iaad5f5b142209ce36f70249a438b3dd66fb92f07
2017-10-24 00:25:11 +00:00
Hugo Benichi
a3e7c1a3db Merge "NetdEventListener: add rolling log of connect and dns stats"
am: 64ef2a4d28

Change-Id: I7f25f4ed42f0aecea7a1bb09b8c65a5d2e4a84cd
2017-10-24 00:14:48 +00:00
Hugo Benichi
64ef2a4d28 Merge "NetdEventListener: add rolling log of connect and dns stats" 2017-10-23 23:54:53 +00:00
Hugo Benichi
ab20975c74 NetdEventListener: add rolling log of connect and dns stats
This patch adds a rolling time order logs of basic statistics of
connect and dns, grouped by network id and including:
 - average error rate
 - average latency
 - max latency
 - total number of operations

The log is segmented in buckets of 5 minutes, and covers the last 4
hours.

Note that only blocking connect() calls latencies are recorded with the
current netd logging infrastructure.

Example of logs:
05:30:00.000: {netId=100, WIFI, dns avg=92ms max=525ms err=00.0% tot=37, connect avg=0ms max=23ms err=00.0% tot=25}
05:35:00.000: {netId=100, WIFI, dns avg=94ms max=537ms err=05.3% tot=57, connect avg=0ms max=0ms err=00.0% tot=69}
05:40:00.000: {netId=100, WIFI, dns avg=220ms max=350ms err=00.0% tot=4, connect avg=0ms max=0ms err=00.0% tot=2}
05:45:00.000: {netId=100, WIFI, dns avg=112ms max=113ms err=00.0% tot=1, connect avg=0ms max=0ms err=00.0% tot=1}
05:50:00.000: {netId=100, WIFI, dns avg=131ms max=269ms err=00.0% tot=2, connect avg=0ms max=0ms err=00.0% tot=1}

Bug: 65700460
Test: runtest frameworks-net
Change-Id: I54e76d18fbaaa92639fb675f93ea90b7615fd6bf
2017-10-21 22:25:09 +09:00
Benedict Wong
c35ca6de37 Merge "Add support for AES-GCM-ESP as an IPSec algorithm" am: b6df7f0d35 am: d3a5792024 am: f92bfc3b77
am: 9c6f24d1ee

Change-Id: Ie9a43c7f0519a2d7ac3326944608190503804483
2017-10-19 17:48:53 +00:00
Benedict Wong
9c6f24d1ee Merge "Add support for AES-GCM-ESP as an IPSec algorithm" am: b6df7f0d35 am: d3a5792024
am: f92bfc3b77

Change-Id: I49932a5fc048b4a60512fac45a3537f050397168
2017-10-19 17:37:22 +00:00
Benedict Wong
d3a5792024 Merge "Add support for AES-GCM-ESP as an IPSec algorithm"
am: b6df7f0d35

Change-Id: Ic099206a28c4f21fa796969c953a8d4e81e8495b
2017-10-19 17:14:53 +00:00
Benedict Wong
0febe5ece5 Add support for AES-GCM-ESP as an IPSec algorithm
Allows native AES-GCM-ESP to be used as an IPSec transport/tunnel mode
algorithm with kernel support

Bug: 63589918
Test: IPsecService tests added, existing ones pass
Change-Id: Ie1a9a902be205f269aa37bf956198f2e5b177c21
2017-10-18 11:22:24 -07:00
Hugo Benichi
7472b72d4d Merge "LinkProperties: fix some indentation issues" am: a162726df7 am: e3b6b636cf am: a63788076a
am: 944e080c22

Change-Id: I0902027750cc797c950ed375832dcc379bbdb93b
2017-10-10 14:42:24 +00:00
Hugo Benichi
944e080c22 Merge "LinkProperties: fix some indentation issues" am: a162726df7 am: e3b6b636cf
am: a63788076a

Change-Id: Ife901fd1c9c30b3864ddce61326f2d5caacd0bae
2017-10-10 14:31:48 +00:00
Hugo Benichi
e3b6b636cf Merge "LinkProperties: fix some indentation issues"
am: a162726df7

Change-Id: If9bc7cf980aa14880dbf6cc43bc86cc269d306cb
2017-10-10 14:13:45 +00:00
Treehugger Robot
a162726df7 Merge "LinkProperties: fix some indentation issues" 2017-10-10 14:02:35 +00:00
Hugo Benichi
bd87a3934c LinkProperties: fix some indentation issues
Test: no functional change
Change-Id: I469bba154feb382156e56043d83f066a5bd658aa
2017-10-10 18:25:50 +09:00
nharold
3aa4caab60 Merge "Merge "Cosmetic Cleanups for IpSecService" am: 5ade9a228d am: 0bdb9a6e00 am: cc51ef0a47" into oc-mr1-dev-plus-aosp
am: 7261ade5eb

Change-Id: I0624d4df68ba2bd6522da7e3ae14f13b7f2bfbc9
2017-10-05 01:53:29 +00:00
nharold
95d36dd165 Merge "Cosmetic Cleanups for IpSecService" am: 5ade9a228d am: 0bdb9a6e00
am: cc51ef0a47

Change-Id: I0a9c52ca26ad1b7e4505f7c9dc32ad9550b62afc
2017-10-05 01:07:53 +00:00
nharold
0bdb9a6e00 Merge "Cosmetic Cleanups for IpSecService"
am: 5ade9a228d

Change-Id: If47968dbd55f8f38f9e8dda4d78a0e2e41827da8
2017-10-05 00:44:37 +00:00
nharold
19d69c61fa Merge changes from topic "ipsec-svc-cleanup" am: 9778c7884f am: ae61e0c6e8 am: 4e793fd0b5
am: b87c060ec7

Change-Id: I7418f23141b26f23555397d231e8a73692c04085
2017-10-04 21:14:17 +00:00
nharold
b87c060ec7 Merge changes from topic "ipsec-svc-cleanup" am: 9778c7884f am: ae61e0c6e8
am: 4e793fd0b5

Change-Id: Ib7eae5c9e223493281524e862979e16d25984dde
2017-10-04 20:53:04 +00:00
nharold
ae61e0c6e8 Merge changes from topic "ipsec-svc-cleanup"
am: 9778c7884f

Change-Id: Ide81ae76bd05ba3a2cc7c06c072306d30a489057
2017-10-04 20:24:10 +00:00
Nathan Harold
d6f50b260d Cosmetic Cleanups for IpSecService
This is a follow-up CL to address comments
on aosp/466677
-Rename ManagedResourceArray.get()
-Comment cleanup

Bug: 38397094
Test: runtest frameworks-net
Change-Id: I6fbdd89c4a864fe1d8a19c68947f582d7b1f0f21
2017-10-04 13:04:55 -07:00
Nathan Harold
19ce70b089 Add equals() for IpSecAlgorithm and IpSecConfig
Add equality testing methods to support tests
for parceling and un-parceling IpSecConfig.

Bug: 38397094
Test: runtest -x IpSecConfigTest.java
Change-Id: I31e318334d39ed6e9daf5ec8f3be7dcec75e12ad
2017-10-03 19:45:58 -07:00
Nathan Harold
a10003d5de Input Validation for IpSecService
All of the input to IpSecService over the Binder
interface needs to be validated both for sanity
and for safety.

-Sanity check all the parameters coming from binder.
-Added setters for IpSecConfig to decouple the test
 from the IpSecManager. This was needed because the
 input validation caused the tests to fail due to a
 null parameter that was previously un-tested.
-Added the mode flag to the IpSecConfig bundle this
 oversight was found during testing.
-Expose the getResourceId() methods for testing in
 UdpEncapsulationSocket, SecurityParameterIndex, and
 IpSecTransform classes.
-Remove the unneeded getIpSecConfig() from
 IpSecTransform: unneeded now that we can synthesize
 configs.

Bug: 38397094
Test: runtest frameworks-net
Change-Id: I5241fc7fbfa9816d54219acd8d81a9f7eef10dd4
2017-10-03 19:45:55 -07:00
Hugo Benichi
124b3e7738 Merge "DO NOT MERGE Ignore DUN in describeImmutableDifferences" into oc-mr1-dev
am: 9d5f50a9f8

Change-Id: I0236132b8b497af5b1c26aa44e6494fe0510cb6d
2017-10-02 11:10:37 +00:00
Hugo Benichi
9d5f50a9f8 Merge "DO NOT MERGE Ignore DUN in describeImmutableDifferences" into oc-mr1-dev 2017-10-02 10:57:01 +00:00
Hugo Benichi
a8f395702d DO NOT MERGE Ignore DUN in describeImmutableDifferences
This patch changes describeImmutableDifferences in NetworkCapabilities
to ignore differences in NET_CAPABILITY_DUN, so that updateCapabilities
in ConnectivityService to not report wtf errors when a NetworkAgent
degrades its NetworkCapabilities object by removing NET_CAPABILITY_DUN.

Bug: 65257223
Test: runtest frameworks-net
Change-Id: I115ed1b366da01a3f8c3c6e97e0db8ce995fd377
2017-10-02 15:03:57 +09:00
Jean Chalard
758d1e1ef7 Merge "Do not throw on call to isTetheringSupported w/o permission"
am: 6201cc6f27

Change-Id: Ie2ed67525e719104cef1537568f944b77d5f5e4e
2017-09-28 07:47:30 +00:00
Chalard Jean
092d50d1bd Do not throw on call to isTetheringSupported w/o permission
...just return false instead.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked that it
Test: doesn't with it.

Merged-In: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907
Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8
(cherry picked from commit 8f76fc38ec)
2017-09-28 16:34:39 +09:00
Jean Chalard
f3b169c8e6 Merge "Adds necessary permissions to system apis"
am: b4a5933a62

Change-Id: Ifa5d94cdd883c3e1b983c985c0c17fe61e864352
2017-09-27 09:58:51 +00:00
Udam Saini
c3b640cf48 Adds necessary permissions to system apis
adds privileged permission for getCaptivePortalServerUrl
adds tether privileged permission for
startTethering,isTetheringSupported

bug:62348162

Test: make and manual testing
Change-Id: I8eb8e3c9dcd7201abe9ea303ee57fe99073d67eb
2017-09-27 12:14:37 +09:00
Chalard Jean
a11a4c7198 Merge "Do not throw on call to isTetheringSupported w/o permission" into oc-mr1-dev am: e545f00e10
am: 47cfcef09c

Change-Id: I9eb78b72bdf043e4917f6d0d7495b65cfa1114db
2017-09-27 02:21:11 +00:00
Chalard Jean
47cfcef09c Merge "Do not throw on call to isTetheringSupported w/o permission" into oc-mr1-dev
am: e545f00e10

Change-Id: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907
2017-09-27 02:12:24 +00:00
nharold
a61d0899de Merge changes from topic "re-enable-ipsec" am: 680525c742 am: 8d306cd78a am: 80107540bb
am: 80b90ed99a

Change-Id: Idffe4296539c6f0db00ce3ec2e5241224ece39b4
2017-09-26 22:49:36 +00:00
Nathan Harold
7bbe9c70f3 Re-Enable Starting of the IpSecService am: b72821747c am: f434a6d308 am: 686a8282bb
am: 458b8cd302

Change-Id: Ic492c58b8c9b56f870c99336e82fd8d05c9e8969
2017-09-26 22:48:25 +00:00
nharold
80b90ed99a Merge changes from topic "re-enable-ipsec" am: 680525c742 am: 8d306cd78a
am: 80107540bb

Change-Id: I13a7134864a648aff9338fda044b3bffd653119e
2017-09-26 22:39:01 +00:00
Nathan Harold
458b8cd302 Re-Enable Starting of the IpSecService am: b72821747c am: f434a6d308
am: 686a8282bb

Change-Id: Ia24348d585b2f1050dafd161eafcdadf0edd82c0
2017-09-26 22:37:44 +00:00
nharold
8d306cd78a Merge changes from topic "re-enable-ipsec"
am: 680525c742

Change-Id: Ia1d1f3981a9dd1eb8f60631d318211daf135d575
2017-09-26 22:13:20 +00:00
Nathan Harold
f434a6d308 Re-Enable Starting of the IpSecService
am: b72821747c

Change-Id: I1f64aa2fdf1cce6dea91427eda65c4b8ee6f6b02
2017-09-26 22:11:58 +00:00
nharold
680525c742 Merge changes from topic "re-enable-ipsec"
* changes:
  Re-Expose IpSecService API Surface
  Re-Enable Starting of the IpSecService
2017-09-26 21:46:39 +00:00
Chalard Jean
8f76fc38ec Do not throw on call to isTetheringSupported w/o permission
...just return false instead. This will change in P.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked it
Test: doesn't with it.

Bug: 65404184

Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8
2017-09-26 19:25:48 +09:00
Jake Wharton
89d62c144a Implement Closeable on LocalServerSocket.
Bug: 37013067
Test: existing ones still pass
Change-Id: I78402ebb19a592fc3960eb6200cb5ad436a7b344
2017-09-20 12:23:52 -04:00
Hugo Benichi
14676c5da4 Merge changes Ied9d0cec,I3087f446,Ibe706872 into oc-mr1-dev
* changes:
  Wakeup packet events: addressing a few comments
  Connectivity metrics: add WakeupStats events
  Connectivity metrics: collect NFLOG wakeup events
2017-09-20 00:58:35 +00:00
Charles He
692b55390f Merge changes from topic "always-on-vpn"
am: cc15c7f8c1

Change-Id: I7391ce7ecab4f8e73912f420d49150ed7210ea6c
2017-09-19 08:01:45 +00:00
Charles He
cc15c7f8c1 Merge changes from topic "always-on-vpn"
* changes:
  Opt-out for always-on VPN: rename API.
  Opt-out for always-on VPN
2017-09-19 07:50:13 +00:00
Hugo Benichi
7b7392581d Merge "Wakeup packet events: addressing a few comments" am: 67d16ec1ab am: a35bbadeba am: 19625788a1
am: 98177f01f7

Change-Id: I7d57c0f2377f44bcf75e18c80c0306bbfccb9591
2017-09-19 07:42:18 +00:00
Hugo Benichi
98177f01f7 Merge "Wakeup packet events: addressing a few comments" am: 67d16ec1ab am: a35bbadeba
am: 19625788a1

Change-Id: I8ca2a01a95acaaca2599563efd6a21e4372d1f95
2017-09-19 07:36:12 +00:00
Hugo Benichi
a35bbadeba Merge "Wakeup packet events: addressing a few comments"
am: 67d16ec1ab

Change-Id: I67b2e54d45a39005e2091a46e8b90d8cc75fe079
2017-09-19 07:21:12 +00:00
Hugo Benichi
0e4b415274 Wakeup packet events: addressing a few comments
This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Merged-In: I4abec57e0c6bc869dc57b5eb54582dd977b64c30

(cherry picked from commit 175b574e27)

Change-Id: Ied9d0cec98685e5a91ed2ca2c81ad88d7ae8d751
2017-09-19 16:14:19 +09:00
Hugo Benichi
175b574e27 Wakeup packet events: addressing a few comments
This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Change-Id: I4abec57e0c6bc869dc57b5eb54582dd977b64c30
2017-09-19 14:07:47 +09:00
Hugo Benichi
c73ff01a14 Merge "Merge changes Ie2676b20,Ie8db6f85 am: 61901ddedd am: 4188432a7b am: 7d16886c7e" into oc-mr1-dev-plus-aosp
am: 24d8238137

Change-Id: I05671ad4513645fff420cbc9fc4f8355bdeaa1f1
2017-09-15 06:51:45 +00:00