Commit graph

108,933 commits

Message SHA1
Merge "Revert^2 "Fix apex_available value in Connectivity"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-07 13:19:24 -08:00
78206ee640
Merge "Add L2capPacketForwarder" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2025-02-07 12:58:48 -08:00
297793e2d2
Adding access methods for local_net_access_map and
local_net_blocked_uid_map

Test: Manually tested this using dumpsys commands
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Bug: 392855578

Change-Id: I61522f3282aa502f20641d3c2692a66638edf706

Sarup Dalwani   authored and   Jacque Li   commited 2025-02-07 15:10:49 -05:00
448eb43f28
Merge "Listen to permission changes in permission monitor" into main
Jacque Li   authored and   Gerrit Code Review   commited 2025-02-07 12:09:53 -08:00
ddf74d8f90
Listen to permission changes in permission monitor
Bug: 369646309
Test: atest
ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.PermissionMonitorTest

Change-Id: I23c524baaee6b9b06a855fb811906e5189ef03fd

Jacque Li   commited 2025-02-07 15:08:09 -05:00
2003e6ee49
Add L2capPacketForwarder
L2capPacketForwarder forwards packets between an L2CAP BluetoothSocket
and a tun fd.

It uses blocking i/o to do so, since the BluetoothSocket API does not
expose a file descriptor to poll() on.

It remains to be seen whether shutdown() on a tun interface fd is
actually implemented. Currently, the test uses a pair of SOCK_SEQPACKET
sockets which require to be shutdown to interrupt the blocking read.

Test: L2capPacketForwarderTest
Change-Id: I03d2a2dd76ec2b71fdb9e3ea7008daa6d1d124fe

Patrick Rohr   commited 2025-02-07 10:50:48 -08:00
65dc1295dc
Revert^2 "Fix apex_available value in Connectivity"
45f0845bd1

Change-Id: I4a059f61fdc30ccc55b11570e679d192aaebd7a9

Colin Cross   authored and   Gerrit Code Review   commited 2025-02-07 07:13:07 -08:00
202eef1789
Merge "Revert "Fix apex_available value in Connectivity"" into main
Colin Cross   authored and   Gerrit Code Review   commited 2025-02-07 07:11:38 -08:00
19ee705439
Revert "Fix apex_available value in Connectivity"
Revert submission 3477737-move_apex_shortcut

Reason for revert: Likely culprit for b/394990888 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:3477737-move_apex_shortcut

Change-Id: I8acc4fe8628cdef2f58f3423576fe5c582fcb023

Chaitanya Cheemala (xWF)   authored and   Gerrit Code Review   commited 2025-02-07 01:38:05 -08:00
45f0845bd1
Merge "Fix apex_available value in Connectivity" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-06 18:21:00 -08:00
d7db8b5ea6
Fix apex_available value in Connectivity
com.android.remoteauth doesn't exist, but the value wasn't being
checked because no apexes depended on the module, triggering a shortcut
that skipped the apex_available check.

Bug: 394664568
Test: builds
Change-Id: I25fd078093fd71a0e0df01fb31be9f2b811108ff

Colin Cross   commited 2025-02-06 13:05:25 -08:00
8ce1a1a403
TcUtils: allow ignoring netlink error code ENOENT
Ignore this error code during DEL operations.

It is returned when the specific thing to be deleted
is not found and is therefore a valid response.

Gets rid of 30+ logs worth of:
  E TcUtils : NLMSG_ERROR message return error: -2
during netd startup (cleanup phase).

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie542f8ff418dbed604eea5b31b87f9b974ccdbcb

Maciej Żenczykowski   commited 2025-02-06 12:56:09 -08:00
f31a45416c
Merge "Add MLD type offset definition" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-06 12:25:46 -08:00
7805afe418
Merge "Prevent calling requestTetheredInterface when using adb over ethernet" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-06 09:12:16 -08:00
cab97196d6
Prevent calling requestTetheredInterface when using adb over ethernet
Otherwise, if adb over ethernet is used, assumeNoInterfaceForTetheringAvailable() tears down the adb
connection because the call to requestTetheredInterface() tears
down IpClient.

