Commit graph

109,957 commits

Message SHA1
Enable libbpf logging in bpf loader
Bug: 403381101
Test: boot
Change-Id: I039ad8990bb722bfd6eb9f6c4d927b699475b7f6

Motomu Utsumi   authored and   Maciej Żenczykowski   commited 2025-03-18 11:41:17 -07:00
712088dff3
Merge changes Id3eba714,I595ba207 into main
* changes:
  Add CtsTetheringUtils methods for wifi tethering without permission
  Skip stopTetheringRequest tests if tethering isn't supported

Quang Luong   authored and   Gerrit Code Review   commited 2025-03-18 04:12:57 -07:00
e149a49c7d
Merge "clatd: drop system real uid/gid in favour of clat" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-18 03:55:39 -07:00
cb8033b8fb
Merge "Update ApfIntegrationTest for APFv6/v6.1 requirements" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2025-03-18 03:29:33 -07:00
a03654ad70
Merge changes I71abf9d0,I57f25f5e,If6b15419 into main
* changes:
  Reapply "Add a queue system server-side for NetworkAgent"
  Reapply "Unify registration and NM assignment in NAI"
  Reapply "Return the registry in registerNetworkAgent."

Jean Chalard   authored and   Gerrit Code Review   commited 2025-03-18 03:19:07 -07:00
6f2b294fd0
Merge "Add NetworkSecurityUnitTests to tethering-mainline-presubmit" into main
Sandro Montanari   authored and   Gerrit Code Review   commited 2025-03-18 02:49:34 -07:00
9a03538a23
Update ApfIntegrationTest for APFv6/v6.1 requirements
This commit updates ApfIntegrationTest to reflect the latest
requirements for supporting APFv6 and APFv6.1, including their
respective memory requirements.

Test: TH
Change-Id: I29e8e692eaf8e378fea99bda36c752d9d729ed86

Yuyang Huang   commited 2025-03-18 18:10:06 +09:00
4797563fd3
Merge "Collect diagnostics without storage permission" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2025-03-18 02:05:21 -07:00
899737e0e0
Merge "Fix missing function in NetworkStaticLibHostPythonTests" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-18 01:47:31 -07:00
d492666256
Merge "Add IGMPv3 offload for APFv6 multi-devices tests" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-18 01:46:48 -07:00
e634a7da38
clatd: drop system real uid/gid in favour of clat
(minor security improvement)

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

Maciej Żenczykowski   commited 2025-03-18 00:51:59 -07:00
19199ca688
Merge changes from topic "vpn-type-oem-enterprise" into main
* changes:
  Treat new OEM VPN types like the corresponding non-OEM types.
  Add more NativeVpnType AIDL constants for OEM-specific VPNs.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2025-03-18 00:50:13 -07:00
944a1d2855
Merge changes Id80bfca1,I8254c3f4 into main
* changes:
  clatd: one less shutdown log line
  clatd: rework sigterm & error handling

Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:42:37 -07:00
8aff973a30
Merge "clatd: move send_dad out of event_loop() into main()" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:30:48 -07:00
2413654ad8
Merge "clatd: embed CLATD_VERSION directly in log string" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:30:47 -07:00
13070faab5
Add CtsTetheringUtils methods for wifi tethering without permission
Device Owner and Carrier-privileged tethering usage relies on starting
tethering without TETHER_PRIVILEGE permission. Add utilities to
CtsTetheringUtils to do this.

Bug: 295979433
Test: atest DeviceOwnerTest TetheringManagerTest
Change-Id: Id3eba71481e27ccfa32f2b0588b8a74c490c5311

Quang Anh Luong   commited 2025-03-18 16:24:39 +09:00
73b09281c0
Skip stopTetheringRequest tests if tethering isn't supported
Bug: 402315643
Test: atest TetheringManagerTest

Change-Id: I595ba20718cd13b7c6b6d66bf540c599ef48304e

Quang Anh Luong   commited 2025-03-18 16:24:31 +09:00
a4d16050f9
Fix missing function in NetworkStaticLibHostPythonTests
This change corrects a missing function error, which was renamed in aosp/3545962.

