Root cause not yet located, disable test to unblock TH.
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsHistoryTest
Bug: 302325928
Change-Id: I618090b67e428ab911ec88e7daab30c14cccbf64
This is a no-op change and refactors the design for subsequent
TTL expiration check changes.
- Add a ServiceExpiredCallback to notify expired services.
- To simplify the design, pass the CacheKey to MdnsServiceCache
methods instead.
Bug: 265787401
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I930a4f7baf9b8d3d0037dc6aefd717dbdd486520
Override Vpn.setUnderlyingNetworks() to do a direct call on the
network agent instead of relying on the Vpn class.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: Ib7883f8a81a22317616cae79ce57a30afdd2bed4
Call setRequireVpnForUids directly to enable lockdown instead of
calling the real Vpn method.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: I91ec59f7542d145e9250a7e7a414593db3d99424
This doesn't do anything at this patchset, but the whole
pipe from the agent to ConnectivityService is built.
LocalNetworkInfo will be the name of the public information
sent in callbacks to clients.
Test: CSLocalAgentTests
Change-Id: I70e133031ef3b0aaf6c3e59ccc2ad895c66d339c
This patch does the following :
• When a network is local but the system doesn't support it,
throw in registerNetworkAgent.
• When a network is local, tell netd about it.
• Add tests for the above, as well as a test for callbacks
being sent correctly when the caps are set and not when
they aren't and that the new keep connected flag is
respected.
Telling netd about the network being local has it add two
routes that do not exist if the network is not local :
• One at PRIORITY_LOCAL_NETWORK matching unmarked sockets
and looking up the table for the interface.
20000: from all fwmark 0x0/0x10000 lookup xxxx
• One at PRIORITY_EXPLICIT_NETWORK matching explicitly on
network 99, so that dnsmasq traffic and any OEM traffic
marked for network 99 flowing there.
16000: from all fwmark 0x10063/0x1ffff iif lo lookup xxxx
IMPLICIT_NETWORK and EXPLICIT_NETWORK rules are installed
by connectivity service as a matter of course whether the
network is local or not.
See commit If8729fc6f3716a580c936584b851bc38000b5de5 for
implementation details of this mechanic.
There is no need to implement anything in particular for the
new connected reason, as the current implementation will
already keep it connected. A new test makes sure of that.
Test: FrameworksNetTests
CtsNetTestCases
FrameworksNetIntegrationTests
NetworkStackTests
NetworkStaticLibTests
TetheringTests
MtsTetheringTestLatestSdk
TetheringIntegrationTests
Change-Id: I6fb7dfe4c232eea8cac9ac268897ddb36bb794d1
* changes:
Ensure nri is satisfied before returning.
Add testLockdownVpn that mocks platform VPN.
Make variables in testLegacyLockdownVpn() final.
Update testLegacyLockdownVpn to mock VPN.
When a network preference is set, the highest priority nri will
be a managed default request that disallows default networking.
In the case where there is no satisfying network,
mNoServiceNetwork is used as the satisfier instead of null.
(see computeNetworkReassignment)
mNoServiceNetwork should not be returned in any public API.
Check for the nri being satisfied before returning the satisfier
to ensure mNoServiceNetwork is not returned.
Fixes: 301222648
Test: atest FrameworksNetTests
Change-Id: I22d67a7e8d0274d8ad4f6123fbedf6d37eed18e7
Add a test for lockdown vpn that uses TYPE_IKEV2_IPSEC_PSK and
mocks platform VPN by override in startLegacyVpnPrivileged().
In the context of ConnectivityService, setVpnDefaultForUids()
is the main interaction.
Refactor testLegacyLockdownVpn to take a VpnProfile and assert
behaviors with and without setVpnDefaultForUids().
This includes:
1. Updating callback asserts and assertActiveNetworkInfo to
reflect setVpnDefaultForUids().
2. Adding TODOs where mCm.getActiveNetworkInfo() returns
unexpected values.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: Ida4a4bc745af5ba2fc251795b2ffca56ead79b7f
The created handler thread will stay there for a while until
all the tests are finished. This is considered as a leakage
which will take the resource from the devices. In low end
devices, this may possibly impact the performance. The created
threads should be closed explicitly.
Test: atest ConnectivityCoverageTests ConntrackSocketTest
Change-Id: Ic1beb2a210e7c8c80c66fc9e0727c47599150672
* changes:
Prepare exposing Network{Request,Caps}.forbiddenCapabilities
Add a keep connected for test reason
Improvements to CSTest : legacy type, wait for LOST, permissions
This has been sorely needed for a while. Instead of filing requests
for each of your networks in a CSTest, which is fiddly at best and
sometimes almost impossible (because you can't single out the network),
you can now add this flag and be done with it.
Test: CSKeepConnectedTest
Change-Id: Ie168fe1f3a17de035fdf05e3d6580d3262a3448e
• Make sure all Agents have a legacy type. This is necessary to
avoid crashes in LegacyNetworkTracker
• Wait for LOST when disconnecting a network
• Make sure the test package sees its own permissions (importantly
it can't see background networks otherwise, because it lacks
CHANGE_NETWORKING_STATE)
Test: in the followup
Change-Id: I9f699b6372a8fe0d5bcd5310d8f35f72e48a6c61
service-connectivity-mdns-standalone-build-test builds the mDNS
discovery and advertisement implementation against API level 21.
This stops the advertisement code from calling new NsdServiceInfo
public or private APIs which are required by Thread.
This commit removes the mDNS advertisement code from the standalone
build to loose the check given this will never be used by GMS Core.
Bug: 265095929
Test: verified that it can build with aosp/2608627
Change-Id: I32cfce7b994d51a4b4ec468e9f79ffc2be6635ff
Per RFC6762#8.1, a host can simultaneously probe for uniqueness
of its "A" record and all its SRV records [RFC6763] in the same
query message. Add a flag to include the A/AAAA records in the
probing packet if necessary.
Test: atest FrameworksNetTestCases NsdManagerTest
Change-Id: I365a938a6c481df755a0598b175069b94905fa3b
Override more VPN methods to mock the VPN interaction of
testLegacyLockdownVpn instead of relying on the Vpn class.
This includes:
1. Overriding startLegacyVpnPrivileged() and avoid creating
a VpnRunner.
2. Removing expectStartLegacyVpnRunner() since it is not
used when startLegacyVpnPrivileged() is overridden.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: Id55d8d6cd03b84bca815cd331eb0f7d584eaed5f
In testLegacyLockdownVpn, remove the fail check on IPv6 networks
and add coverage in VpnTest instead as this interaction relies
on the Vpn implementation, not ConnectivityService.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: Ib24809ece2332c4c3d3e08c168e02ad859242eac
The test coverage of LockdownVpnTracker has been moved to a
separate unit test file. testLegacyLockdownVpn now calls the Vpn
methods directly instead of creating a new LockdownVpnTracker.
Note this removes calls to expectStopVpnRunnerPrivileged since
stopVpnRunnerPrivileged is now directly called in the test so it
is already guaranteed to be called.
The expected calls/behavior of LockdownVpnTracker can be seen in
LockdownVpnTrackerTest.
Bug: 230548427
Test: atest FrameworksNetTests
Change-Id: Id9d26435bf62ffef954f6c7fa0558ce99540de1f
For general internet access, a specialized slice is generally
not preferable to a non-specialized network.
Test: new test in this patch
Change-Id: I052ce923300566807999b2f20f5911181fb761dd
- Watches don't support VPN apps.
- The HostsideVpnTests CTS tests are already skipped on watches.
- The tests for VpnManager VPNs do run on watches, but there isn't
actually a way to start a VpnManager VPN on a watch because there is
no way to display the consent dialog to the user.
- The VpnService CTS tests verify the VpnService API on watches
bypassing the consent dialogs.
- Because there is no way to start a VPN app on a watch, there's no
point requiring the VPN CTS tests to pass.
This CL disables the remaining VPN CTS tests on watches. This allows
watches to disable the VPN service, reducing startup time and memory
usage.
Bug: 286240194
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Idb7110232ae7e45cafc265cd4f955c2a6b22361c
Android's clat is for reaching the internet, which in general
never has an ipv4 L3 mtu higher than 1500.
(We could probably hit this on a jumboframe enabled IPv6-only
wifi network [ http://b/292057969#comment18 ] where RA claims
MTU of 9K [9170])
Bug: 292057969
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7a32455571458b8a3f1121ad980d54323b2ef06b
Test: FrameworksNetTests
Note that carrierPrivilegeAuthenticatorTest is already
an @Parameterized test with flag = on and off, so it
already tests both.
Change-Id: I52fcfd3f21a13d7a39952ba828464ce6ef4085c2
* changes:
Move the MULTI_SIM_ACTION receiver inline
Inline registerForCarrierChanges
Make mThread a local
Introduce a flag for using the carrier service changed callbacks.
Have DevSdkIgnoreRunner support @Parameterized parameters
This will be easier to read when this behavior is diverted
based on a flag
Test: FrameworksNetTests
Change-Id: Ifd7abd8ad82cb8307b1cd8535ac5fa82004404e6
The transaction id is a number that is used to identify a
specific query packet. But it's not necessary for probing
or announcing services, so the transaction id is not
currently used on advertising when creating a MdnsPacket or
decoding the response to a MdnsPacket. This means that it is not
possible to track which query packets have received
responses. Therefore, store the transaction id so that
it can be used for subsequent query packet changes.
Bug: 302269599
Test: atest FrameworksNetTests
Change-Id: I6734752b32b91678afb7df06e1fa51237cf70894