This is needed by tethering local network feature, given that
the IpServer needs to setup forwarding after native network
creation and before signaling network availability.
Test: atest CtsNetTestCases:android.net.cts.NetworkAgentTest \
ConnectivityCoverageTests:android.net.EthernetTetheringTest \
ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest \
--update-device
Bug: 349487600
Change-Id: I2bc2ec355e01be661b587406bd127dff11665047
This is a no-op refactor. Move the DiscoveryExecutor from
MdnsDiscoveryManager to a standalone class for subsequent
changes.
Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: Idbfbbb423ddfe78a37db1b189aef945401b0a1e9
This reverts commit a481dc184f.
Reason for revert: Update this change to ensure proper closure of the timerfd object.
Change-Id: I14530ba77a39c77b4c7af6855ec77ba4907ab9f9
This commit introduces the config_nsdOffloadServicesDenyList to
NsdService to allow OEMs to specify services that should not be
offloaded. This feature addresses potential memory limitations by
enabling selective offloading, providing OEMs with greater control over
resource management.
Test: TH
Change-Id: I846e7cfc37c3a71c50853707884cf0c0a9a6f971
ConnectivityServiceTest is a unit test and must never read
actual flag values from the device, because:
- If it did, its results would not be reproducible.
- At least on S and T, reading flags from device fails because
the test lacks the READ_DEVICE_CONFIG permission.
Instead, throw a clear exception if ConnectivityService checks a
feature flag that is not explicitly set in the test.
Test: test-only change
Change-Id: Ic3855ffa944f170f5fda9c3456776f5e1f2ef388
Lorenzo Colitticommited 2025-02-26 13:25:07 +09:00
* changes:
Get rid of volatile mIsAborted
Get rid of volatile mIsRunning
Add some more client network tests
Add test for when BluetoothSocket#connect throws
Add a test for when createInsecureL2capChannel throws
Add a test that brings up an L2cap server network
Move creating L2capIpClient to Dependencies
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-25 14:17:58 -08:00
These optimizations are already launched to all public Pixel
devices and were in in 25Q2 beta releases as well. Enable them
by default on all supported releases. The appcompat risk is very
low (these changes are difficult even for an app to detect if
it's looking for them), the user benefits are substantial, and
there is a kill switch if any unforeseen issues do occur.
Bug: 327038794
Test: both codepaths are covered by existing tests
Change-Id: I42c7ceb71ef02d078bf4563744cb11afd412f267
Lorenzo Colitticommited 2025-02-26 04:24:58 +09:00
* changes:
Add missing javadocs to satisfy linter
Make linter happy
Use ThreadLeakMonitor for CSL2capProviderTest
Add some tests to ensure BluetoothExceptions are handled
Move creating L2capPacketForwarder to dependencies
Patrick Rohrauthored and Gerrit Code Reviewcommited 2025-02-21 15:04:40 -08:00
Instead of disallowing mDNS on interfaces that specify IFF_POINTOPOINT,
the code should check for the presence of IFF_MULTICAST instead. It is
perfectly valid to support mDNS on point-to-point links, such as IPv6
over BLE networks, if they support multicast.
Change-Id: I282a039483ad1d677d31e5169d53bbae25a1c9c4
Test: TH
This CL introduces ThreadLeakMonitor for CSL2capProviderTest.
ThreadLeakMonitor ignores threads with unique names, so all
L2capNetworkProvider related threads must specify a name.
Test: TH
Change-Id: I7cfcc93ab562a1ada2058d8c73e968a8d0005b1d
This is just the beginning.
Also fixed a bug that put(null) on the blocking queue, which apparently
is not supported.
Test: TH
Change-Id: I26f6669f483d76fcba83735bb6d32880e23dd451
This is a no-op refactoring (except for logging) in preparation for an
upcoming CL(aosp/3502915) that will use SkDestroyListener to close quic
connections for destroyed quic sockets.
Test: atest FrameworksNetTests
Bug: 311792075
Change-Id: I41e2a16075fc9242cae19f84d1255358333744ab
Addressing feedback from previous change "Adding stacked link addresses
to local_net_access map" and adding more test cases for impact of
stacked link properties on local network prefixes.
Bug: 369815823
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSLocalNetworkProtectionTest
Change-Id: I4d32d86d3e083a1a14b845583fd80a7a4b18ae5f
* changes:
Fix test comment
Enable header compression when requested
Implement 6lowpan header compression
Add a basic CSTest for L2capNetworkProvider
Release network reservations in tearDown
Start L2capNetworkProvider in CS
Revert "Join HandlerThread if BLE is not supported"
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-18 21:39:41 -08:00
This implements 6lowpan header compression per rfc 6282. While the
decompression logic is full-fledged (to accept almost any 6lowpan
compressed packet on ingress), the compression logic does *not* actually
compress the packet.
Fully fledged compression might be submitted in a follow up, to make
integration testing possible.
Test: TH
Change-Id: I5ea98a06e502fe0752cfe827dbdf8ee4a7dfb24c
This moves the tests that used to be in L2capNetworkProviderTest into a
CSTest based CSL2capProviderTest; however, it still only tests that
reservation offers are created in response to reservation requests.
More thorough tests will be added in follow ups.
Test: TH
Change-Id: I0b243f4517ee41376716cf4930f90657c4bc77b0
Starts L2capNetworkProvider in ConnectivityService. Alternatively, this
could be moved to ConnectivityServiceInitializer instead in a follow up.
When L2capNetworkProvider is created, it starts a handler thread, so
makeL2capNetworkProvider must return null in tests as otherwise the
thread leaks.
Test: atest NetworkReservationTest
Change-Id: I35c14815b1a71f0739c1bf63ad466763d611434c
Iterating over stacked link address to ensure correct mapping for
interface to local network ip prefixes.
Bug: 369815823
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSLocalNetworkProtectionTest
Change-Id: I3b2ed906caf43584ffb0e8041f9302c760099f7b
Whenever ip interface is updated, we are updating local network
addresses. These may include dns servers that are needed to be excluded from
restrictions.
Bug : 393354879
Test: Manually and atest
ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSBpfNetMapsTest
Change-Id: Id4ebb33ab7de84ac1c81d485e599779c460bacdc
Whenever LinkProperties is added/modified/removes, we are updating local
network prefixes for the modified interface/addresses. These prefixes
are used by BPF egress and ingress cgroup hooks to disallow local
network packets if the calling application do not have required
permission.
Bug: 369815823
Test: Manually tested
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSLocalNetworkProtectionTest
Change-Id: Ie592ecb948ae05a0a73f47d0573560eb705f6bcf
* changes:
Check whether a NetworkRequest is already tracked
Check whether client NetworkRequest includes a valid specifier
Add empty ClientOffer
Delete L2capNetworkProviderTest
Add support for an L2CAP server network
Patrick Rohrauthored and Gerrit Code Reviewcommited 2025-02-14 15:10:29 -08:00
To add PERMISSION_SDKSANDBOX_LOCALHOST which is used in the same bitmask
as permissions declared in INetd.aidl but doesn't need visibility to the
platform.
Bug: b/326383676
Test: NetworkTrafficPermsTest
Flag: N/A
Change-Id: Id7a36f5659f8fd7542a87671d4b5f067d66db34e