Test: atest NetworkStaticLibHostPythonTests
Change-Id: I2f51702adfa48f2207ef4dd79f641c8f57d15ac7

Jimi Chen   commited 2025-03-17 23:56:23 -07:00
e6c9b28c2b
Merge "Add carrier privilege utils to CarrierConfigRule" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-17 23:35:22 -07:00
ab6342b70e
Add IGMPv3 offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: Ica704150527bca11b975b6f122678e69eaa04c71

Jimi Chen   commited 2025-03-18 06:21:22 +00:00
8d552bf2c0
Merge "Use non-tentative IPv6 addresses in multi-device test" into main
Jimi Chen   authored and   Gerrit Code Review   commited 2025-03-17 23:04:03 -07:00
d1cbad238c
clatd: one less shutdown log line
less spam

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

Maciej Żenczykowski   commited 2025-03-17 22:53:38 -07:00
0372f296b5
clatd: rework sigterm & error handling
Separate 'running' flag out into 'running' and 'sigterm',
and make SIGTERM handler the only thing that sets 'sigterm'.

running is cleared via catastrophic errors, ie. EOF and ENETDOWN

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

Maciej Żenczykowski   commited 2025-03-17 22:53:32 -07:00
b984f31e55
clatd: move send_dad out of event_loop() into main()
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id74ad4adf861182d928676213c77a24675c358a4

Maciej Żenczykowski   commited 2025-03-17 22:53:26 -07:00
2f96f2c242
clatd: embed CLATD_VERSION directly in log string
Allows for:
  adbz shell strings /apex/com.android.tethering/bin/for-system/clatd | grep 'clat version'
to print:
  Starting clat version 1.7 on %s plat=%s v4=%s v6=%s
instead of:
  Starting clat version %s on %s plat=%s v4=%s v6=%s

(which is more useful for rapid development)

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

Maciej Żenczykowski   commited 2025-03-17 22:53:26 -07:00
1961f673d1
netd bpf: correct comment in NetBpfLoad S+ world (try 2).
fixup for https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/3548759

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

Maciej Żenczykowski   commited 2025-03-17 22:49:56 -07:00
c07d271e54
Reapply "Add a queue system server-side for NetworkAgent"
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit a5ec9b4112.

Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I71abf9d02bdd34a4de80157a3f42bdfee6f6617e

Chalard Jean   commited 2025-03-18 14:42:54 +09:00
3c040009c5
Reapply "Unify registration and NM assignment in NAI"
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit 30fcf820f9.

Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I57f25f5e6481106255df0ab69558e351eb938f68

Chalard Jean   commited 2025-03-18 14:42:50 +09:00
b3a53d0d39
Reapply "Return the registry in registerNetworkAgent."
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit 653d5f1ef4.

Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: If6b1541981803dc84de57b48adb13d40c9997fa0

Chalard Jean   commited 2025-03-18 14:42:39 +09:00
8a97692638
Treat new OEM VPN types like the corresponding non-OEM types.
Bug: 389829981
Test: new CTS tests
Change-Id: I9455a1e00db6fdca3706e83e26daa60db6c73d09

Lorenzo Colitti   commited 2025-03-18 14:34:18 +09:00
fd89cf529a
netd bpf: correct comment in NetBpfLoad S+ world.
Bug: 404398959
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieefac68fc531868cdf9aa4402cf8cb5a9d1a05ab

Maciej Żenczykowski   commited 2025-03-17 22:15:29 -07:00
4f373e3efa
Merge changes I65d57e0e,I8ca1f7ae into main
* changes:
  [Thread] unregister all country code callbacks when CountryCode is not needed
  [Thread] do not set the country code again if the co-processor doesn't support it

Zhanglong Xia   authored and   Gerrit Code Review   commited 2025-03-17 22:10:39 -07:00
996c612875
Add more NativeVpnType AIDL constants for OEM-specific VPNs.
Test: m
Bug: 389829981
Change-Id: If39e012dcf6388f2d4e7f8d2eebf01410e3f1543

