aosp/2405720 allowed network owner uid to see allowed uids
But this breaked old cts.
This CL reverts the behavior for network owner uid.
Bug: 312093253
Bug: 313025186
Bug: 312196228
Test: TH
Change-Id: Iaa732d22f67ecce7678e68bb8b20cec526116dc9
This reverts commit 11eac8e12b.
Reason for revert: there are devices in the field using usbX interfaces for tethering
Change-Id: I7bbcbb703294de1c9dd3e0390bc8ad28aa350ef6
Lorenzo Colittiauthored and Gerrit Code Reviewcommited 2023-11-29 11:09:44 +00:00
Check if the bpf loader rc file is differs from the template files when
ConnectivityService starts. Use Log.wtf() to log the file if there is a
diff.
Bug: 312638861
Test: TH
Change-Id: I0b9ed9962ad0954a051a17b01357d04a0e655ff4
In multi-user environment, the App might not be installed by system user.
As a result, the ConnectivityService should use the packageManager from
the user's context to be able to read the property correctly.
Bug: 300274339
Test: TH
Change-Id: I5398c95562bcaf5752270b52f38cca1f02698ba1
In PrivateDnsConfig class, `useTls` is replaced with `mode`.
This CL a corresponding change.
Bug: 240259333
Test: atest ConnectivityCoverageTests
Change-Id: I60c53e52f287fc7fa05543603a62632d934bb2e6
On mobile networks it is more likely that the user needs to top up or
get a mobile data subscription, rather than "sign in" as the previous
messaging was suggesting.
Following feedback from interaction designers / UX writers, change the
strings to be more appropriate for the most common use-case.
Bug: 153673376
Test: atest FrameworksNetTests
manual test on mobile network force-detecting a portal.
Change-Id: I5b4d4a17fd507d8cf3c9863cf23b5fedb258852e
* changes:
Rename hasCarrierPrivilege... to isCarrierServiceUid...
Detect discrepancies in subIds
Allow carrier service UIDs to access their own WiFi networks.
Jean Chalardauthored and Gerrit Code Reviewcommited 2023-11-20 06:55:04 +00:00
This method tests whether the UID is the carrier service
UID, not whether the UID has carrier privilege.
Note that in normal operation, the carrier service UID always
has carrier privilege.
Test: NetworkAgentTest
Change-Id: I30f8814cc0419a2d6bdbe75fdc82156516eba026
The subIds in network capabilities are stored both in
the network specifier (for telephony) or transportInfo (for
wifi), and in a separate field in NC, which are seeded
differently. These should in principle never diverge if there
is no bug in the network factories code, but since this code
is OEM-specific, it's very hard to know whether it's the case.
Historically CarrierPrivilegeAuthenticator has been using the
specifier / info to find out about the sub id, but reading
from NetworkCapabilities#getSubscriptionIds() would be both
nicer and more future-proof. Log a terrible failure in case
they differ, so we can confidently switch to the latter if
we don't see any such log.
Change-Id: Ifdf67318ceb881349e322591632c18a4dbf218e1
Test: NetworkAgentTest
This tests that the network providers are subject to appropriate
limitations as to what they can set as allowedUids – both in the
positive (can do) case, and the negative (can't do) case.
Test: this
Change-Id: I115e2a4bc02ddcd03ecf2f35130fcb0378da22bd
This reverts commit 30fb9b1ca4.
Reason for revert: Potential culprit for CtsLibcoreTestCases test failures b/311612650
Change-Id: Ie7de97159f92a174476a8fa8ea83e3e01914aea1
Michał Brzezińskiauthored and Gerrit Code Reviewcommited 2023-11-17 11:18:56 +00:00
As a specialized network, a network with PRIORITIZE_* is not
generally a good default network, and might cause unexpected
charges if allowed to become one.
Test: CSDefaultNetworkTests
Change-Id: I8f7184f80bb987da720bd067862bd7a546a38e26
Ideally the rules should be set up before onAvailable is
sent, but onLocalNetworkChanged should be sent after.
The previous code had CSLocalAgentTests#testForwardingRules
flaky because it was waiting for onAvailable and immediately
checking that the routing rules have been set up.
There are other ways to fix this flake (e.g. wait for
onLocalNetworkChange in the test or add a timeout on
the verify(netd) call) but this patch probably implements
the best production code behavior.
Bug: 309688089
Test: CSLocalAgentTests#testForwardingRules 1'000 times
Before this patch : flakes after 50~200 iterations
After this patch : no flake in 1'000 iterations
Change-Id: I4dcccaa3607c1e28aa89f268f0c721d87b1e9466