Mdns: Skip networks with NET_CAPABILITY_LOCAL_NETWORK
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
2 files changed