Commit graph

111,097 commits

Message SHA1
Enable REQUEST_RESTRICTED_WIFI and CARRIER_SERVICE_CHANGED_USE_CALLBACK by default with kill switch
Bug: 416044405

Test: atest ConnectivityManagerTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I1b67c00ce3d4054414ce9c538ec4d7b9a55b4302
Flag: com.android.net.flags.request_restricted_wifi

Ying Xu   commited 2025-05-14 10:56:45 -07:00
7e4e0952f8
Merge "Cleanup and improve logging for DefaultNetworkRestoreMonitor" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-09 02:24:31 -07:00
bb2c4e66ef
Merge "Extend QosFilter address matching function" into main
Sewook Seo   authored and   Android (Google) Code Review   commited 2025-05-09 01:02:33 -07:00
ceb29e6cdf
Cleanup and improve logging for DefaultNetworkRestoreMonitor
Bug: 413188127
Flag: EXEMPT test-only
Test: CtsNetTestCases
Change-Id: I16938de33e1beee1a38c76eeae2fcf52d8f79870

Chalard Jean   commited 2025-05-09 16:43:56 +09:00
e73d3b934c
Clean up an old flag for removed downstream branches
Test: TH
Flag: EXEMPT test-only
Change-Id: I4a860c7c42afdfb5249b787daee80395096f5c84

Chalard Jean   commited 2025-05-09 14:59:29 +09:00
893f84f96e
Extend QosFilter address matching function
Extend QosFilter address match function for IP address range based on
prefix length.

Bug: 406146808
Bug: 399960748
Flag: com.android.net.flags.qos_filter_ip_range_matching
Test: atest CtsNetTestCases
Test: atest ConnectivityCoverageTests
Change-Id: I78d995fda111d258da9a912c7afa5e472e43437f

Sewook Seo   commited 2025-05-08 22:37:32 -07:00
6305252415
Merge changes Ia7691368,I802541ae into main
* changes:
  Remove most hidden API usage in net CTS
  Hardcode the setting for multipath preference

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-08 21:49:24 -07:00
28d9001a20
Merge "Log improvement when the meta-data format is unexpected" into main
Junyu Lai   authored and   Android (Google) Code Review   commited 2025-05-08 19:59:45 -07:00
27aa3082b6
Log improvement when the meta-data format is unexpected
Currently, if the value of opt-in meta-data is not a String,
calling Bundle#getString would result in flooding the system
log with Bundle warning log and callstacks, but without
useful information like the package name.

Thus, a manual type check is performed, and the package name
is logged if a mismatch occurs.

Flag: EXEMPT flagged with a kill switch
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideSatelliteDataOptInTest \
      ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Bug: 416351099
Change-Id: Iae8e26f657e009edb8630dbbe64c7e3e958abc43

Junyu Lai   commited 2025-05-09 09:15:12 +08:00
4943a17fb6
Merge "Implement network avoid bad wifi from carrier config" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-05-08 17:46:53 -07:00
ae13aeb0fd
Merge "Require DnsResolver M-2025-07 for DDR" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-08 17:40:37 -07:00
72f502bbe9
Remove unused constant
TIMEOUT_MS is unused.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ifd1635181013a587a9ff8cfafdcd81cf2b64f0c0

Patrick Rohr   commited 2025-05-08 15:27:05 -07:00
c037b5d94f
Add Kill Switch for PermissionMonitor Refactoring
As a follow-up to ag/33089478 and ag/33101784, the intent
receiving and dispatching logic was refactored and centralized
within the newly introduced BroadcastReceiveHelper.

However, due to the potential risks associated with this
refactoring, a kill switch is being added specifically for the
PermissionMonitor refactoring. This will allow for reverting
to the previous implementation (potentially involving code
duplication) to mitigate risks if issues arise.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.PermissionMonitorTest \
      ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest \
      --update-device
Bug: 410731080
Change-Id: I7889ef457d841c750da60a80e50ed6208c45448f

Junyu Lai   commited 2025-05-08 19:01:25 +08:00
638c43f201
Implement network avoid bad wifi from carrier config
Flag: android.net.platform.flags.avoid_bad_wifi_from_carrier_config
Bug: 410976315
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.MultinetworkPolicyTrackerTest
Change-Id: I89c579a8d5c7299303278280c463aa4c7c5bea99

Jimi Chen   commited 2025-05-08 07:25:36 +00:00
0881fc0a7d
Merge "Update link properties early for VPN networks" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-07 22:28:58 -07:00
c360088112
Merge "Define the EthernetConfigStore API flag in Connectivity module" into main
Chuwei He   authored and   Android (Google) Code Review   commited 2025-05-07 19:13:34 -07:00
2a0563045a
Merge "Remove SSLCertificateSocketFactoryTest @hide usage" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-07 04:02:36 -07:00
8c79c399da
Merge "Fix for timing issue for handling user interaction addExternalApprover" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-07 02:48:27 -07:00
8014cfea1e
Fix for timing issue for handling user interaction addExternalApprover
If client knows network name and passphrase, it can connect to the
server (Group owner) without user interaction. In this case, it needs
to use interface address of group owner, not device address

Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: I47bc8609e63564f4226a4ef71ea9e382f5f919fe
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>