Bug: 357332207
Test: atest EthernetManagerTest
Change-Id: I9d04c1a8d39d0accd8061dbfb195ae2359f48e93

chayemme   authored and   Patrick Rohr   commited 2025-02-06 08:11:29 -08:00
a1b788e9ec
Merge "Modify CTLogger to take in the LogListUpdateStatus object instead of individually passed parameters" into main
Bessie Jiang   authored and   Gerrit Code Review   commited 2025-02-06 05:36:57 -08:00
6010c1d4e3
Add MLD type offset definition
Bug: 394689846
Test: TH
Change-Id: Ibdc145c3a9a1e3aa8a2d582d4e93b40f68f70e95

Jimi Chen   commited 2025-02-06 11:58:35 +00:00
baada5123e
Merge "Remove obsolete CtsTetheringTestLatestSdk" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-06 00:38:31 -08:00
4347391d59
Merge "Wait for carrier config to apply in tests" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-06 00:03:08 -08:00
5ad3246434
Remove obsolete CtsTetheringTestLatestSdk
This commit removes the obsolete CtsTetheringTestLatestSdk target, which
is no longer needed. This target was previously required for CTS to
function on the mainline-prod branch, but with the migration to trunk
stable, these branches no longer exist.

Test: TH
Change-Id: Ib6600071dd82e9e8b429b69844703429dea12438

Yuyang Huang   commited 2025-02-06 16:04:20 +09:00
f3c759312d
[automerger skipped] Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported am: 12dde98325 -s ours am: f0f4dc7ae5 -s ours
am skip reason: skipped by lorenzo

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3145257

Change-Id: If1e1116ecd4b5f78381be469fd60797491584e58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

chayemme   authored and   Automerger Merge Worker   commited 2025-02-05 22:13:26 -08:00
9925b6ed6b
[automerger skipped] Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported am: 12dde98325 -s ours
am skip reason: skipped by lorenzo

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3145257

Change-Id: Ie334a09ae39975398c6d52623f9e29d18c6f0a2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

chayemme   authored and   Automerger Merge Worker   commited 2025-02-05 22:00:41 -08:00
f0f4dc7ae5
Modify CTLogger to take in the LogListUpdateStatus object instead of
individually passed parameters

This CL also moves the DataStore updates of the failure count into
CTLogger directly (CTDownloader will only modify the failure count on
complete success).

Note: due to limitations with Mockito (not being able to mock static
classes like the auto-generated CTStatsLog), there is no test class for
CTLoggerImpl.

Bug: 394278886
Bug: 378626065
Flag: com.android.net.ct.flags.certificate_transparency_service
Test: atest NetworkSecurityUnitTests
Change-Id: I4498bfe75e84c6ba1654cfa55912c46836f61e03

Bessie Jiang   commited 2025-02-05 18:47:01 +00:00
782fad0c3a
[automerger skipped] Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported am: 1cf4f686a9 -s ours
am skip reason: Merged-In I3ba614e3b4e1b63973510d687459f822cb441bd7 with SHA-1 eeed24cd54 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3475673

Change-Id: Ic0c426b0c112388c203dbee33bf0a89bfdb40898
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

chayemme   authored and   Automerger Merge Worker   commited 2025-02-05 10:26:32 -08:00
0fc665c010
Merge "Fix bug in Killswitch implementation" into main
Sandro Montanari   authored and   Gerrit Code Review   commited 2025-02-05 05:05:08 -08:00
bc74f0050e
Merge "Add logging of the log list signature" into main
Bessie Jiang   authored and   Gerrit Code Review   commited 2025-02-05 02:55:11 -08:00
b1695c4b6a
Wait for carrier config to apply in tests
TetheringManagerTest#testRequestLatestEntitlementResult in particular
set carrier config overrides without waiting for the override to be
applied, which caused flakes.

