summaryrefslogtreecommitdiff
path: root/packages/NetworkStack
AgeCommit message (Collapse)Author
2019-06-13Merge QP1A.190609.001Scott Lobdell
Bug: 135212124 Change-Id: I8cee91c5c647c253628d65da22bfb82469df09c4
2019-05-31Remove these subdirectories per b/133225687Baligh Uddin
Bug: 133225687 Test: Local compile/test. Change-Id: Ia0372082e059398b2759a4d6624a60f7b28116b4
2019-05-31Merge QP1A.190530.001Scott Lobdell
Change-Id: I802b7f465b775163726de0627cf9cb5e6773a190
2019-05-31Merge "Add OWNERS file to block further submits so we can start migration." ↵Baligh Uddin
into qt-dev
2019-05-30Merge QP1A.190523.001Scott Lobdell
Change-Id: I48bbfdee20d40d144a8628ca32c8e1ca97f172b2
2019-05-30Merge "Check system_server PID in NetworkStack calls" into qt-devTreeHugger Robot
2019-05-30Check system_server PID in NetworkStack callsRemi NGUYEN VAN
Add a check that callers with UID 1000 always have the same PID. This is a proxy for checking that no system is designed to bind to the network stack unless it is the system_server, as otherwise either the system_server would start crashing, or that system would not have access to binder calls. Also remove access from PHONE_UID as it is not being used. Test: Flashed, WiFi working, Bluetooth reverse tethering shows no permission issue. Bug: 133209255 Change-Id: Ib848aaaedfd599c1d4437378846c7dda74352019
2019-05-29Add OWNERS file to block further submits so we can start migration.Baligh Uddin
BUG: 133225687
2019-05-28Make the memory store operations serial.Chalard Jean
Bug: 128499160 Test: new test in this patch Change-Id: I6ccdc801e3888a61b22272c8ce9480f45fa26df2 (cherry picked from commit 3074f10b41fd1b622dc698d89e4c9e1bcb5b05cf) Merged-In: I10b5c5cd85fcb76924ba96c8c379be677774705d
2019-05-28Merge "Wipe the data in IpMemoryStore database upon network factory reset." ↵TreeHugger Robot
into qt-dev
2019-05-28Merge "Clean up for multiple validation result update" into qt-devChiachang Wang
2019-05-28Wipe the data in IpMemoryStore database upon network factory reset.Xiao Ma
Bug:128499160 Test: manual Test: atest FrameworksNetTests NetworkStackTests Merged-In: I13ad04454e638905b74dd42a1c83266c7c37652f Merged-In: Ia13ff10a57c2043f6676976f23ecfb2d2a9a6ef0 (cherry picked from commit ef6ef68c48b869aa9960edd81c73f3d31391ae26) Change-Id: I42507451d55a620c0e2d271c895ad158f348c1a5
2019-05-27Fix null IpmemoryService object in AGO project.Paul Hu
WTF will happen in RegularMaintenanceJobService due to scheduling job and starting maintenance job are in different processes. In AGO project, scheduling job use inprocess process. But starting maintenance job use networkstack process. So IpmemoryService objcet will be null when trying to do the maintenance job. Bug: 132763800 Test: Verify on both AGO and non-AGO projects that WFT will not happen. Test: atest NetworkStackTests Change-Id: I545fc8384ef7b3d97edf2270fa033d8afac2669c Merged-In: If7f61a8b5ddc8cdd25928cd35afa7fece2c8dde5 Merged-In: I8043c405b3c78d8dd1e71ec584d7a2fdaa2fd989 Merged-In: I545fc8384ef7b3d97edf2270fa033d8afac2669c (cherry picked from commit 20abd7d4e6c63b225de2e87595e5f2758353f894)
2019-05-27Clean up for multiple validation result updateChiachang Wang
This is a follow-up commit for aosp/955431 to update commets and minor updates in unit test. Test: atest com.android.server.ConnectivityServiceTest#testCaptivePortalOnPartialConnectivity Bug: 130683832 Change-Id: I581eae8daeddd2c4c186e7b40e27fef2aaa7ab43 Merged-In: I9087ef791b3fee5399ba8e83ef9d8a544845a4dd Merged-In: I4424663292c5ad29eb7a888fa6975835721a5d2e (cherry picked from commit 3d3a9fff7b7fa0df4ee627cb082668e642d6f754)
2019-05-24Update multiple validation result to ConnectivityServiceChiachang Wang
Once a network is determined to have partial connectivity, it cannot go back to full connectivity without a disconnect. This is because NetworkMonitor can only communicate either PARTIAL_CONNECTIVITY or VALID, but not both. Thus, multiple validation results allow ConnectivityService to know the real network status. Bug: 129662877 Bug: 130683832 Test: atest FrameworksNetTests Test: atest NetworkStackTests Test: atest --generate-new-metrics 50 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest Test: Simulate partial connectvitiy Change-Id: I406c9368617c03a2dd3ab15fb1f6dbf539d7c714 Merged-In: I243db4c406cca826e803c8035268bc0c6e6e01e2 (cherry picked from commit 4532abd4d2af9ad118873a63cafc6028ed87c52e)
2019-05-23Properly use versioned interfaces.Lorenzo Colitti
Our stable AIDL interfaces need to use versioned build targets, otherwise getVersion will always return 0, which makes it impossible to support different components at different versions. List generated with: find . -name Android.bp -exec egrep \ -H "(netd|dnsresolver|ipmemorystore|networkstack).aidl.interface(s?)-(java|cpp)" {} \; \ | grep -v oemnetd | grep -v tests/ Test: m Bug: 133124190 (cherry-pick from aosp/968011) Merged-In: Idf49e840263ef32b9ee4fafa6718d4f893ea7c87 (cherry picked from commit 433f7c4178aaadac7d6a5f6727f39ef83342d436) Change-Id: I77e2291b52fda24ee01e1b22ddafe4fe7368959e
2019-05-23Move the NetworkStack tests to unit/ to add an integration test.Lorenzo Colitti
Test: m Bug: 133389827 (cherry pick from aosp/960932) Merged-In: I7aeab47b31429b1f9a42f9b170aeba238c133950 Change-Id: Ie455b7a6a950cb5e34841efc3738c11fe1fd12f0
2019-05-22Merge "Address comments on dumpsys network_stack version" into qt-devRemi NGUYEN VAN
2019-05-22Address comments on dumpsys network_stack versionRemi NGUYEN VAN
Track a set of versions instead of just the latest seen version, and print versions in the standard dumpsys network_stack as well. Also add version tracking for the netd aidl interface. Test: Flashed, dumpsys network_stack and dumpsys network_stack version Bug: 133124190 Change-Id: I9bf21b10b02f605ef7b85aceb808a5437d936f85
2019-05-22Merge "InProcessNetworkStack requires platform-signed APK" into qt-devRemi NGUYEN VAN
2019-05-22InProcessNetworkStack requires platform-signed APKRemi NGUYEN VAN
PlatformCaptivePortalLogin must be used with InProcessNetworkStack instead of CaptivePortalLogin, since the signature of the APKs must match. Bug: 132666298 Test: Flashed walleye_svelte-eng, networking and captive portal working, including "use as-is". Change-Id: I243b29f2397b22f0d55af0d8927e75916d644198
2019-05-20Add a factoryReset method to IIpMemoryStore, and freeze api.Lorenzo Colitti
Currently unimplemented. Implementation will be in a future CL. Test: m Bug: 128499160 Change-Id: Ia11ecd33f528d01667b1baeb8671b7213a31eef5 Merged-In: Ia11ecd33f528d01667b1baeb8671b7213a31eef5 (cherry picked from commit 10ddc681cf8ffc2c189ff975ad5885b32e670cb9)
2019-05-20Add dumpsys network_stack versionRemi NGUYEN VAN
This is necessary to allow testing for the network stack version and the version it is getting from the system server. Test: flashed, WiFi working Test: dumpsys network_stack version shows data (although version numbers being fixed) Bug: 133124190 Change-Id: I9ea85c29667d4510225637071990732360841db6
2019-05-17Merge QP1A.190509.001Scott Lobdell
Change-Id: I97bb3901e50d34a7fbe3c85480379d173ef5c0be
2019-05-17Merge "Do not mark in-process NetworkStack as persistent" into qt-devRemi NGUYEN VAN
2019-05-16Do not mark in-process NetworkStack as persistentRemi NGUYEN VAN
The in-process NetworkStack runs in the system process, so it does not need to be marked persistent. Doing so causes a spurious com.android.networkstack.inprocess process to be running, wasting memory. Bug: 131046856 Test: Flashed sailfish, networking works, no extra process started Test: Flashed walleye, networking still works Test: aapt dump xmltree NetworkStack.apk AndroidManifest.xml unchanged Change-Id: I0eb896c825ffe2581950c0bdd2b31ebd7eae0982
2019-05-15Merge "apf: Remove IPv6 NAT-T keepalive related codes and ApfTest ↵Aaron Huang
improvement" into qt-dev
2019-05-15Merge "Dropping NAT-T keepalive packet from APF" into qt-devAaron Huang
2019-05-15Merge "Fix a bug where private DNS to v4-only servers don't validate." into ↵Chiachang Wang
qt-dev
2019-05-15Fix a bug where private DNS to v4-only servers don't validate.Chiachang Wang
Bug: 132670008 Test: Manual Test: atest NetworkStackTests Change-Id: I8ae6fa6f3800f5f6c9ee88ffe3b8ada34b96dee6 Merged-In: I362d43ee6af318694a4038a257e1ebb3f577863c
2019-05-15apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvementAaron Huang
Remove IPv6 related codes since we don't support IPv6 NAT-T keepalive as the kernel doesn't support IPv6 UDP encapsulation. Renaming keepaliveAck to keepaliveResponce since NAT-T keeaplive response is not an ack. Also, add generateV4NattKeepaliveFilters() if multicast filter is disabled. Verify incoming packet contains 1 byte payload but it is not 0xff will pass NAT-T keepalive filter. Bug: 33530442 Test: atest FrameworksNetTests atest NetworkStackTests Change-Id: I6d3eb9e6271a0f51dec4a55d68a69b4280175d86 Merged-In: I6d3eb9e6271a0f51dec4a55d68a69b4280175d86 Merged-In: If01bc6a71cf26e13edc049d969d23088fa8242e4 (cherry picked from commit 4ee521b022afd3a62875d1c2bc69c346641c8c82)
2019-05-15Add build targets for non-mainline NetworkStackRemi NGUYEN VAN
Add PlatformCaptivePortalLogin and PlatformNetworkPermissionConfig build targets to override CaptivePortalLogin and NetworkPermissionConfig with platform-key-signed packages easily. The added packages are unused by default but can simplify setup for OEMs that use InProcessNetworkStack. Bug: 132635211 Test: Added the new packages to sailfish build, built image: device has the proper packages signed with the right keys, networking and captive portal working fine. Change-Id: I09656deb6ba928f56b478adebb60268fa6f484b0
2019-05-14Merge "Use embedded native libs for NetworkStack.apk." into qt-devTreeHugger Robot
2019-05-14Have InProcessNetworkStack override NetworkStackRemi NGUYEN VAN
This avoids shipping both APKs on Go devices, as would be previously done with the default Go configuration that still included NetworkStack. Test: Flashed, booted walleye with svelte config. Verified that NetworkStack is not on the device and InProcessNetworkStack is used. WiFi working. Bug: 132666298 Change-Id: If4a7a003128a555e512c88469653c3fb2ad864d5
2019-05-13Use embedded native libs for NetworkStack.apk.Richard Uhler
So that the /system version of NetworkStack.apk can be re-installed on /data without causing problems. This is useful for testing and necessary for supporting rollback to the system version of NetworkStack.apk. Bug: 131703417 Bug: 132195177 Test: Confirm NetworkStack.apk now includes .so files. Test: adb install --staged NetworkStack.apk adb reboot Device reboots without problems. Change-Id: I7c9a1702a2c18e0333b5e409f04b7658fe685f97
2019-05-13Dropping NAT-T keepalive packet from APFAaron Huang
Add NAT Traversal keepalive filter to APF program to drop NAT-T keepalive packets when NAT-T keepalive offload is starting. Bug: 33530442 Test: - atest NetworkStackTests - atest FrameworksNetTests Change-Id: If62ba7fdb5f0f0f0a7a59ec169e82b4e3147eedd Merged-In: If62ba7fdb5f0f0f0a7a59ec169e82b4e3147eedd Merged-In: Ib3416ec37f0de12daf882068e00673ad60438c1a (cherry picked from commit 95538d2d6b13188c9a742000a85517aef28bb833)
2019-05-13Send message to add/remove NAT-T keepalive packet filter.Aaron Huang
Remove definition of TYPE_NATT and TYPE_TCP since the type can be identified by checking message.obj is an instance of NattKeepalivePacketData or TcpKeepalivePacketData. It's more simple and won't have dependency on KeepaliveInfo. Bug: 33530442 Test: atest FrameworksNetTests atest NetworkStackTests (Clean cherry-pick of aosp/955419) Change-Id: Ic97ffe9ff5781778efd264460809f5059f0f4230 Merged-In: Ic97ffe9ff5781778efd264460809f5059f0f4230
2019-05-10Merge "Use async dns query to resolve all addresses" into qt-devTreeHugger Robot
2019-05-10Use async dns query to resolve all addressesChiachang Wang
Currently, it looks like private DNS server resolution uses OneAddressPerFamilyNetwork and only returns one server address. It should return all addresses. Use async dns api for this. Bug: 123435238 Test: atest NetworkStacktests Change-Id: I2b7e184d9b9800a83b55dceb73af69085668748c (cherry picked from commit 40c5295cee38166fadb53d5f37dc885d94c4971f) Merged-In: I2b7e184d9b9800a83b55dceb73af69085668748c Merged-In: I9f50da3c8c2e3b12b29bc8844291e4bf1559cd1f
2019-05-10Support strict mode private DNS on VPNs that provide Internet.Chalard Jean
Currently, strict mode private DNS does not work on VPNs because NetworkMonitor does not validate VPNs. When a VPN connects, it immediately transitions to ValidatedState, skipping private DNS hostname resolution. This change makes NetworkMonitor perform private DNS hostname resolution and evaluation even on VPNs. In order to ensure that the system always immediately switches to the VPN as soon as it connects, remove the unvalidated penalty for VPN networks. This ensures that the VPN score is always 101 and the VPN always outscores other networks as soon as it connects. Previously, it would only outscore other networks when no-op validation completed. Bug: 122652057 Test: atest FrameworksNetTests NetworkStackTests Test: manually ran a VPN with private DNS in strict mode atest android.net.cts.ConnectivityManagerTest com.android.cts.net.HostsideVpnTests Change-Id: Iaa78a7edcf23755c89d7b354edbc28d37d74d891 Merged-In: Iaa78a7edcf23755c89d7b354edbc28d37d74d891 (cherry picked from commit 414b8c8b1ce8ae2ad6ef95c1ffba19062077d3e6)
2019-05-10adopt non-blocking method to obtain the IpMemoryStore service.Xiao Ma
Bug: 131133347 Test: atest FrameworksNetTests Merged-In: I7de4f23370bdf9c9df5e74ed074c794080d93d95 Merged-In: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2 Change-Id: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2 (cherry picked from commit c4e4fd7beeda36c84548c7bb4a16312f20bdf188)
2019-05-09Merge QP1A.190502.003Scott Lobdell
Change-Id: I165a63f6290128de0927a8e5303ff9bcb74ffb88
2019-05-09Switch to positive naming for NetworkMonitor's Networks.Lorenzo Colitti
"mNonPrivateDnsBypassNetwork" is not very easy to understand. Bug: 122652057 Test: atest FrameworksNetTests NetworkStackTests Change-Id: If5801c81c6ef222b46f631bd6570dcd0fea465bd Merged-In: If5801c81c6ef222b46f631bd6570dcd0fea465bd (cherry picked from commit 669dc6cea79f23699b6767d9b204eabca28e9e3a)
2019-05-09Add tests for strict mode private DNS validation.Lorenzo Colitti
Test successful and failed validation, and updating the config. In order to do this, add a FakeDns class so we can change DNS responses dynamically while the test is running. Also a couple of minor fixes: 1. Make sure the DNS timeout is set. Before this CL, it was always 0. Not sure why. It does seem to be set to the default value (12500) when actually running on device. We didn't catch this because the only tests that use the timeout set it explicitly. 2. Make runNetworkTest a bit more realistic: always send NetworkCapabilities *before* calling notifyNetworkConnected. This is what ConnectivityService does. Bug: 122652057 Test: atest FrameworksNetTests NetworkStackTests Test: atest --generate-new-metrics 50 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest Change-Id: Ifd6694262501874f3261c864a049cb35c6afb9c8 Merged-In: Ifd6694262501874f3261c864a049cb35c6afb9c8 (cherry picked from commit 89909befd2f4e990d21e27c99857c635b3c6709e)
2019-05-08Merge QP1A.190501.001Steven Laver
Change-Id: I0f9f887d6a33702a6988709d8296731cfdb8f73d
2019-05-05Merge "Update version number to 220000000" into qt-devBaligh Uddin
2019-05-03Merge "Revert "Revert "Make the network stack a persistent process.""" into ↵Dario Freni
qt-dev
2019-05-02Revert "Revert "Make the network stack a persistent process.""Dario Freni
This reverts commit f6315c2e3cd80d83d344448784c1fd64bf9a410d. Reason for revert: Change I346d772e1f4aed94f6faead3b6455efc4666b651 implemented a feature to allow upgrading persistent processes via staged installs. Bug: 131046856 Test: - adb install networkstack.apk fails - adb install --staged networkstack.apk succeds (after reboot) Change-Id: I13af35c953c0501f2b129092e0089d4e893b97a1
2019-05-01Make NetworkStack actually build in an unbundled setup.Lorenzo Colitti
The Java code was already using sdk_version: "current", but the JNI library did not have an sdk_version attribute, and had forbidden dependencies on internal libraries such as libcutils, liblog and libnativehelper. This CL fixes things as follows: - Use the NDK log functions, and switch to the NDK liblog. - Switch to the NDK libnativehelper. - Drop the dependencies on libcutils and libpcap, which were unused. - Use the libc++ STL, and set the sdk_version of the library to current. Bug: 131703417 Test: m Test: installed NetworkStack APK via "adb install --staged" results in working networking Test: builds, boots, wifi works Test: atest FrameworksNetTests NetworkStackTests Change-Id: I1a7bd7fe2809b90a66073d8c5d5dcdff646c4286
2019-04-30Support adding NATT keepalive packet filterMark Chien
Support adding NATT keepalive packet filter to APF filter. Generating APF program will be addressed in another CL. Bug: 33530442 Test: - atest NetworkStackTests - atest FrameworksNetTests Change-Id: I403cd14ac9aa6b001c4e580abbb33a615931a192 Merged-In: Idaa7238a5c9acdae9f6cff13095ee9436c7c92c8 (cherry picked from commit 038c11d564452c9e08f25119423049339ff93c57)