Rohit Kothari   authored and   Paul Hu   commited 2025-05-07 02:47:38 -07:00
50b479097d
Remove SSLCertificateSocketFactoryTest @hide usage
Include verifyHostname in the test instead of calling the hidden API.

This removes a bit of coverage as verifyHostname itself is not tested
anymore, but it still verifies behavior of the verification and state of
the SSL session on socket creation.

verifyHostname is @hide API so it should not be exercised directly by
CTS.

Bug: 410435307
Flag: TEST_ONLY
Test: atest

Change-Id: I11f56e21ba242b7fcc5b84f6de992dc94d90ddee

Remi NGUYEN VAN   authored and   Junyu Lai   commited 2025-05-07 17:21:26 +08:00
145dc19675
Network name for Wi-Fi Direct group should have prefix DIRECT-xy.
Network name for Wi-Fi Direct group must starts with the prefix DIRECT-xy.
But CTS sometimes makes name with non-character in the position of “xy”.
To prevent issue, network name needs to be generated with the prefix DIRECT-xy.

Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: Ida07616b920b32dadd76f732ff2d87cc6ecc960d
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>

Rohit Kothari   authored and   Paul Hu   commited 2025-05-07 00:34:24 -07:00
756adee79c
Define the EthernetConfigStore API flag in Connectivity module
The com.android.net.flags.ethernet_config_store gates APIs exposed
by ethernet module, thus should also be included in
Connectivity/common/flags.aconfig

Bug: 397536853
Test: make
Flag: com.android.net.flags.ethernet_desktop_config

Change-Id: I158bc6298254e4075b594be90661e60b41d9930b

Chuwei He   commited 2025-05-06 23:37:08 -07:00
c666f38532
Merge "Skip network requests in MultinetworkApiTest for instant mode" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-06 23:06:32 -07:00
af00e59dfc
Merge "Ensure Thread network is never mDNS capable" into main
Handa Wang   authored and   Android (Google) Code Review   commited 2025-05-06 19:48:34 -07:00
0c23270fbc
Ensure Thread network is never mDNS capable
Thread doesn't use mDNS and we should prevent NsdService from sending any mDNS traffic to Thread.

Bug: 414258735
Test: CI
Flag: EXEMPT bugfix
Change-Id: I62299769cd44d2984b81b273adea7ce459d3d773

Handa Wang   commited 2025-05-06 19:34:34 -07:00
b59c829ff1
Merge "Add a test for a multihoming configuration" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-06 15:36:32 -07:00
0339433a11
Add a test for a multihoming configuration
Without rule 5.5 this won't work correctly anyway. However, this tests
the behavior of the DHCPv6-PD client.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ibd84883391926f4e19c0e3d370d28fbcb68c0b8e

Patrick Rohr   commited 2025-05-06 12:22:54 -07:00
c2bae6716c
Increase timeout to wait for Bluetooth to be enabled
Bug: 415541761
Flag: EXEMPT mainline
Test: yes
Change-Id: I2a9aa900802cd7801908cffe3fa801ff4c0bfb56

Patrick Rohr   commited 2025-05-06 09:43:08 -07:00
a48d4b8cdb
Merge "NetBpfLoad: Require Kernel 5.10 for Android 25Q4" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-05-06 09:27:48 -07:00
0d528a50c2
Merge "Add a test for multiple prefixes with p flags" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-05-06 09:27:03 -07:00
1c1d53877c
Merge "NetBpfLoad: remove spurious S+ check." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-06 09:25:39 -07:00
119d6d1fb9
Merge "bpf: Add new SDK versions" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-06 09:18:29 -07:00
626c764e7c
Add a test for multiple prefixes with p flags
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Iffa24fdfbf739b8135f94d6d3434a496de7f3f28

Patrick Rohr   commited 2025-05-06 08:17:23 -07:00
3a019692f0
Merge "Test that DHCPv6 provisioning succeeds" into main
Patrick Rohr   authored and   Android (Google) Code Review   commited 2025-05-06 08:01:52 -07:00
847084636f
NetBpfLoad: Require Kernel 5.10 for Android 25Q4
Netd bpf requires 5.10 at least in 25Q4.
This CL enforces that.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I76e52b2a2702a2a6ce761a947a0749ea798778b6

Maciej Żenczykowski   commited 2025-05-06 05:28:23 -07:00
ec1115e46b
NetBpfLoad: remove spurious S+ check.
Since all mainline bpf code is now loaded by NetBpfLoad, compatibility with platform bpfloader simply doesn't matter any more.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id96e3e6a4dac485f3e707cc9e6c4b05a4f9389d7

