This seemed to have been an oversight in the original change. There is
no need to call getInterfaceTrackingReason here; it can just use the
tracking reason that is passed to the function (and passed to
addInterface above).
Test: TH
Flag: EXEMPT mainline
Change-Id: I33322c5bfeaaf8f11f3251aff1b1ccac845a993b
bpf_helpers.h has the same definitions
Test: m tcpAccECN.o
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Ie5b47bdcbc2aa8d4563cf3ec0806f8dfc6861801
This CL also sets the min kver to 5.10.
skb_tcp_flags field in bpf_sock_ops was introduced on 5.10 kernel
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I71696e0bf3b36296c5f2e7fd5b692406d96ddf97
CRITICAL section was removed by ag/33605170
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I6de89edd7547ede1ecdd18b5ee80fb9bc1977915
$ 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
The service-side TrafficStats rate limit cache is no longer needed as
client-side caching is now solely responsible for rate-limiting traffic
stats queries.
This commit removes:
- The `clearTrafficStatsRateLimitCaches` AIDL method.
- The service-side cache implementation, including member variables and
logic within `NetworkStatsService`.
- Related feature flags and constants used for the service-side cache.
- All unit tests specifically for the service-side cache.
This simplifies the overall traffic statistics caching architecture by
centralizing rate-limiting responsibility on the client side.
Flag: EXEMPT refactoring
Test: atest ConnectivityCoverageTests --test-filter '.*NetworkStats.*' --update-device
Test: atest ConnectivityCoverageTests --test-filter '.*TrafficStats.*' --update-device
Fix: 428098676
Fix: 428097311
Change-Id: I41cbb80a52f04dcf387c3352677a91cb692ffe73
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