Lorenzo Colitti   commited 2025-03-18 13:13:31 +09:00
d731b8136e
Add carrier privilege utils to CarrierConfigRule
Move the existing helper methods to acquire carrier privileges in
NetworkAgentTest.kt to CarrierConfigRule where it can be reused by other
CTS tests. Also reset the carrier service package override in the rule
cleanup.

Bug: 216524590
Test: atest NetworkAgentTest
Change-Id: Id907a2d641aa61838119e2be65654b9796464498

Quang Anh Luong   commited 2025-03-18 13:05:01 +09:00
a620310e9c
[Thread] unregister all country code callbacks when CountryCode is not needed
This commit unregisters all country code callbacks (WiFi, Telephony and
Location) when the CountryCode module detects that the co-processor
doesn't support setting the country code.

Bug: b/402276117
Test: atest ThreadNetworkUnitTests:ThreadNetworkCountryCodeTest#setCountryCodeNotSupported_returnUnsupportedFeatureError_unregisterAllCallbacks
Change-Id: I65d57e0e826202ad696335200645bf6d78c8b87c

Zhanglong Xia   commited 2025-03-18 03:04:21 +00:00
fe54478761
[Thread] do not set the country code again if the co-processor doesn't support it
Some the co-processors do not support setting the country code. This
commit enables the CountryCode module doesn't set the country again
after it knows that the co-processor doesn't support setting the
country code.

Bug: b/402276117
Test: atest ThreadNetworkUnitTests:ThreadNetworkCountryCodeTest#setCountryCodeNotSupported_returnUnsupportedFeatureError_countryCodeNotSetAgain

Change-Id: I8ca1f7aed3774a086e114e91d8100fb7fe9e3664

Zhanglong Xia   commited 2025-03-18 03:01:59 +00:00
f6187b99c7
Merge "change 'for-system' owner from root to clat" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-17 19:47:33 -07:00
1569bc4cbe
Merge "Start tethered hotspot with TetheringRequest" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-17 15:01:54 -07:00
8594562526
Merge "Add CachedService Class" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-17 09:59:20 -07:00
ac1af41d42
Start tethered hotspot with TetheringRequest
Use WifiManager.startTetheredHotspot(TetheringRequest, Executor,
SoftApCallback) to start softap. This allows for passing in the
requested SoftApConfiguration via TetheringRequest.

Bug: 216524590
Test: atest TetheringTest TetheringManagerTest
Change-Id: Ie4fb851e8b2243d233f9a8b3e18e2fa335cec307

Quang Anh Luong   commited 2025-03-17 21:13:47 +09:00
f7b6434a65
Merge changes from topic "revert-3535182-EBVRAQTHFS" into main
* changes:
  Revert "Return the registry in registerNetworkAgent."
  Revert "Unify registration and NM assignment in NAI"
  Revert "Add a queue system server-side for NetworkAgent"

Pechetty Sravani (xWF)   authored and   Gerrit Code Review   commited 2025-03-17 02:23:26 -07:00
67cc745550
Add CachedService Class
This is a no-op refactoring. A new CachedService class is
introduced to better represent cached services and their expired
status. This class will be used to optimize expired service
removal in subsequent changes.

Bug: 387910548
Test: atest ConnectivityCoverageTests NsdManagerTest
Change-Id: I56fa43b8cc0c69d77aa14f0bdaf024a94c45757c

Paul Hu   commited 2025-03-17 07:58:59 +00:00
b6339349a4
Revert "Return the registry in registerNetworkAgent."
Revert submission 3535182

Reason for revert: <Droidmonitor created revert due to b/404070202.Will be verified through ABTD for standard investigation.>

Reverted changes: /q/submissionid:3535182

Change-Id: I2febd2ee7227d487d9cd69dcabd9c04f888fd2de

Pechetty Sravani (xWF)   commited 2025-03-17 00:48:05 -07:00
653d5f1ef4
Revert "Unify registration and NM assignment in NAI"
Revert submission 3535182

Reason for revert: <Droidmonitor created revert due to b/404070202.Will be verified through ABTD for standard investigation.>

Reverted changes: /q/submissionid:3535182

