Hugo Benichi
54edf5df21
Merge "DefaultNetworkEvent: fix two bugs with validation times" am: c0d951c3e0 am: 144d9e9f83
...
am: 51e563aefb
Change-Id: Ide65494bfe095533a06c4b33002fbd260306f8a0
2017-12-11 00:37:22 +00:00
Hugo Benichi
51e563aefb
Merge "DefaultNetworkEvent: fix two bugs with validation times" am: c0d951c3e0
...
am: 144d9e9f83
Change-Id: Iad5a7cda8b73f638aa7db8ae38bdccef1cbeae85
2017-12-11 00:24:33 +00:00
Hugo Benichi
c0d951c3e0
Merge "DefaultNetworkEvent: fix two bugs with validation times"
2017-12-10 23:54:13 +00:00
Hugo Benichi
71a1b532b5
DefaultNetworkEvent: fix two bugs with validation times
...
This patch fixes two bugs around the validation time calculation for
default network metrics:
- for events representing the absence of a default network, the
validation time was not correctly set to 0.
- for events representing a default network, the validation time was
always set to the duration time. This was overlooked by commit
380a063858 .
Also fix a minor printing padding issue in DefaultNetworkEvent#toString
Test: manually inspected the output of $ adb shell dumpsys connmetrics
while enabling and disabling wifi.
Change-Id: I0eb4ccdf7a61d3097d0661104cb40d738e59772a
2017-12-09 13:02:51 +09:00
Hugo Benichi
fc9696e489
Merge "Expose the MacAddress class in the api"
2017-12-05 23:58:32 +00:00
Hugo Benichi
f5cf390e41
Merge "Fix bug in MacAddress.fromString()" am: cdb84d2fc7 am: 9d077ecd9d
...
am: 5d2bd6bf0c
Change-Id: I7df23a45618825b874658ccbbf1d1fda6b164954
2017-12-05 10:09:35 +00:00
Hugo Benichi
5d2bd6bf0c
Merge "Fix bug in MacAddress.fromString()" am: cdb84d2fc7
...
am: 9d077ecd9d
Change-Id: If67d0b8fcc2270d4b152d4e07c79725b457574c6
2017-12-05 10:01:19 +00:00
Hugo Benichi
9d077ecd9d
Merge "Fix bug in MacAddress.fromString()"
...
am: cdb84d2fc7
Change-Id: If4c85f0a5ea259f53f9cffa6eacb58fcde1fd1df
2017-12-05 09:47:50 +00:00
Jeff Sharkey
e888a8c606
Merge "API for apps to tag sockets with their own UID."
2017-12-05 05:00:46 +00:00
Hugo Benichi
d2c5b1925b
Fix bug in MacAddress.fromString()
...
Test: runtest frameworks-net
Bug: 69390696
Change-Id: I83f01e4915092e08ed201d9b6738bb02498d3bba
2017-12-05 13:14:08 +09:00
nharold
b8ab1d404b
Merge "Validate IpSecAlgorithm Length" am: 68b81299d2 am: 5e3d66e78b
...
am: 7a8f0dc0c0
Change-Id: I1a28d860ac7125afc1f82ac17d1834b0121c0e11
2017-12-05 02:46:06 +00:00
nharold
7a8f0dc0c0
Merge "Validate IpSecAlgorithm Length" am: 68b81299d2
...
am: 5e3d66e78b
Change-Id: I1ffaa4de392777c5199a411aef9cd10f4e7c3666
2017-12-05 02:37:14 +00:00
nharold
5e3d66e78b
Merge "Validate IpSecAlgorithm Length"
...
am: 68b81299d2
Change-Id: I23f7612c119e67f9a1647568aeefde38a365f8da
2017-12-05 02:28:10 +00:00
nharold
68b81299d2
Merge "Validate IpSecAlgorithm Length"
2017-12-05 02:13:55 +00:00
Hugo Benichi
12981ff2d8
Expose the MacAddress class in the api
...
Test: built, flashed, $ runtest frameworks-net
Bug: 69390696
Change-Id: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d
2017-12-05 10:30:31 +09:00
Jeff Sharkey
70dc4f4d16
API for apps to tag sockets with their own UID.
...
This enables app A to create a socket, pass it to app B, and have
app B accept blame for the traffic performed on that socket.
Also adds helpful public APIs for tagging raw FileDescriptor sockets
instead of making developers go through shady SocketImpl wrappers.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 63932076
Change-Id: I08925c843974675fc82e4080cec2eaab9ab7cd41
2017-12-04 17:43:40 -07:00
Hugo Benichi
469f4f6010
Merge "MacAddress: light refactors and improve documentation" am: d871cab32d am: 2f7cb5752b
...
am: 13b2fa0f85
Change-Id: Iae0e87bcc9bd9c1ba98319f3b65f18f6743c02a0
2017-12-05 00:06:50 +00:00
Hugo Benichi
13b2fa0f85
Merge "MacAddress: light refactors and improve documentation" am: d871cab32d
...
am: 2f7cb5752b
Change-Id: I1e9948225e7c5ad64fad2e596d03deb3524c411c
2017-12-04 23:51:41 +00:00
Hugo Benichi
2f7cb5752b
Merge "MacAddress: light refactors and improve documentation"
...
am: d871cab32d
Change-Id: I51bb8786ecd7f53e3342625c7a2625007eedfc0f
2017-12-04 23:38:27 +00:00
Nathan Harold
3349b26630
Validate IpSecAlgorithm Length
...
Improve the Validation of IpSecAlgorithm by
explicitly checking the length in addition to
the truncation length (previously an oversight).
In addition, we now check the lengths during
un-parceling, which will catch someone maliciously
manually building a parcel and passing it, bypassing
the checks in the constructor.
Bug: 68780091
Test: runtest -x IpSecAlgorithmTest.java
Change-Id: I8172762617264d34f47d5144336464510f07a701
2017-12-04 15:12:14 -08:00
Hugo Benichi
84bb7fc761
MacAddress: light refactors and improve documentation
...
This patch does some light refactoring in MacAddress to prepare for
exposing MacAddress in the public api:
- documention is improved
- some method names are renamed
- a toSafeString method is added
- a padding bug in the conversion methods outputting strings for
mac addresses is fixed
Bug: 69390696
Test: runtest frameworks-net
Change-Id: I399a97dabc2dfa8df9c5518c8b12484e43ca05c9
2017-12-04 22:34:43 +09:00
Jeff Sharkey
7cf056ac8e
Merge "Clarify docs, sanity check roaming state." am: 419ec05284 am: 63b5615b2a
...
am: f8590d1f79
Change-Id: I59fbe09afc74e94e2f56cb6fd833fc2deb7023e5
2017-11-27 21:48:46 +00:00
Jeff Sharkey
f8590d1f79
Merge "Clarify docs, sanity check roaming state." am: 419ec05284
...
am: 63b5615b2a
Change-Id: If4f09f8a0e32c245552f025f1a61d67f842b1841
2017-11-27 21:39:56 +00:00
Jeff Sharkey
63b5615b2a
Merge "Clarify docs, sanity check roaming state."
...
am: 419ec05284
Change-Id: Ic30d5aaadf2c59978162c53d7e7781847244ce52
2017-11-27 21:30:57 +00:00
Jeff Sharkey
49bcd60a8d
Clarify docs, sanity check roaming state.
...
Update public docs to hide the fact that NetworkCapabilities is only
used inside NetworkRequest as an implementation detail.
Take up less room on the wire when passing NetworkCapabilities around
via NetworkRequest.
Sanity check that the roaming state between NetworkInfo and
NetworkCapabilities is in agreement.
Test: bit FrameworksNetTests:android.net.,com.android.server.net.,com.android.server.connectivity.,com.android.server.ConnectivityServiceTest
Bug: 67040695
Change-Id: I982b4c3c41a140934bbad3b8ca8f12dc3814e86c
2017-11-27 12:47:14 -07:00
Hugo Benichi
90e68c6869
Merge "Light refactors to packet wakeup events." am: e887e2b9c1
...
am: c6dc6baf4f
Change-Id: I4c19f1cdfe7a9fb47aad23a21b0aa0ae8e03277a
2017-11-22 05:27:11 +00:00
Hugo Benichi
c6dc6baf4f
Merge "Light refactors to packet wakeup events."
...
am: e887e2b9c1
Change-Id: I40f637114cbfc04bce4058af0a1f43f38bd461db
2017-11-22 05:19:01 +00:00
Hugo Benichi
e887e2b9c1
Merge "Light refactors to packet wakeup events."
2017-11-22 05:08:50 +00:00
Jonathan Basseri
66e6139b00
Merge "Javadoc cleanup of IpSecManager API." am: d09d106ec0 am: 2a82aa70b5
...
am: 9f6a3431a1
Change-Id: Id10e39da5495f9367332cbc5c754506fc64f3c75
2017-11-22 02:10:32 +00:00
Jonathan Basseri
9f6a3431a1
Merge "Javadoc cleanup of IpSecManager API." am: d09d106ec0
...
am: 2a82aa70b5
Change-Id: I53e9b3d18fda1122f6a8a6300185c743cc26dbf6
2017-11-22 02:00:53 +00:00
Jonathan Basseri
2a82aa70b5
Merge "Javadoc cleanup of IpSecManager API."
...
am: d09d106ec0
Change-Id: Iaf206b0980d3bed14fe6b8318d2073577212b460
2017-11-22 01:51:46 +00:00
Hugo Benichi
2ccba0e0e1
Light refactors to packet wakeup events.
...
This patch uses the recently added MacAddress class in WakeupEvent and
WakeupStats for replacing the byte array representation of dest mac
addresses in packet wakeup events.
Bug: 28806131
Test: runtest frameworks-net
Merged-In: I5a3c76498a4b720f0d9308a65b5dd4b32377d0d1
(partial cherry pick from 884970e0ba )
Change-Id: I878d51d4cc53c6d9a2cc3c55faa15b86156afbd7
2017-11-22 10:09:09 +09:00
Hugo Benichi
884970e0ba
Define PacketWakeup pushed events for statds
...
This patch pushes packet wakeup events collected by
NetdEventListenerService into the statds service.
Example logs from $ adb logcat -b stats
11-20 23:33:25.955 955 972 I [44] : [10014,wlan0,34525,10:e:7e:26:3f:c1,2001:db8:400d:c0b::bc,2001:db8:4:fd00:a00a:dbc8:f5ba:4269,6,5228,49411]
11-20 23:37:05.809 955 1473 I [44] : [10014,wlan0,2048,10:e:7e:26:3f:c1,192.168.0.142,192.168.0.39,6,443,45422]
11-20 23:42:09.233 955 1473 I [44] : [10014,wlan0,2048,10:e:7e:26:3f:c1,192.168.12.238,192.168.0.39,6,443,40160]
11-20 23:55:28.162 955 1207 I [44] : [10059,wlan0,34525,10:e:7e:26:3f:c1,2001:db8:4004:807::200a,2001:db8:4:fd00:a00a:dbc8:f5ba:4269,6,443,42492]
11-20 23:59:18.343 955 1888 I [44] : [10059,wlan0,34525,10:e:7e:26:3f:c1,2001:db8:4004:807::200a,2001:db8:4:fd00:a00a:dbc8:f5ba:4269,6,443,42491]
11-21 00:00:17.952 955 3341 I [44] : [10014,wlan0,34525,10:e:7e:26:3f:c1,2001:db8:400d:c0b::bc,2001:db8:4:fd00:a00a:dbc8:f5ba:4269,6,5228,49411]
11-21 00:13:05.552 955 1473 I [44] : [-1,wlan0,34525,10:e:7e:26:3f:c1,2001:db8:4004:805::200a,2001:db8:4:fd00:a00a:dbc8:f5ba:4269,6,443,38098]
11-21 00:13:50.606 955 1207 I [44] : [-1,wlan0,2048,10:e:7e:26:3f:c1,192.168.5.238,192.168.0.39,6,443,40802]
Bug: 28806131
Test: runtest frameworks-net
Change-Id: I5a3c76498a4b720f0d9308a65b5dd4b32377d0d1
2017-11-21 10:02:03 +09:00
Jonathan Basseri
c61b70d12d
Javadoc cleanup of IpSecManager API.
...
This changes only comments and annotations, which results
in minor API changes.
Bug: 63777932
Test: `make update-api` and visually inspect generated HTML.
Change-Id: I7a7a9244eade6cc55aca17a47e0a838cd6f84cc9
2017-11-20 10:49:59 -08:00
Xin Li
220871a697
Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
...
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.
Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Hugo Benichi
9769872de6
Merge "IP connectivity metrics: NetworkEvents have transports" am: f8fdb06c27 am: f3ada43f6e
...
am: 1b2e6c11e7
Change-Id: If452f742e50344e730f63b7329788b19d13280ec
2017-11-14 12:03:25 +00:00
Hugo Benichi
d80b572c1a
Merge "Add L2~L4 information to packet wakeup logs and metrics" am: 6ee20ca7d3 am: ab15f7fc64
...
am: 4c0b7e52e4
Change-Id: Ia0b300662d4758f31ca583c9cf05f9186b8331aa
2017-11-14 11:55:45 +00:00
Hugo Benichi
1b2e6c11e7
Merge "IP connectivity metrics: NetworkEvents have transports" am: f8fdb06c27
...
am: f3ada43f6e
Change-Id: I8cd50ea805fe3e533c0fc21b220827155cb0d23b
2017-11-14 01:46:23 +00:00
Hugo Benichi
4c0b7e52e4
Merge "Add L2~L4 information to packet wakeup logs and metrics" am: 6ee20ca7d3
...
am: ab15f7fc64
Change-Id: I9dba29b10c824d382b08b16313e49cc8c775f7eb
2017-11-14 01:40:06 +00:00
Hugo Benichi
652056767c
Merge "Add Network security watchlist service" am: e672ab4c0a
...
am: 1aff5336e0
Change-Id: I08c10fccb2a8c814c1bedb6ad2a17b843a5af722
2017-11-14 01:35:24 +00:00
Hugo Benichi
97bfd276fb
IP connectivity metrics: NetworkEvents have transports
...
Also removes netId field from inside NetworkEvent and stop populating
the network_id field of the NetworkEvent field, deprecating it.
Bug: 34901696
Test: runtest frameworks-net,
manually looking at $ adb shell dumpsys connmetrics
Change-Id: I2c36860f976898883714f72f4d18e06da250c6a6
2017-11-13 14:15:51 +09:00
Hugo Benichi
6ee20ca7d3
Merge "Add L2~L4 information to packet wakeup logs and metrics"
2017-11-13 03:58:34 +00:00
Ricky Wai
77518fbbc4
Add Network security watchlist service
...
Partial cherry pick from commit 1a6e667cb6
adding a new INetdEventCallback type.
Bug: 63908748
Test: built, flashed, $ runtest frameworks-net
Change-Id: I1b95cc4e5cbbfbdbd7429d61e2dcb67b90d278bb
Merged-In: I09595178bac0070a867bc5e0501a7bf2c840e398
2017-11-12 22:27:35 +09:00
Hugo Benichi
d921bce5a6
Add L2~L4 information to packet wakeup logs and metrics
...
Example of $ adb shell dumpsys connmetrics list:
...
WakeupStats(wlan0, 21851s, total: 85, root: 0, system: 4, apps: 63, non-apps: 0, no uid: 18, l2 unicast/multicast/broadcast: 85/0/0, ethertype 0x800: 23, ethertype 0x86dd: 62, ipNxtHdr 6: 74, ipNxtHdr 17: 1, ipproto 58: 10)
...
WakeupEvent(06:55:54.094, wlan0, -1, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=216.58.200.110, dstIp=100.112.108.29, srcPort=443, dstPort=46878)
WakeupEvent(06:57:14.379, wlan0, -1, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=58, srcIp=ff02::1, dstIp=fe80::fa00:4:fd00:1)
WakeupEvent(06:57:52.786, wlan0, 1000, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=172.217.27.67, dstIp=100.112.108.29, srcPort=80, dstPort=49360)
WakeupEvent(06:58:02.919, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:809::200a, srcPort=443, dstPort=46197)
WakeupEvent(06:58:05.586, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:803::200a, srcPort=443, dstPort=46096)
Bug: 66869042
Test: runtest frameworks-net
+ manual testing by monitoring $ dumpsys connmetrics list
Change-Id: I03215c0c9fb7feda3e6ceb1b916f61f4ffb15344
2017-11-12 18:51:28 +09:00
Jon Dormody
df7f15e7d8
Merge "Docs: Added a link to Updating Your Security Provider to Protect Against SSL Exploits" into oc-dev am: 459735662f am: 13e959bbec am: d9696eb356
...
am: 5770dfd1e5
Change-Id: Ide1714d289c756891cbfd63db1eb549d4aa0dfbc
2017-11-09 16:58:09 +00:00
Jon Dormody
5770dfd1e5
Merge "Docs: Added a link to Updating Your Security Provider to Protect Against SSL Exploits" into oc-dev am: 459735662f am: 13e959bbec
...
am: d9696eb356
Change-Id: I616cd581d38cdae91c53b31325e08919efd92a8c
2017-11-09 16:42:19 +00:00
Jon Dormody
d9696eb356
Merge "Docs: Added a link to Updating Your Security Provider to Protect Against SSL Exploits" into oc-dev am: 459735662f
...
am: 13e959bbec
Change-Id: Ic15e947e38c10d394081598e2c2886854388996a
2017-11-09 16:26:50 +00:00
Jon Dormody
13e959bbec
Merge "Docs: Added a link to Updating Your Security Provider to Protect Against SSL Exploits" into oc-dev
...
am: 459735662f
Change-Id: I31f036fa2365084454ac7899d92580e985bd9f21
2017-11-09 16:17:35 +00:00
Jon Dormody
459735662f
Merge "Docs: Added a link to Updating Your Security Provider to Protect Against SSL Exploits" into oc-dev
2017-11-09 16:05:13 +00:00
Ricky Wai
a3e562cd8f
Merge "Add Network security watchlist service"
2017-11-09 13:35:12 +00:00