Maciej Żenczykowski   commited 2025-05-06 02:59:51 -07:00
66893bffe5
bpf: Add new SDK versions
Add 25Q3, 25Q4, 26Q1 and 26Q2 SDKs to the bpfloader helpers. The Q3 and
beyond versions are not finalized, so they are not being populated in
BpfUtils.h yet, but at least the logic is in place.

Test: TreeHugger
Flag: EXEMPT test code
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6ea12e347462be2c8258a4fe5bc994b35d4065a5

Maciej Żenczykowski   commited 2025-05-06 02:55:33 -07:00
c5b9f5ee99
Merge "Use the corresponding PackageManager for different users" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-05 21:58:40 -07:00
8c31a84f9f
Use the corresponding PackageManager for different users
Currently, isSatelliteDataOptimizedApp utilizes the PackageManager
from the primary user's context. However, if the added package is
not visible to the primary user, the satellite controller will
fail to parse the required information from the AndroidManifest.

Therefore, the corresponding PackageManager should be used when
a package is being checked.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Test: Manual:
      1. Create and setup 2nd user.
      2. adb install --user 10 CtsHostsideSatelliteDataOptimizedWithMetaData.apk
      3. adb shell dumpsys connectivity
      4. adb uninstall com.android.cts.net.hostside.satellitedataoptin.testapp
Bug: 410731080

Change-Id: I7adadb3449ec2ff984e6672ffb97919a2418e9b7

Junyu Lai   commited 2025-05-06 10:59:50 +08:00
988d00e57b
Skip network requests in MultinetworkApiTest for instant mode
MultinetworkApiTest would attempt to request cellular and Wi-Fi
network connections in test setup. This requires the
CHANGE_NETWORK_STATE permission, which is not granted to
the instant app. Therefore, skip the network requests if the
tests are running in instant mode.

Bug: 413261962
Test: atest android.net.cts.MultinetworkApiTest --instant
Flag: EXEMPT bug fix
Change-Id: I64366a4f2528402d3050adb54bb0aea352c53088

Paul Hu   commited 2025-05-06 02:39:52 +00:00
37c39d0af6
Test that DHCPv6 provisioning succeeds
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I88421058cd4bf0b982ccb6ae5362e4f037130114

Patrick Rohr   commited 2025-05-05 14:51:43 -07:00
3db76bdfbc
s/IaId/Iaid/ for consistency
rfc8415 calls it IAID, not IA_ID.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I449ef74e279a832f974d1780e10f3636e7bdaf34

Patrick Rohr   commited 2025-05-05 12:42:51 -07:00
297945d661
Add packet builder support for rapid commit option
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I4fde592fca440d08f5d07f090d3c9ad45c2c10a1

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
bde43b8a72
Add IA_PD Option support to packet builder
The IA_PD Option is modeled as a separate "packet", because it can
contain various options itself. It turns out that with the current
packet builder architecture, building nested packets (of which DHCPv6 is
an extreme example) is actually quite difficult. We would encounter
similar problems if we ever were to try and build netlink packets.

One thing that could be done is to add another overload for
PacketBuilder#div that takes another PacketBuilder object, allowing an
syntax such as:

dhcp6_header / dhcp6_rt_sol_max / (dhcp6_ia_pd / dhcp6_ia_prefix)

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I35694627285759dd17d8a8bf5994aaa96e6b391d

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
424655f497
Add payload support for Dhcp6Pkt
IA_PD options will be modeled as separate packets

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I2841b1d2283fa50bdc664ab865e64f92aba3ce0c

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
ea3f8b0fb1
Add packet builder support for commonly used DCHPv6 options
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I38f3250279c85177fc4ce8f44a35ae3883e7a8ae

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
684c48afb0
Add Dhcp6Pkt PacketBuilder support
This adds support for building the Dhcp6Pkt header. Options are added
later.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I588d8fc6ba68d1132a3beb1b436d8175ac0ae577

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
3b88b3cec5
Add end-to-end test for DHCPv6-PD
This adds the basic structure for a full end-to-end test for DHCPv6-PD
using a tap interface. This tests the interaction between the DHCPv6-PD
client, IpClient, and Netlink callbacks, and the kernel.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I6e56703187310ceaf6462b41f2e1ab3690faff01

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
7f6b868224
Make NdResponder thread-safe
Note that a new neighbor can still be added while processing a packet,
which may influence the result, though this shouldn't affect tests.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: If6860f3a52a406bbbbdd323061bfb918f1fb866c

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
86b2aed4f4
Merge "Automated log_list.json generation version 53.32" into main
Sandro Montanari   authored and   Android (Google) Code Review   commited 2025-05-05 04:15:49 -07:00
34de50dbcc