When the packet is too large to be sent it may cause the socket to throw
an error. This commit truncates the additional records in this case.
Bug: 407609792
Test: CI
Flag: EXEMPT bugfix
Change-Id: I77a979d7f8799f05cbcb14857061a18aecfef657
setEthernetEnabled() is used as a synchronization mechanism, so don't
let it affect enabled state.
Test: TH
Flag: EXEMPT test
Bug: 10000001
Change-Id: Ib023b7f944a8a84435dcc546aced9b0eab96d364
R & V+ never needed this as there is no platform
loading of mainline bpf.
On T/U we've been loading via mainline NetBpfLoad
for the past year, so the struct sizes only actually
matter for S.
S switches to mainline NetBpfLoad in M-2025-05
(currently in small canary), at which point the
struct sizes stop mattering.
In M-2025-07 S/T/U still look at the 'min bpf loader'
section of the .o, but don't go any deeper.
In M-2025-08 we no longer ship any bpf .o
files that need to be parsed by platform
bpfloader (as they're in a different subdirectory
in the tethering apex they don't even look in).
Test: TreeHugger
Flag: EXEMPT test deletion
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I72b9ebcf4ea59e61cdfd8bb009ede13670e3421f
Maciej Żenczykowskicommited 2025-05-22 02:08:43 -07:00
This commit adjusts the APF enforcement logic to align with 25Q2 GMS-VSR
and GTVS requirements. APFv6 is currently applicable only to handheld
and tablet devices (GMS-VSR) and TV devices (GTVS). For Wear OS devices,
APF enforcement will commence with Wear OS 7; therefore, the APF
enforcement check is skipped for devices launched/upgraded on Wear OS in 25Q2.
Bug: 381819368
Test: TH
Flag: EXEMPT bugfix
Change-Id: I4224738d9658fb4f6b67e491e7cd7d78e9b48748
requestTetheredInterface() only returns a callback if an interface for
tethering is available. The previous code timed out after 500ms which
was not enough for some devices. Instead of increasing the timeout, this
change calls setEthernetEnabled() which triggers a callback as soon as
it was processed on the handler thread. Since this event is guaranteed
to be processed after requestTetheredInterface(), the subsequent
expectOnAvailable() does not have to wait at all.
Test: TH
Flag: EXEMPT test
Bug: 418151132
Change-Id: Iff119a8e425d4071bf63fe92815061c7eb36848a
This reverts commit 7b7cfa45a6.
Reason for revert: prevents crash with no carrierConfigManager support
Test: atest ConnectivityCoverageTests
Change-Id: I9e91d2d25d16c0c2a39388f08a49bef7b17fda42
This reverts commit b936f0c5fd.
Reason for revert: Droidmonitor created revert due to b/418898788. Will be verifying through ABTD before submission.
Fix: 418898788
Change-Id: Ia47f0cc9a33ed33f9d53064878992081a792f1ad
Currently, the CarrierConfigManager is null on several non-phone
projects, e.g. tv, wear devices. This is because CarrierConfigManager
is not supported on these devices.
This change checks whether it is null and improve error handling.
Flag: android.net.platform.flags.avoid_bad_wifi_from_carrier_config
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.MultinetworkPolicyTrackerTest \
--update-device
Fix: 416654774
Change-Id: I40fa7139a349472b1d5cbd36b5bff286309aebc5
This class doesn't actually serve a purpose, it only makes
TestableNetworkCallbck more complex.
Test: CtsNetTestCases ConnectivityCoverageTests
Flag: EXEMPT test-only
Change-Id: I39a598b82a3215384bdfe04980f4b280ab2c2716
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
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
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
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
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
This commit modifies ApfIntegrationTest to skip execution on automotive
devices. APF GMS-VSR requirements do not apply to automotive devices.
APF offer no power benefit automotive devices due to their almost
infinite battery power supply. This change aligns the test suite with
the platform's specific requirements.
Test: TH
Flag: EXEMPT bugfix
Change-Id: Iad43a122407fe438cab94f59ed8aba8d6080af02
This commit adds a check to enforce that reported APF versions are
either 0 (indicating no support) or one of the officially valid
versions: 2, 3, 4, 6000 or 6100. This ensures consistency and prevents
issues arising from device using unsupported APF versions.
Test: TH
Flag: EXEMPT bugfix
Change-Id: Icdefa89fae590ec78146df4cbd2c683b5d8258f7