Change-Id: I65fdaaacb56c8ef227eaf1a0193efe8d332d6473

Pechetty Sravani (xWF)   commited 2025-03-17 00:48:05 -07:00
30fcf820f9
Revert "Add a queue system server-side for NetworkAgent"
Revert submission 3535182

Reason for revert: <Droidmonitor created revert due to b/404070202.Will be verified through ABTD for standard investigation.>

Reverted changes: /q/submissionid:3535182

Change-Id: Id48ef1cf44911cb291bcd8db349934751297718b

Pechetty Sravani (xWF)   authored and   Gerrit Code Review   commited 2025-03-17 00:48:05 -07:00
a5ec9b4112
Use non-tentative IPv6 addresses in multi-device test
This update ensures multi-device offload tests retrieve only non-tentative IPv6 addresses,
preventing test caused by tentative addresses undergoing duplicate address detection.

Test: atest NetworkStaticLibHostPythonTests
Change-Id: Id2f61a34eda01a6e8e0457647229fe438a85c232

Jimi Chen   commited 2025-03-17 06:31:46 +00:00
2bfe2654d1
Fix WifiManager.startTetheredHotspot mocking
TetheringTest has several tests that rely on starting Wifi tethering,
but do not mock WifiManager.startTetheredHotspot. This causes the
pending Wifi request to be removed, even though the test continues
thinking that the call succeeded and continues mocking Wifi AP events.

Fix this by making sure the mock returns true in setUp(), and only set
it to false when we expect that the call should fail.

Bug: 216524590
Test: atest TetheringTest
Change-Id: Iaf076b9ae64d737a8591c7f41a5552757b47999b

Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
db7fdac6d9
Replace isTetheringWithSoftApConfig flag with B SDK check
isTetheringWithSoftApConfig flag is finalized, replace it with a simple
SdkLevel.isAtLeastB() check. This also fixes any issues with reading the
flag during boot.

Bug: 216524590
Test: covered by existing tests
Change-Id: I6c2717a68fa4f3c664c9948ec19b246db5afdb8b

Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
a10437f133
[Revert^2] Stop tethering request only if fuzzy-matched to existing request
stopTethering with a TetheringRequest should only stop tethering if
there is an existing request (pending or serving) that fuzzy-matches the
input and whose UID matches the caller (unless the caller is Settings,
which is allowed to remove any request).

If there is no existing fuzzy-matched request, return
TETHER_ERROR_UNKNOWN_REQUEST.

Note: This was originally merged as aosp/3527440 but was reverted due to
a dependency CL being reverted. Remerging this on top of the fix for the
dependency CL.

Reverted changes: /q/submissionid:3541662-revert-3527440-JRJJTQBUFC

Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest

Change-Id: I99dd2433efbb82f3721aa708ab50d198f6fbcb10

Quang Luong   authored and   Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
d093ea69b0
[Revert^2] Reject TetheringRequests that fuzzy-match existing ones
Legacy behavior will return success results to multiple startTethering
calls of the same type, even though the link layer can only support one
of those requests at a time (other than tethered AP + LOHS).

For B+, clean up this behavior by only allowing the amount of requests
that the link layer can concurrently support. To do this, we'll
introduce the concept of "fuzzy-matching" such that if a new request
fuzzy-matches an existing request (either pending or serving), this
indicates that the link layer cannot support the new request
concurrently, and we'll fail the new request with
TETHER_ERROR_DUPLICATE_REQUEST.

To keep track of serving requests, we'll store the request and it's
IpServer in RequestTracker when we call IpServer.enable(), and we'll
remove it (indexed by IpServer) when
1) Calling IpServer.onStop()
2) Calling IpServer.unwanted()
3) We detect an IpServer transition to AvailableState with error code

Note: This was originally merged as aosp/3529632 but was reverted due to
a crash when reading aconfig flags at boot. That issue has been fixed
here.

Reverted changes: /q/submissionid:3541662-revert-3527440-JRJJTQBUFC

Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest

Change-Id: I87a1ed31927cda27d3b7fdd7c823b8f828f8d777

Quang Luong   authored and   Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
8b29d287f5