Wait for the override to be applied when adding and clearing them.

This makes the logic to wait for the update in NetworkAgentTest
unnecessary.

Bug: 391966043
Test: atest
Change-Id: I371ff5742627ca0b1b6eb6be5f0fd19a0487ae83

Remi NGUYEN VAN   commited 2025-02-05 15:42:54 +09:00
b9ac4c8fe2
Merge "Use CtsTetheringTest in TEST_MAPPING" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2025-02-04 21:52:30 -08:00
15285c29ef
Use CtsTetheringTest in TEST_MAPPING
This commit updates the TEST_MAPPING to use CtsTetheringTest directly
instead of CtsTetheringTestLatestSdk. Since the *-mainline-prod branch
is no longer used, the latest SDK test is redundant, and
CtsTetheringTest should be used instead.

This commit also move the CtsTetheringTest to presubmit.

Test: TH
Change-Id: I78ef1368e9122c9b69466bb7e295ec38b5d1e829

Yuyang Huang   commited 2025-02-05 12:50:33 +09:00
d9f3b07304
Merge "Fix TetheringTest when run on B" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-04 19:13:10 -08:00
e0be07db1b
Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported
Test cases testSoftApConfigurationGetPersistentRandomizedMacAddress and testSetAirplaneMode
are using the wifi service even wifi feature is disabled.
This change skips the test based on WiFi feature

Bug: 349198732
Change-Id: I1f1a9968dc716dbb2fbca42c1a9ca6271c474238
Merged-In: I3ba614e3b4e1b63973510d687459f822cb441bd7

chayemme   authored and   Lorenzo Colitti   commited 2025-02-04 18:19:57 -08:00
1cf4f686a9
Fix TetheringTest when run on B
Tethering will ignore interfaceStatusChanged for enabled interfaces
starting in B, instead only creating the IpServer when the link layer
event comes. Fix the assertions around interfaceStatusChanged for B.

Bug: 393978354
Test: atest TetheringTest
Change-Id: I74d0843785c5d9353e59b73d6d7b30d6d07ac0e0

