These are dummy no op test flags meant for testing mainline beta
flagging and workflow infras. Will remove them once the test has
completed.
Bug: b/406508072
Test: m and verify in AVD
Flag: EXEMPT build system changes
Change-Id: I3d9326bce2ca0b7b8a61405a88565a1a7674c4db
* changes:
Remove ensureIpServerStartedLegacy.
Never create IpServers based on interface up for WIFI and WIFI_P2P.
Rename the methods in the legacy codepath for clarity.
Patrick Rohrauthored and Android (Google) Code Reviewcommited 2025-05-16 02:15:46 -07:00
Fold the method into its only caller. This is a no-op change.
The only types that could previously make it to this method are
BLUETOOTH pre-T and WIGIG pre-S. Therefore the call to
checkTetherableType is mostly redundant, except for the check
that WIGIG should not be brought up if the device does not
have FEATURE_WIFI. Put that check into the caller as well.
Bug: 408087033
Flag: EXEMPT refactor
Test: no-op covered by existing tests
Change-Id: I380d649c2fd8af8b00a55a5bb7d2254c8b126a34
Lorenzo Colitticommited 2025-05-16 15:06:36 +09:00
This is not necessary because creating the IpServer based on
interface events is only necessary for the tether() API, and
field metrics indicate that that API is unused for WIFI and
WIFI_P2P.
Also add comments to clarify when the legacy codepath is taken.
Bug: 408087033
Test: updated unit tests
Flag: EXEMPT refactor
Change-Id: I64734ee710e9782903d4422efb0370d6fec77dd7
Lorenzo Colitticommited 2025-05-16 15:06:36 +09:00
This is a no-op change.
ensureIpServerStartedForInterface -> ensureIpServerStartedLegacy
ensureIpServerStartedForType -> ensureIpServerStarted
Also pass in the type to ensureIpServerStartedLegacy. There's
no point reading calling ifaceNameToType again, the only thing
this can possibly do is get a new type that disagrees with the
previous one.
Bug: 408087033
Flag: EXEMPT refactor
Test: no-op covered by existing tests
Change-Id: Ie6f3859eab46a085c0d332b5de12473180032102
Lorenzo Colitticommited 2025-05-16 13:22:06 +09:00
This patch adds EthernetPortInfo class which represents information of
an EthernetPort object.
This class is mainlt used in network callbacks.
Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline
Change-Id: I8ab9fa934a710080163d951bb6619050ca38a2ee
The .rc file is just a placeholder, and isn't
truly used, so just move the documentation over
into the apex location which is actually used.
Test: TreeHugger
Flag: EXEMPT comments only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I505b90f27208ac5b217aca949b8ef044d3a39226
Maciej Żenczykowskicommited 2025-05-15 03:51:57 -07:00
The full set of 5 .o's is known at build time, and basically almost
never changes (and indeed is likely to shrink, with clatd.o merged
into offload.o && dscpPolicy.c merged into netd.c).
We might as well just code this knowledge straight into the mainline
loader.
This also allows us to move all the files to an apex subdirectory
that old platform bpfloaders don't even look at, which eliminates
the need for any backward compatibility with them.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie3d27178c31a68ed7cf5173b5983ad3009a3cf94
Maciej Żenczykowskicommited 2025-05-15 01:38:16 -07:00
Problem:
- SSLCertificateSocketFactory has a bug causing socket leaks in
certain exception scenarios.
- SSLCertificateSocketFactoryTest triggers this, leading to
leaked sockets during test runs.
- When run within CtsNetTestCases, the network traffic from these
leaked sockets interferes with
TrafficStatsTest#testTrafficStatsForLocalhost, which monitors
traffic by UID within that same suite.
- This interference causes TrafficStatsTest to be flaky.
Solution:
- Moving SSLCertificateSocketFactoryTest to a different suite
ensures its leaked socket traffic is no longer associated with
the same UID context monitored by TrafficStatsTest.
- This isolation prevents the test interference and resolves the
flakiness.
Flag: TEST_ONLY
Test: atest CtsLibcoreNetTestCases
Bug: 393471251
Change-Id: I1cc626ba281939999a7d6978668eefea8531ffec
This enables the proper packaging of the dependency along with the test module rather than maintaining a manual mapping the CI infrastructure. The new field introduced in Soong is the right field to properly declare a host side dependency for a device-test (b/262397555)
Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: If103e32632e4312460d99abd2a5c5b00e877f8ac
This patch adds MAC address support for EthernetNetworkSpecifier under
@hide flag.
After adding the support, EthernetNetworkSpecifier will be able to be
matched by MAC address in addition to existing interface name match. The
specifier can be satisfied with either MAC address and/or interface
name.
Bug: 397536853
Test: atest CtsNetTestCases:android.net.cts.EthernetNetworkSpecifierTest
Flag: EXEMPT mainline
Change-Id: Ibe55411ad0d3fdded6e25c9f33d9898e3eab3a3c
Check if the received DHCPv6 message has included this option, if so,
that indicates the DHCPv6 server supports the address registration.
Flag: EXEMPT guarded by an legacy experiment flag
Bug: 293393743
Test: TH
Change-Id: I04370b58e26c09ef764d92d3e211b9619b528cf0
tryTest{} catches and returns and must be ended with a cleanup{}
block to throw. That is why it's marked with @CheckReturnValue.
The IDE marks the entire block as a huge warning.
Ideally this should really be an error, but that flag only exists
in Kotlin 2.2 and above, which is not out of beta yet, so
add a TODO in the bp file
Test: NsdManagerDownstreamTetheringTest
Flag: EXEMPT test-only
Change-Id: I62a9d0a16926574eb286d45b61d4d5d2e8c870ab
This change removes hundreds of lines of useless warnings, since
tests must check the continued working of old and deprecated methods.
Test: build manually and observe the warnings are gone
Flag: EXEMPT test-only
Change-Id: Ie50b2f35b09041e8e201b30b1e575e66e045bc44
This new field ensures that the dependence is properly packaged with the module.
(original context: b/262397555)
Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: Ifca931a4ee7fa671f2316ae731b207404a8edd3d
This version is deprecated, only download the latest version. Keep the
array in place to easily add the next version in the future.
Bug: 409884646
Test: atest NetworkSecurityUnitTests
Flag: EXEMPT bug fix
Change-Id: Ia367c0c796ba56a470edcbfa0bc93213c4829d3f
To improve readability. Renames the forNcmFunction parameter to isNcm to
make it all fit on a single line.
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Iafebc4398aaf061175c4f84c45b37975940ca587
AOSP code has never used this API, and metrics from production
show no usage either. Removing it will allow simplifying the
code.
This CL removes testRequestStaticIpLegacyTether because it makes
legacyTether a no-op and there is already a test for static IP
request right above it.
Bug: 408087033
Flag: EXEMPT dead code
Test: updated existing tests
Change-Id: Ib94ed0860ab57abfd9fc7bdfdc911f5ab57003ed
Lorenzo Colitticommited 2025-05-13 19:43:58 +09:00
It looks like the code was already trying to ignore this (it
reported an error to the caller), but it then continued on to
create a request and call tetherInternal on it. This is still a
no-op because the code will never create an IpServer for an
interface that has type INVALID: IpServers are only ever created
in ensureIpServerStartedForType, and the only callers are:
- ensureIpServerStartedForInterface, which returns early if the
type is INVALID.
- enableIpServing:
- enableWifiP2pIpServing: returns early if type is INVALID
- enableWifiIpServing: returns early if type is INVALID
- enableUsbIpServing: can only pass in USB or NCM
- BluetoothCallback#onAvailable: passes in BLUETOOTH
- EthernetCallback#onAvailable: passes in ETHERNET
- setVirtualMachineTethering: only called with VIRTUAL
- StartTetheringSoftApCallback#onStateChanged: passes in the
request previously passed to it by setWifiTethering, which
is always WIFI.
Bug: 408087033
Test: covered by existing tests
Flag: EXEMPT dead code
Change-Id: I8ebba3edde93677c54488803fe4b573d78ad25a9
Lorenzo Colitticommited 2025-05-13 18:56:31 +09:00
Currently methods to create netlink message in RtNetlinkLinkMessage
take interface name, while interface index is a more deterministic way
to define an interface.
This patch changes these methods from taking interface name to taking
interface index.
Bug: 404378068
Test: NetworkStaticLibTests
Flag: EXEMPT mainline
Change-Id: I0754ee53eb0160e67f24e36340abf91b1e87d0e7
Inet4Address#isLinkLocalAddress can also return true if the address is
in the 169.254.0.0/16 range.
The code should also only consider directly-connected routes for
guessing, as default routes would match any address.
This is not used in platform code. This code path is only used when the
mDNS stack is used as a library.
Bug: 415483522
Test: atest
Flag: EXEMPT dead code in the platform
Change-Id: I53d8ad7f96368d4609b1baa804cd75aa65628c0c