Commit Graph

1331 Commits

Author SHA1 Message Date
Chenbo Feng
b127d68ca2 Merge "Don't check qtaguid file unless using them" am: 0ce43570f5
am: 8eb31202df

Change-Id: I6be72bb22da1aeed8dfe5eb4bbb05d8cfd9b4257
2018-09-28 12:32:50 -07:00
Chenbo Feng
8eb31202df Merge "Don't check qtaguid file unless using them"
am: 0ce43570f5

Change-Id: I53e5746c31bbfe3d660d730fbabcd1d241132221
2018-09-28 12:15:54 -07:00
Treehugger Robot
0ce43570f5 Merge "Don't check qtaguid file unless using them" 2018-09-28 18:35:47 +00:00
Benedict Wong
319d308884 Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS" am: 4f94cbe619
am: e2778b09ad

Change-Id: I6f6e3d2a43172459ef5bc88b6fc3d3fbbfd04a2f
2018-09-19 17:23:54 -07:00
Benedict Wong
e2778b09ad Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS"
am: 4f94cbe619

Change-Id: I071f4f1c797d03776d1dd38f5734c6d07e2cecc7
2018-09-19 17:10:42 -07:00
Benedict Wong
4f94cbe619 Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS" 2018-09-19 21:46:05 +00:00
Chenbo Feng
5c0232c572 Don't check qtaguid file unless using them
The proc file of xt_qtaguid module is not necessarily exist on future
devices. We should only check it if the device need to read the stats
file for network usage information.

Bug: 79938294
Test: NetworkUsageStatsTest TrafficStatsTest
Change-Id: I5ac6feef8b9a26daa68b381a985925e24b0d80af
2018-09-14 16:13:14 -07:00
Benedict Wong
2b6a14ecf3 Re-enable checks for MANAGE_IPSEC_TUNNELS
This patch ensures that creation and modification of IPsec tunnels
requires the MANAGE_IPSEC_TUNNELS appop.

Bug: 115685048
Test: IpSecManagerTunnelTest fails without appops set
Change-Id: I6c60a2573ca521717877f36e28a392b0d3b62754
2018-09-13 16:50:35 -07:00
Shaotang Li
77586e8885 Merge changes into stage-aosp-master
am: 5dfc4f5e4c

Change-Id: I46d9e80464652ac98c7b745686aaa490d57a8ab0
2018-09-13 00:56:38 -07:00
Shaotang Li
8229800bec Merge changes into stage-aosp-master
am: d3cf660391

Change-Id: I6fa8268060713303c3d999fec0fd91aa78849872
2018-09-13 00:52:20 -07:00
Android Build Merger (Role)
5dfc4f5e4c Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Android Build Merger (Role)
d3cf660391 Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Benedict Wong
52bdf5bad9 Merge "Use UID as requestID" am: 583f3632e5
am: 0372703a46

Change-Id: I0d9fb770482e72f3b017702ffb7ec144a64462e0
2018-09-12 15:22:39 -07:00
Benedict Wong
0372703a46 Merge "Use UID as requestID"
am: 583f3632e5

Change-Id: Icef3693f5911c8f69076e0990392e28c693cbc22
2018-09-12 14:35:27 -07:00
Andreas Gampe
92b4c652df Merge changes into stage-aosp-master
am: 2d5b5c704d

Change-Id: If60b6361f323c651510900344d75ce5fa7db17c3
2018-09-10 16:01:58 -07:00
Andreas Gampe
711e7a81bd Merge changes into stage-aosp-master
am: 3e612f3df1

Change-Id: I4e707c0172a858db97d903ad79dadb37c7a910a7
2018-09-10 15:58:08 -07:00
Android Build Merger (Role)
2d5b5c704d Merge changes into stage-aosp-master 2018-09-10 22:43:03 +00:00
Android Build Merger (Role)
3e612f3df1 Merge changes into stage-aosp-master 2018-09-10 22:43:03 +00:00
Benedict Wong
6d0cd0b7b6 Use UID as requestID
This change makes all requestIDs use the UID of the creator, ensuring
that rekeys always use the same requestID. This also has the nice
property of separating app's resources from each other, and allowing for
identification of which app/UID allocated the resources from
command-line dumps (eg ip xfrm state show)

Bug: 111841561
Test: Updated tests & passing taimen
Change-Id: I4f1eadcdb795766ae4682b15e41727359c52fa38
2018-09-04 14:25:13 -07:00
Benedict Wong
9cdc11d5ef Merge "Use tunnel local/remote addresses in security policies" am: 8424a78b75
am: 6b66877f18

