summaryrefslogtreecommitdiff
path: root/src/com/android/server/util
AgeCommit message (Collapse)Author
2020-06-12Move Inet[4]AddressUtils to libs/netRemi NGUYEN VAN
The classes should not be picked up from frameworks/base, as they are part of several mainline modules. Bug: 151052811 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I62da3419408b7eb71ea5319e8717fbb22c76a94e
2020-05-13Add test for NetworkStackService dumpsys versionRemi NGUYEN VAN
The test verifies that each method on INetworkStackConnector updates the version received from the remote, and that the output of dumpsys version matches the expected template. This logic will be changed in R to include interface hashes, so a test is important to verify that Q behavior remains the same to avoid breaking Q conformance tests. Test: atest NetworkStackTests:NetworkStackServiceTest Bug: 137328719 Original-Change: https://android-review.googlesource.com/1293754 Merged-In: Icaab91d2cb4c62930f969612545e369f09f1b0c7 Change-Id: Icaab91d2cb4c62930f969612545e369f09f1b0c7
2020-04-16Support decoding the new PREF64 RA option.Lorenzo Colitti
Bug: 153694684 Test: new unit tests Merged-In: I94346939cda910b01ffee75cf8b62a23ec5314cc Change-Id: I94346939cda910b01ffee75cf8b62a23ec5314cc
2020-03-18Detect upstream hotspot device type by checking the vendor specific IE.Xiao Ma
Checking a particular IE (vendor specific) in the wifi scan results to identify upstream hotspot device type, meanwhile also checking if the ssid matches with the network which the downstream device is attaching to. Bug: 137835398 Test: atest FrameworksNetTests NetworkStackTests NetworkStackIntegrationTests Test: 1.attach to upstream hotspot device by selecting the sanned ssid from wifi settings, then check the OUI, vendor specific type fileds of IEs from the logcat. 2. build network stack module and install on Q device, verify wifi works normally. Merged-In: I8a3212fa066bdc8bf889768f92569891a3cb2408 Merged-In: I57c709c5da984accbbb389ab8d1295eae01328c6 Change-Id: I8b0ea9542775aecc13ed8ceede80abd693002825
2019-12-09Implement IPv4 address conflict detection and DHCPDECLINE.Xiao Ma
Disable this behavior by default, we can enable it with flag rollout later. Bug: 128639898 Test: atest NetworkStackTests NetworkStackIntegrationTests Test: manual test Change-Id: Ie2133bc5faaba085147519cdb5c8277c563cfbd7
2019-11-04Add a test for IPv6 provisioning and RDNSS.Lorenzo Colitti
Currently, IpClientIntegrationTest only tests IPv4-only connections. Add a test that uses an IPv6-only network. Bug: 66928272 Test: test-only change Change-Id: I7d788724411fa81ae560a933727c81aadb6d6ba4
2019-09-03Refactor NetworkStackService for testabilityRemi NGUYEN VAN
Refactor some methods to allow integration testing between ConnectivityService and NetworkStack. The integration tests override some NetworkStack methods to mock permission checks or NetworkMonitor network requests. Test: atest NetworkStackTests Change-Id: Ib5b4458f0b4d1423759e1e4016ab961d3ced7b48
2019-08-18Restore the default interface MTU when disconnecting from Wi-Fi AP.Xiao Ma
Bug: 113350007 Test: atest FrameworksNetTests NetworkStackTests Test: atest NetworkStackIntegrationTests Test: manual test Change-Id: I709a504885033a330b946de402a261d341f78117
2019-08-02Revert "Restore the default interface MTU when disconnecting from Wi-Fi AP."Xiao Ma
This reverts commit 98ed332579d20a8304b5cdbba761d49bcad75fd3. Reason for revert: prepare another CL to fix the possible NPE issue. Test: atest NetworkStackIntegrationTests Change-Id: I9237b31625299162dca1c2b3e012858413639081
2019-08-01Restore the default interface MTU when disconnecting from Wi-Fi AP.Xiao Ma
Bug: 113350007 Test: atest FrameworksNetTests NetworkStackTests Test: atest NetworkStackIntegrationTests Test: manual test Change-Id: I4b0ecdb63df567f0cbbb13d2b48bbfaaa7aee4d9
2019-06-18NetworkStack: Allow modules with network_stack uidRoshan Pius
The wifi service will start running with network_stack uid, so allow modules with the same uid to use the network stack interfaces. Note: Only modules signed with the same certificate (same as network_stack APK) can share the uid, so this is restricted to Google signed modules. Bug: 113174748 Test: Local wifi stack testing Change-Id: I0fa1eef691601afd837a83a0dd041f8870ddfc77 (cherry-picked from 204d6c5b211c7ad5cb71b885bcb1bf4fa1a34c21)
2019-06-04Check 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 (patched automatically from Ib848aaaedfd599c1d4437378846c7dda74352019) (command: git -C [qt repo] show -p 4895c5 | patch -p3) Merged-In: I1205ae4b1062fe78f1e2283d6c308caa58651e86 Change-Id: I42215bd8b14d66d0150e7dac04fbb28feef991a6
2019-03-08Give Telephony the permissions to access the network stack.Chalard Jean
Test: manual Change-Id: I28308f421aa955fe110b50452b115a0178b24745
2019-01-31Fix bluetooth tethering on multi-userRemi NGUYEN VAN
Bluetooth runs as UID 1001002 when on a secondary user. With this change the NetworkStack verifies that the calling UID matches the Bluetooth app regardless of the user. Test: flashed, BT reverse tethering still working as primary user (no option to turn on as secondary user on phones) Bug: 123655057 Change-Id: I23f9c5fa40f3bb676ac65dd8c15106c9d78309a4
2019-01-28Add hidden utils and constants to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: 112869080 Change-Id: I1a803f7954ab760294436226d6c1cffb934e98f9
2019-01-23Move IpClient to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: b/112869080 Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5
2019-01-21Allow Bluetooth to bind to NetworkStackRemi NGUYEN VAN
Test: flashed, verified bluetooth tethering gets IP address Bug: b/112869080 Change-Id: Idfbfdf54754fea46eb0099b9b9a3bdc29dd241e0
2019-01-09Move DhcpServer to NetworkStack appRemi NGUYEN VAN
Test: atest FrameworksNetTests && atest NetworkStackTests Bug: b/112869080 Change-Id: I96c40e63e9ceb37b67705bdd4d120307e114715b