summaryrefslogtreecommitdiff
path: root/service/src/com/android/server/TestNetworkService.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add a method to create a TAP interface with a given interface name."Xiao Ma2022-04-221-7/+22
|\
| * Add a method to create a TAP interface with a given interface name.Xiao Ma2022-04-211-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a method that allows the caller to specify whether to create a tap interface with a given specific interface name instead of the default one. So far only the given name that starts with "v4-testtap" or "v4-testtun" prefix is allowed. That's helpful to create a clat interface which always has "v4-" clat prefix in the IpClient integration test, to verify the callbacks happend on adding/removing clat interface. Bug: 163492391 Test: atest CtsNetTestCases Change-Id: I9ea7013fce919cafb719998a123164b5507f9ac0
* | Make test networks not be VPNsLorenzo Colitti2022-04-131-0/+1
|/ | | | | | | | | | | | | | Make this change for below reasons: - This API is intended to be used for testing. - This change correct because almost all the tests that use this API are not doing so to create VPNs. - It makes it easier to write tests for IKEv2 VPNs because without this change, a VPN that is restricted to test networks would pick itself as the underlying network(since it does not have NET_CAPABILITY_NOT_VPN). Test: treehugger Change-Id: I91582f398e426c0efb2dec28943df5f572e1c8da
* Add a method to create a TAP interface without bringing it up.Lorenzo Colitti2022-03-171-25/+7
| | | | | | | | | | | | | | | | | In S, the behaviour of createTunInterface and createTapInterface changed so that they bring up the interface before returning it. This makes it difficult to test code that brings interfaces up itself, such as IpClient or EthernetManager, because the tests cannot predict whether that code will see the interface up or not. This leads to flaky tests and can even make it impossible to reliably test some behaviour. Add a method that allows the caller to specify whether to bring up the interface or not. Test: new codepath tested by other CL in topic Test: existing codepaths already well-covered Change-Id: I0f7698f4dad132f201db4203e65a78c6af564ab2
* Fully setup test TUN iface on create.Cody Kesting2021-06-091-9/+2
| | | | | | | | | | | This CL updates TestNetworkService to fully setup test TUN interfaces when created. Previously, the interface was only created in netd when the Test Network was created. Bug: 182291467 Bug: 189125789 Test: atest Ikev2VpnTest IpSecManagerTunnelTest Change-Id: I4c1262e566517bbb03dd610f595e4d18bc4e7735
* Remove NetdService, NetworkStackClient dependencyRemi NGUYEN VAN2021-06-011-2/+3
| | | | | | | | | | | | | | Netd should be obtained via getSystemService, and ModuleNetworkStackClient must be used instead of NetworkStackClient for modules. Original change (project moved): Ibe703ac56dd70673115cd8b95b44b856a7fc01f3 Bug: 171540887 Test: m Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f Change-Id: I6c8593712c0e86da139d425ef6240c5004e392e2
* Move connectivity sources to packages/ConnectivityRemi NGUYEN VAN2021-05-131-0/+386
The service-connectivity sources should be in packages/modules/Connectivity. Move them to frameworks/base/packages/Connectivity, so that the whole directory can be moved to the dedicated packages/modules/Connectivity git project. Bug: 186628461 Test: m Merged-In: I26d1a274058fa38763ad4f605549d880865b4d76 Change-Id: Ie0562db92ebee269b901926d763ae907bde61b98