Quang Anh Luong   commited 2025-02-05 10:43:59 +09:00
60dbc79761
BpfHandler: more 'using' statements for bpf namespace
(it's a bit to pointlessly repetitive)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idc84890401c480a562f433a547b5ba6d2ffdc111

Maciej Żenczykowski   commited 2025-02-04 13:54:38 -08:00
7a7dcf824c
Merge "bpf: don't attempt to load LPM_TRIE on < 4.14" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-04 11:49:40 -08:00
00d7089e9f
Add logging of the log list signature
As previously discussed, we will be logging the signature to help with
on-path attacker detection. See go/ct-android-notes for summary of the past
discussions. SignatureVerifier has been modified to return a status
object to better capture the various potential signature verification
failure statuses.

The log list timestamp will be added in a later change as
this will require modifying CompatibilityVersion's logic.

Bug: 378626065
Bug: 391327942
Bug: 394278886
Flag: com.android.net.ct.flags.certificate_transparency_service
Test: atest NetworkSecurityUnitTests
Change-Id: I33d08b2d8c0260237bb3c5a66770fdf409adf8b1

Bessie Jiang   commited 2025-02-04 16:52:07 +00:00
a0c6b166a1
Merge "Deprecating PERMISSION constants that are not used in aidl" into main
Melisa Carranza Zúñiga   authored and   Gerrit Code Review   commited 2025-02-04 08:35:43 -08:00
258c1167fa
Merge "Create an intermediate enum to represent the log list update status" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-04 02:55:13 -08:00
07918a3b95
bpf: don't attempt to load LPM_TRIE on < 4.14
Test: TreeHugger
Bug: 394212739
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia71951ef1a34eeeb30097de0b9d3ddb821f7e72f

Maciej Żenczykowski   commited 2025-02-03 22:05:22 -08:00
8701983198
Deprecating PERMISSION constants that are not used in aidl
PERMISSION_INTERNET, PERMISSION_UPDATE_DEVICE_STATS,
PERMISSION_UNINSTALLED and NO_PERMISSIONS are used only internally
and don't need to be maintained as part of the public interface.

Bug: b/326383676
Test: PermissionMonitorTest
Change-Id: If906382965c8593f9078278af37cb0bc2825117f

Melisa CZ   commited 2025-02-03 22:50:42 +00:00
0d08a89d86
Replace .toList() with .collect()
.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().

This was found while updating android lint.

Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: I472bff7749aebb21bd8681ecf4235ce7a6cfc7de

Cole Faust   commited 2025-02-03 14:18:40 -08:00
725078a6bd
Create an intermediate enum to represent the log list update status
All of the auto-generated enum naming in CTStatsLog is over 100+ chars
long, causing there to be numerous lint errors. This CL creates an
intermediate enum to make it easier to reference these status enums
without introducing lint warning fatigue.

Bug: 378626065
Flag: com.android.net.ct.flags.certificate_transparency_service
Test: atest NetworkSecurityUnitTests
Change-Id: I451a006961ee5d801b3fbf702d3f5282d0b02242

Bessie Jiang   commited 2025-02-03 19:39:14 +00:00
eb7de53d01
Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported
Test cases testSoftApConfigurationGetPersistentRandomizedMacAddress and testSetAirplaneMode
are using the wifi service even wifi feature is disabled.
This change skips the test based on WiFi feature

Bug: 349198732
Test: atest CtsNetTestCases
Change-Id: I1ed6bd9522fac0151c5ac3b20d1b002bab79dd12
Merged-In: I3ba614e3b4e1b63973510d687459f822cb441bd7

chayemme   authored and   Lorenzo Colitti   commited 2025-02-02 20:31:25 -08:00
12dde98325
BpfHandler: reduce logging verbosity
most of these are spammy and/or not useful.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iab101ce7de076ef025a046d5e3e9007e091b271f

Maciej Żenczykowski   commited 2025-01-31 12:53:11 -08:00
0bcb13f41c
Merge "Prepare CtsTetheringTestLatestSdk for presubmit by adding it to postsubmit" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-31 02:05:17 -08:00
37bf450778
Merge "Fix some comments around stopTetheringRequest" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-31 01:59:17 -08:00
f09acc7281
Merge "Add basic implementation of stopTetheringRequest" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-31 00:59:58 -08:00
6f57c93e30
Prepare CtsTetheringTestLatestSdk for presubmit by adding it to postsubmit
This commit adds CtsTetheringTestLatestSdk to the postsubmit
configuration. This is a preparatory step towards moving the test to
presubmit, ensuring it runs regularly and catches issues earlier in the
development cycle.

Test: TH
Change-Id: I6932b0b660a675a20102d2683119f689557d8590

Yuyang Huang   commited 2025-01-31 17:51:21 +09:00
1325a02e96
Fix some comments around stopTetheringRequest
Bug: 216524590
Test: atest TetheringManagerTest
Change-Id: Iae0baa8ad7c199770666e2f78813cf0224ea1a9b

Quang Anh Luong   commited 2025-01-31 17:42:39 +09:00
75ac79db56
Add basic implementation of stopTetheringRequest
Add a basic implementation of stopTetheringRequest that simply stops
tethering for that specific type if it is active, or fail with
TETHER_ERROR_UNKNOWN_REQUEST if not. In the future, we will do fuzzy
matching to ensure the correct request is removed.

Bug: 216524590
Test: atest TetheringManagerTest#testStopTetheringRequest
Change-Id: Ib4a660aacdb83e645e39ceb61b7cda45bb24d89d

Quang Anh Luong   commited 2025-01-31 16:23:04 +09:00
696c164c2d
Merge "add kernel version comment for R/S pre-bpf" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-30 19:14:23 -08:00
cb2125e666