Change-Id: Id515c008da62a67ecb36ff60a6cfd646074061ab
2018-08-31 11:12:55 -07:00
Benedict Wong
6b66877f18 Merge "Use tunnel local/remote addresses in security policies"
am: 8424a78b75

Change-Id: Ib245f56807848a7908aca80b2f080073600a7722
2018-08-31 11:01:31 -07:00
Benedict Wong
38e52973d2 Use tunnel local/remote addresses in security policies
This patch changes tunnel mode security policies to use the actual
tunnel's local and remote addresses to select the SA.
This prevents the kernel from calling xfrm_get_saddr(), which does a
route lookup, potentially resolving an incorrect saddr.

Bug: 79384676
Test: CTS, IpSecService* tests passing
Change-Id: I8223225e2363a79591a0bb0040aa8619cf84c184
2018-08-30 10:55:02 -07:00
Remi NGUYEN VAN
fb294eb16e Merge "Add DhcpServer" am: e3a0f42e8e
am: 7f3130c488

Change-Id: Ic3b1cd87389ade162c1c7441132f3e0451f1b78c
2018-08-28 20:42:08 -07:00
Remi NGUYEN VAN
7f3130c488 Merge "Add DhcpServer"
am: e3a0f42e8e

Change-Id: I4ce2cb61d084b37681e1f5103a4e31d4af1cae3e
2018-08-28 20:32:54 -07:00
Remi NGUYEN VAN
c9fc125bb4 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
2018-08-28 12:50:47 +09:00
Remi NGUYEN VAN
172c9ae72a Merge "Fix testRegisterUsageCallback failure in setUp" am: 3e4562b391
am: 7026ccd445

Change-Id: I5723e356d1b6aa1a71ba693598a5796900fd9ddc
2018-08-17 02:02:08 -07:00
Remi NGUYEN VAN
7026ccd445 Merge "Fix testRegisterUsageCallback failure in setUp"
am: 3e4562b391

Change-Id: I516bab9b9b6c5f48845f18d0e2ab8b47f0f809de
2018-08-17 01:48:48 -07:00
Remi NGUYEN VAN
3e4562b391 Merge "Fix testRegisterUsageCallback failure in setUp" 2018-08-17 01:51:10 +00:00
Mathew Inwood
add296617f Merge "Add @UnsupportedAppUsage annotations" am: 90660f8990
am: 7a5bf4e2dd

Change-Id: I99215dd5430968df2e2dd514d21b396b00c1403e
2018-08-16 03:29:58 -07:00
Mathew Inwood
b5d1f26d20 Merge "Add @UnsupportedAppUsage annotations" am: d08509363c
am: d825eeefa4

Change-Id: I52585645e23519cfc6d216e344710ad76aeea9e8
2018-08-16 03:10:41 -07:00
Mathew Inwood
7a5bf4e2dd Merge "Add @UnsupportedAppUsage annotations"
am: 90660f8990

Change-Id: I8f8c9106b494caa6dc5ad405111f2a285a01e49f
2018-08-15 10:12:01 -07:00
Mathew Inwood
90660f8990 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 15:41:26 +00:00
Mathew Inwood
d825eeefa4 Merge "Add @UnsupportedAppUsage annotations"
am: d08509363c

Change-Id: I380a6ba241998dbc694716986521dfcbf66fa7d2
2018-08-15 07:57:40 -07:00
Mathew Inwood
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: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
2018-08-14 14:44:29 +01:00
Mathew Inwood
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: I5d15d50344d7178617418846917f693cfabf006b
Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
2018-08-14 14:25:44 +01:00
Remi NGUYEN VAN
2d18dc94ac Fix testRegisterUsageCallback failure in setUp
LocalServices.addService in NetworkStatsService is currently failing
with IllegalStateException "Overriding service registration". Setting up
LocalServices in the test to avoid this issue might be possible, but
moving the registration to the only non-test caller of that constructor
as done here solves the issue and avoids side-effects from a constructor.

Test: atest FrameworksNetTests does not choke on this test
Bug: b/78487385
Bug: b/80082746
Change-Id: I5dba98fc79aec0800c8b71e6c7e23d1cfbcae852
Merged-In: I884a7a8bd7db3fcd220b785ba9914ac8c77720f0
(Clean cherry-pick of go/ag/4061255)
2018-08-14 18:14:09 +09:00
kopriva
bc81ceab91 docs: added Android P behavior change note to untagSocket reference
am: c134e24a77

