$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.c
$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.h
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Iffde87607e95920dc839e6901e0ba40912f83a49
As per `Iad43a122407fe438cab94f59ed8aba8d6080af02` commit, this test is no longer running on automotive.
This changelist also skips this test on Android Automotive within the setupOnce (@BeforeClass) method to avoid
executing unnecessary SLEEP/WAKEUP logic.
Fix: 439953326
Test: atest CtsNetTestCases:ApfIntegrationTest
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ic96db7a5dbc3f793bef85d9d3cd10cbcf726c7b4
Instead of iterating all listeners to get the FilterRepliesInfo,
this change introduces a new offloadInfo map to manage this
information. This map is updated when listeners are added/removed
or when a service is resolved. This ensures that the offload
information is always up-to-date and can be retrieved
efficiently.
Bug: 410734687
Test: atest ConnectivityCoverageTests
Flag: EXEMPT refactor
Change-Id: I89270c58304eec9fe9c3ed63dfbd46dab788a39f
The ENABLE_MATCH_NON_THREAD_LOCAL_NETWORKS compatibility flag is
now enabled for apps targeting SDK 37 or higher.
Previously, this flag was configured to enable for
Baklava (SDK 36) or higher. This is no-op because
there is no tethering network agent presents.
While the tethering network agents planned to be enabled in
25Q4, this adjustment allows developers sufficient time
to adapt to the behavior change where NetworkRequests
will match non-Thread local networks.
Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Test: atest ConnectivityCoverageTests --update-device \
--test-filter '.*Connectivity.*'
Bug: 420590461
Change-Id: I105ee1d677c6beb12b4dccd109c01ef5ff2717d3
Unifies the `TETHERING_LOCAL_NETWORK_AGENT` and
`WIFIP2PGO_LOCAL_NETWORK_AGENT` legacy feature flags into a
single mainline beta aconfig flag:
`tethering_and_p2p_go_local_network_agent`.
This change simplifies the logic for enabling the `NetworkAgent`
for both standard tethering (global scope) and Wi-Fi P2P Group
Owner mode (local scope). The agent is now enabled for both use
cases when the new flag is on.
The implementation in `IpServer` and associated tests have
been updated to use the new unified flag.
Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Bug: 420590461
Test: atest TetheringTests
Test: adb root
adb shell device_config put com_android_tethering com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent true
adb reboot
atest CtsTetheringTest --test-filter '.*Agent.*'
Test: atest ConnectivityCoverageTests:android.net.ip.IpServerTest --update-device
Change-Id: I55817132c57a04b4f7b7bac61b5741f45ba16182
netd_updatable was added during T mainline effort.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I095cbe3a8dc75a47fca9489965a0b922ede56a8e
Maciej Żenczykowskicommited 2025-08-18 15:59:14 -07:00
During VCN code move, git histories of OWNERS files and VcnUtils was
also moved to the VCN mainline code in the "git filter-repo" process.
Though it is unexpected, it is very hard to filter them out. Thus CL
is created to delete these files as a followup.
Bug: 430967429
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Flag: EXEMPT code move
Change-Id: I866b38eea1a8702d87c7fbb05e32213b3d96afa7
Not clear what the true minimum for this should be...
30/R? 31/S? 33/T?
So let's just err on the side of 30/R for now.
Bug: 439218498
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iebc28671f0b6fb5b33bf943fcccb3c4f836a92e6
Maciej Żenczykowskicommited 2025-08-18 15:18:35 -07:00
Without a set min_sdk_version the tests are built for
tip-of-tree which implies a 5.10+ kernel which then
results in them failing when installed on pixel 4/5
test devices with 4.14/4.19 kernels.
(Not sure how this ever worked, that should in
theory always have been illegal... I guess we've
been lucky...)
Bug: 439093090
Bug: 439218498
Flag: EXEMPT mainline
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2b02d314f70f771cb4d29758fe5dfe557a664638
Maciej Żenczykowskicommited 2025-08-18 13:46:28 -07:00
Should fix observed failure on a Xiaomi S device with 4.19 kernel:
I NetBpfLoad: NetBpfLoad v0.42 (/apex/com.android.tethering/bin/netbpfload) api:31/31 kver:413009d (64-on-aarch64) libbpf: v1.4 uid:1000 rc:10
I NetBpfLoad: Tethering APEX version 360911260
E NetBpfLoad: bpfGetNextMapId(final 15) returned 0 errno 2
W NetBpfLoad: Enabling bpfCmdFixupIsNeeded.
...
W NetBpfLoad: libbpf: BTF loading error: -2
E NetBpfLoad: btf__load_into_kernel failed, errno: 2
E NetBpfLoad: Failed to create maps: (ret=-2) in /apex/com.android.tethering/etc/bpf/mainline/offload.o
E NetBpfLoad: Failed to load object: /apex/com.android.tethering/etc/bpf/mainline/offload.o, ret: No such file or directory
E NetBpfLoad: === CRITICAL FAILURE LOADING BPF PROGRAMS ===
(errno 2 is ENOENT)
Bug: 438099891
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I07eea956fe6b862c68d3679dbd9eac81bec05e71
Maciej Żenczykowskicommited 2025-08-18 12:56:44 -07:00
Add to hsum-presubmit the same tests that we have in
tv-presubmit.
Bug: 397521796
Test: test-only change
Flag: EXEMPT TEST_ONLY
Change-Id: Iaa1dd6dca1147e3b5e9715a6c4cedf6ed71469b9
Lorenzo Colitticommited 2025-08-18 18:43:21 +09:00
Updated IngressDiscardKey to use Type.IpAddress for its BPF
destination address field (dstAddr) and java.net.InetAddress
for its corresponding Java field
Bug: 392509494
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Flag: EXEMPT refactor
Change-Id: I24b3087c3c7f2ea25afe0f78729e01a7504e13cb
Updated LocalNetAccessKey to use Type.IpAddress for its
`remoteAddress` BPF field. This enables the BPF map to
store both IPv4 and IPv6 addresses for this key.
To ensure proper functionality with IPv6 addresses, a new
unit test, `testAddLocalNetAccessAfterV_withIPv6`, has been
added to BpfNetMapsTest.java. This test specifically
verifies adding and retrieving local network access rules
using an IPv6 remote address.
Bug: 392509494
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Flag: EXEMPT refactor
Change-Id: I005f4f2b778ca2d3a4e6578c1440162532f8d004
Corrected the comment in Android.bp regarding the target SDK version. In NetBpfLoad.cpp, added specific handling for RiscV builds to account for its undefined minimum API level. Added an error to ensure NetBpfLoad is always compiled within an APEX. Clarified that `minSupportedKernelVer` must be 0 for APEX builds to enable runtime kernel version enforcement.
Bug: 438908493
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie3affbfd702ff1f6d5f2887b6f56ade0ed7fb5dd
Maciej Żenczykowskicommited 2025-08-15 14:58:10 -07:00
If an app registers a network agent and doesn't have NETWORK_FACTORY or
PERMISSION_MAINLINE_NETWORK_STACK, but does have
CREATE_APP_SPECIFIC_NETWORK, ConnectivityService will:
- Allow it to create a network
- Force the capabilities to contain only the app's UID
- Force the network to be restricted
- Ignore attempts to change the UID or make the network non-restricted
Test: TH
Flag: android.net.platform.flags.create_app_specific_network_permission
Bug: 435313135
Change-Id: I5a9517515e64f799c88aca4a51636b1a08e15817
We're adding a lot of 'isAtLeastKernelVersion(x,y,z)' checks,
that would ideally compile time optimize out whenever possible.
Note: we should be able to bump the '__ANDROID_API__ == 30' assert
in NetBpfLoad to 31/S any day now, since technically tip-of-tree
only goes into M-2025-11 which requires S. But none of the
prep work for that is ready yet.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4d9a7916833f086cd36011e094005999fe770583
Maciej Żenczykowskicommited 2025-08-14 20:10:43 -07:00
The only real way readValue(K) can fail while iterating
is if K gets deleted *while* we're walking the map.
That shouldn't be able to happen, and even if it does,
we're better off simply continuing and getting what data we can.
Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia286b4067546ef550cd1d9e6864fcddd9d0e5951
Maciej Żenczykowskicommited 2025-08-14 20:10:43 -07:00
Most spots autoconverted, but this one needs special love.
Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I40b29d989c5a51082ac8e9ab09b7644eee46d7cb
Maciej Żenczykowskicommited 2025-08-14 20:10:43 -07:00
but still fallback to 1400 if we don't know any better
Bug: 432676104
Test: TreeHugger, mm in p/m/C
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7e1d70e73d2fd24d1f79dc40f3b18a6d82d235ef
Maciej Żenczykowskicommited 2025-08-14 09:37:48 -07:00
MdnsSocketProvider expects no overlap between NetworkCallbacks,
Tethering, and Wifi P2P. However, local NetworkAgents can cause
overlap, leading to duplicate sockets. This commit fixes the issue by
skipping networks with NET_CAPABILITY_LOCAL_NETWORK.
Alternatively, the NetworkRequest should addForbiddenCapability
for local networks. However, since this is a module API, it is
not visible to standalone applications.
Flag: EXEMPT bug fix
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.mdns.MdnsSocketProviderTest \
--update-device
Test: m service-connectivity-mdns-standalone-build-test
Test: atest CtsNetTestCases:android.net.cts.NsdManagerTest \
CtsNetTestCases:android.net.cts.NsdManagerDownstreamTetheringTest
Bug: 437038495
Change-Id: I78dd7d98ad80147ca26ec6130b6081ef4efb2ecc