This patch fixes EthernetManagerTest as follows:
(1) testEnableDisableInterface_disableEnableEthernet
Fix the test error when USB interface is present and treated as
ethernet interfaces.
(2) testRemoveInterface_disableEnableEthernet
Fix the error When tethering interface already presents.
Bug: 427055553
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline
Change-Id: I2a31f3f0434b35e9ebe96b4f7003e5a9be0d3e81
Reduce the number of multicast addresses used in
`test_igmpv3_general_query_offload` to simplify the test case and
focus on the core functionality.
Flag: EXEMPT mainline
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Change-Id: I332c8d43bd89a444728ed7ebde3f4e064e4e39aa
Previously, IPv4 and IPv6 addresses were retrieved in `ApfTestBase.setup_class`,
which meant all APF tests assumed the presence of both.
This change refactors `ApfTestBase` to introduce dedicated methods:
- `get_and_expect_ipv4_addresses_exist()`
- `get_and_expect_ipv6_addresses_exist()`
These methods now handle the retrieval and assertion of IP addresses.
Individual test cases in `ApfV6Test` are updated to call these methods
only when the respective address type is required for the specific test
scenario.
This improves test robustness by ensuring tests only depend on the
necessary IP addresses, allowing for more precise test setup and failure
reporting. Additionally, the doze mode activation is reordered to occur
after initial network setup.
Flag: EXEMPT mainline
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Change-Id: I340bcb77fe66cc9927dcd58e5899cdf9a4375daa
This patch checks if interface name is null or empty for
RtNetlinkMessage and ignores the message if it is.
Bug: 429497348
Test: build
Flag: EXEMPT bugfix
Change-Id: I6000f5442f341f152b7fbd235affded0fa56fe50
These tend to be huge (because they can contain the full bpf disassembly)
but not very worthwhile, because they often result in logs being rate
limitted, and thus we miss out on the useful information.
This is particularly true for user builds on non-Google devices
installing the production signed tethering apex mainline module.
We're better off seeing more of the other log lines...
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie25a60c2e602772ab0de2050e7964f0202ff2685
Maciej Żenczykowskicommited 2025-07-15 15:00:25 -07:00
Not needed any more, since no more loader vs .o version skew.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6c0b9ff2683809f3e732ec950bc91cf87040642f
Maciej Żenczykowskicommited 2025-07-15 14:46:10 -07:00
For libbpf compatibility we will want to have a 'normal' looking
.maps section & an android-only .android_maps section.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9114d27c408cb084626ec1151826ae722797296f
Maciej Żenczykowskicommited 2025-07-15 14:43:49 -07:00
This is not needed, as this is now simply hard coded (along with the
.o names themselves) inside of NetBpfLoad.cpp itself - see loadAllObjects().
Even if it wasn't, we're better off using the per-map & per-program
limits instead. These will already cause all maps/programs to be skipped...
(The only reason to have a global per .o one was to solve
.o vs loader version skew issues, which we can no longer have)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8e8f62ed3534d54dd3382df53637f76bb72dab5e
Maciej Żenczykowskicommited 2025-07-15 14:40:11 -07:00
No longer needed, since there is no longer any possibility of .o vs loader version skew.
'git grep size_of_bpf_' finds nothing
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iba7799b5670008dfceeebca10fa42c3f6bd3273e
Maciej Żenczykowskicommited 2025-07-15 14:28:59 -07:00
* changes:
bpf/progs/netd.h: use defines for some map SIZE constants
bpf/progs/netd: remove DATA_SAVER_ENABLED_MAP_SIZE constant
bpf/progs/netd: remove some constants
Treehugger Robotauthored and Android (Google) Code Reviewcommited 2025-07-15 13:57:05 -07:00
This is better for libbpf...
Test: TreeHugger
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie9ccb37498b89e638fba1e48535d1108536080f1
Maciej Żenczykowskicommited 2025-07-15 12:24:16 -07:00
(only needed by test, but this is really just a single boolean)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3cf8ae1ca474ccd3feba6d6346428a46c3020122
Maciej Żenczykowskicommited 2025-07-15 12:20:24 -07:00
These aren't used anywhere else, furthermore switching to libbpf
would require these to become #define's.
Let's just hard code them instead.
Test: TreeHugger
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie8026c519e90800f59b5b7ad3826c7902243d5ac
Maciej Żenczykowskicommited 2025-07-15 12:20:16 -07:00
We haven't done a good job of keeping this comment relevant...
might as well just delete it.
Test: N/A
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia822ce214cf3d35e10c71f0fe84280a354b1b8c0
Maciej Żenczykowskicommited 2025-07-15 12:15:18 -07:00
The suspension state is designed to be a transient state. Implement an
enforcement to disconnect the network after staying at this state for 5
minutes. This can avoid apps unnecessarily waking up the device for
network activities even when there's no network actually connected.
Test: unit tests. Locally tested with a signal blocking bag.
Bug: 404570281
Flag: EXEMPT mainline
Change-Id: I1427a72402f7ec64eda537a89c86768466a72328
This refactoring changes how the bluetoothUseRandomAddress flag is
accessed.
PrivateAddressCoordinator is in a library used by multiple mainline
modules(Tethering, NetworkStack, CaptivePortal, WiFi) and cannot
directly read a Tethering mainline beta flag.
To fix this, the flag's value is now passed down through constructors.
An alternative solution would be to split the Java library for each module,
but with this solution, a single utility class cannot be shared.
This commit is a no-op as the passed value is hardcoded to false.
Test: TH
Flag: EXEMPT refactor
Bug: 287177081
Change-Id: I5f2174ee94b55e7a7298b9742221d6e6c3c5cac5
This reverts commit f2cb190a73.
Reason for revert: This is the integration test CL, it will break due to ag/34545776 reverted.
Change-Id: I5fc66fab409989479078dfcffea7793b9d6dd749
Yuyang Huangauthored and Android (Google) Code Reviewcommited 2025-07-13 22:23:21 -07:00
This reverts commit 1bcbb88955.
Reason for revert: fix TelephonyCallback in multi SIM mode
Bug: 430233890
Change-Id: Ibfdc5546083132c504ac129256f321dd000b890c
This will allow portal operators to opt-in to custom tabs in
captive portal, either across the board with "true" or with
a version of the module above which it wants to opt-in.
Ideally there could be a separate key to also list opted-in
browsers and their versions, but this would become a lot
more complex. To start with, there is no place in
CaptivePortalData to store this kind of info, and that would
mean adding API which would have to be supported forever.
The constant inside the source represents a capport source that
contains the custom tabs opt-in. This is not a great place to put
this information in, but it has the characteristics of a benign and
useful hack :
- Time to market is 0
- It's easy to remove once we have a better API
- It's not a large problem if it's never cleaned up
Also, allowing to choose the browsers and the versions would
be uncomfortable since the choice of the browser is the user's
choice. On the one hand it does make some sense that the
operator could test with a given browser, see the UX is not
well adapted, and reject it, but on the other hand giving the
operator the choice of what browser the user can choose to
use on their portal is disputable, as this should generally be
under the control of the user.
In any case even if we decided to add a per-browser version
check it should be done in some other change.
Test: manual
Flag: EXEMPT opt-in feature
Change-Id: I540f4fcb6fb26f7f18077d9c8d06e5f7df206056
Before moving VCN code, add the new code locations to the
"visibility" fields of Connectivity dependencies.
Bug: 379938062
Flag: EXEMPT; visibility changes
Test: presubmit
Change-Id: I51becaacb93d5e43b8b8234b80cb9b272181ad01
This is a preparation CL before moving VCN code from frameworks/base
to p/m/Connectivity/
This CL defines a utility lib so that the VCN framework code can
use HexDump. With HexDump, VCN will define another lib for the IPsec
module.
Bug: 379938062
Flag: EXEMPT; pure refactoring
Test: FrameworksIkeTests, CtsIkeTestCases
Change-Id: I9bc8b37779315841c2a93328942d073b6bf40808
This is a no-op, test only refactoring.
Move ethernet state management logic from EthernetManagerTest into a
dedicated JUnit test rule, RestoreEthernetRule. This new rule is
responsible for saving the initial ethernet state, allowing tests to
enable or disable it, and restoring the original state upon test
completion. This refactoring simplifies EthernetManagerTest and
promotes code reuse.
Flag: EXEMPT EXEMPT test only refacotring
Test: atest NetworkStaticLibTests:com.android.testutils.RestoreEthernetRuleTest \
CtsNetTestCases:android.net.cts.EthernetManagerTest --update-device
Bug: 410731080
Change-Id: If3dd869d6af4e0c659386621fb5d92012aa574d1