Change-Id: I814224210475078c4ab01f53e42202a538c8a444
2018-07-26 17:17:16 -07:00
kopriva
c134e24a77 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
2018-07-26 20:29:39 +00:00
Chiachang Wang
7821223c41 Merge "DO NOT MERGE: use legacy way to get tcp packet count" into pi-dev
am: 15cbfefb03

Change-Id: I7d0498bece672a482e2204424ca5d7780a6c7dc8
2018-07-22 18:57:43 -07:00
Neil Fuller
fa52de540c Merge "Track constructor changes in libcore/" am: f94eb29500
am: 33a26e3ee4

Change-Id: I1205219e1fead95ecdb8f9ce5d503ec416baf4c2
2018-07-05 05:25:35 -07:00
Neil Fuller
33a26e3ee4 Merge "Track constructor changes in libcore/"
am: f94eb29500

Change-Id: I344d9210bd173f78651318366c852f65afe969d6
2018-07-05 05:14:26 -07:00
Neil Fuller
4b6b8dee0d Track constructor changes in libcore/
The 2-arg constructor is being removed.

Test: build / boot
Bug: 111055375
Change-Id: I72413a8c7885f9514a88f59deb649fa755deff92
2018-07-03 19:22:45 +01:00
junyulai
0b4a66a1c2 DO NOT MERGE: use legacy way to get tcp packet count
The current networkStats getIfaceStats implementation check if
bpf is enabled, and use bpf to get all traffic stats. However,
the bpf implementation did not contain tcp packet counts. So
data stall detection in DcTracker could not get the packet
count to trigger data stall. Hence the data stall never
triggers for device that enables bpf.

This solution is for short term solution that rollback the
design to use xt_qtaguid for bpf enabled device.

Bug: 110443385
Test: 1. fake data stall to trigger data stall recovery
      2. enable debug log to make sure tcp packet count is
         correct
      3. runtest frameworks-net
      4. run cts -m CtsUsageStatsTestCases

Change-Id: I1ce9e92fe194da2ea0a3eec014fd50bb50cdd44a
2018-06-26 15:46:48 +08:00
Nathan Harold
48474a78ad Merge "Disable the AppOp Restriction for IpSec Tunnels" into stage-aosp-master
am: bda7c96038

Change-Id: I98f2a964b3035daf93b54dc2b72561b16d2ded92
2018-06-09 09:25:32 -07:00
Xin Li
a2734cfc87 Skip ef9f2740a7 in proposed pi-dev-plus-aosp-without-vendor merge.
am: 97b2524e94

Change-Id: I1a6504799a83d2736881b149a5181e78bc212193
2018-06-09 02:18:01 -07:00
nharold
46744cdd5d [automerger skipped] Merge changes from topic "ipsec-sync-with-pi" am: a8cfde3d35
am: ef9f2740a7  -s ours

Change-Id: Ib18c4a534b8b1f611d0d5b02897afe73055fed6e
2018-06-08 18:31:25 -07:00
Nathan Harold
7c250aedb1 Disable the AppOp Restriction for IpSec Tunnels
This CL temporarily removes the AppOp restriction
that disallows creation of IpSec tunnels due to
the lack of the appropriate AppOp in AOSP/master.
When the relevant framework merges out to master,
this CL should be reverted.

Manually merging this due to skipping a merge
conflict at ef9f2740a790feceaa47a24b1a179e93c4ffb5e6

Bug: none
Test: compilation
Change-Id: Ic06c193f85f6bcdd0ead4238825c1add78703cde
2018-06-08 23:23:04 +00:00
Xin Li
97b2524e94 Skip ef9f2740a7 in proposed pi-dev-plus-aosp-without-vendor merge.
Bug: 79597307
Change-Id: I8ac04fdd94b069434e2f00b0bfab63eb916f6129
2018-06-08 14:36:00 -07:00
nharold
a8cfde3d35 Merge changes from topic "ipsec-sync-with-pi"
* changes:
  Disable the AppOp Restriction for IpSec Tunnels
  Rework Exception Handling for IpSecManager
  Update IpSecManager to use InetAddress and prefixLen
  Add AppOps Checks for MANAGE_IPSEC_TUNNELS
  Add MANAGE_IPSEC_TUNNELS Permission
2018-06-08 17:07:11 +00:00
Nathan Harold
147f7386da Disable the AppOp Restriction for IpSec Tunnels
This CL temporarily removes the AppOp restriction
that disallows creation of IpSec tunnels due to
the lack of the appropriate AppOp in AOSP/master.
When the relevant framework merges out to master,
this CL should be reverted.

Bug: none
Test: compilation
Change-Id: Ic06c193f85f6bcdd0ead4238825c1add78703cde
2018-06-07 18:44:34 -07:00