Commit graph

111,072 commits

Message SHA1
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
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
Format MdnsInterfaceAdvertiserTest with ktlint
Test: TH
Flag: EXEMPT test only change
Change-Id: I1f278dfebb17836ff0a928c08b68a7266ac4d90a

Yuyang Huang   commited 2025-05-04 14:39:36 +09:00
21a4193c7b
Automated log_list.json generation version 53.32
Bug: N/A
Test: N/A
Flag: NONE automatic key rotation
PiperOrigin-RevId: 754379882
Change-Id: Ibbf0d85b70e9f949a37fffe4239ba6a0d93c984f

Android Network Security   authored and   Copybara-Service   commited 2025-05-03 10:14:23 -07:00
d69ad204c8
Merge "Remove spurious VisibleForTesting annotation" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-05-02 14:22:14 -07:00
cfa9a2e9b6
Remove spurious VisibleForTesting annotation
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I5104b4875159bb9df6a380c846ec01be67a82d2c

Patrick Rohr   commited 2025-05-02 09:07:03 -07:00
9796d817a8
Merge "Make NsdManager.registerService() public API" into main
Yuyang Huang   authored and   Android (Google) Code Review   commited 2025-05-02 01:56:31 -07:00
41a3407e1f
Make NsdManager.registerService() public API
This commit makes the NsdManager.registerService() API public. This
change will enable developers to implement more customizable mDNS
advertising behavior in their applications.

Bug: 373270045
Test: atest CtsNetTestCases:NsdManagerTest
Flag: com.android.net.flags.mdns_advertising_improvement
API-Coverage-Bug: 415202964
Change-Id: I32359f7265b3597defd57123ecff0deaef0011f8

Yuyang Huang   commited 2025-05-02 15:23:14 +09:00
9e74d41f3d
Merge "Read meta-data instead of property" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-01 22:47:52 -07:00
3305741269
Read meta-data instead of property
Currently, the SatelliteAccessController checks if apps are
opt-in via a property tag under the application. This is
incorrect because PROPERTY_SATELLITE_DATA_OPTIMIZED is an
existing, released meta-data usage for Android B and needs
to be preserved.

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

Junyu Lai   commited 2025-05-02 12:08:38 +08:00
0beea1e992
Merge "Enforce run on handler thread for SatelliteAccessController" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-01 20:30:51 -07:00
be4ecf0ac4
Enforce run on handler thread for SatelliteAccessController
This is a no-op refactoring that ensures events are handled
on the handler thread. While this is already the case in
production code, it's not consistently true in the tests.

This change adds the necessary methods for faking events
on the handler thread while maintaining readability in the
tests.

Flag: EXEMPT refactor
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Bug: 410731080
Change-Id: I816233a823314c4c276138438bbaf33f781eccfe

Junyu Lai   commited 2025-05-02 09:50:40 +08:00
00625abeda
Merge changes from topic "dhcp6-move" into main
* changes:
  Expose a getter for mStatusCode
  Add Dhcp6*Packet classes to net-utils-networkstack
  Move Dhcp6*Packet.java to staticlibs

Patrick Rohr   authored and   Android (Google) Code Review   commited 2025-05-01 14:20:06 -07:00
ff278aa0d7
Expose a getter for mStatusCode
So it is accessible by the test.

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

Patrick Rohr   commited 2025-05-01 11:16:41 -07:00
a2a1295adc
Add Dhcp6*Packet classes to net-utils-networkstack
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ica554c27a648095a23331a9d93cc6bbbcf572cec

Patrick Rohr   commited 2025-05-01 11:16:41 -07:00
f5e80bfb70
Move Dhcp6*Packet.java to staticlibs
For use in tests. This CL won't build by itself

mv NetworkStack/src/android/net/dhcp6/Dhcp6*Packet.java \
Connectivity/staticlibs/device/com/android/net/module/util/dhcp6

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

Patrick Rohr   commited 2025-05-01 11:16:41 -07:00
1ff7c3ef71
Merge "NetBpfLoad: relax version checks" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-01 09:35:40 -07:00
6305ca96e1
Merge "Add NET_CAPABILITY_NOT_RESTRICTED to test network in CtsNetUtils" into main
Jacque Li   authored and   Android (Google) Code Review   commited 2025-05-01 08:39:26 -07:00
d36772174f
NetBpfLoad: relax version checks
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie4ac3608d3f9599ffca40b0b2073f21efed7b17c

Maciej Żenczykowski   commited 2025-05-01 06:12:57 -07:00
cb55572675
Merge "Update outdated example code" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-05-01 00:59:52 -07:00
ffd713da3d
Merge changes Id3eaa838,If07fb6c1 into main
* changes:
  Move failWithErrorReason to a common place
  Enable the last preference tests

Jean Chalard   authored and   Android (Google) Code Review   commited 2025-04-30 20:05:50 -07:00
175e8aeebf
Merge "Change tethering terrible error wtf log to info log" into main
Quang Luong   authored and   Android (Google) Code Review   commited 2025-04-30 16:25:51 -07:00
6a7aa5d28f
Update outdated example code
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I0a87d71f693edcf13ad85049bff24169ddbedb3e

Patrick Rohr   commited 2025-04-30 12:24:09 -07:00
09c0307b9a