summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-04-07Rename IDhcpLeaseCallbacks to IDhcpEventCallbacks for more generic.Xiao Ma
This change renames IDhcpLeaseCallbacks, easier to expand in the future and adds a new method onNewPrefixRequest which will be called on DHCP server receives DHCPDECLINE message and request a new IPv4 prefix from IpServer. Bug: 130741856 Test: atest NetworkStackTests NetworkStackNextTests Merged-In: Ia7b08bb1e7feda08ffe9fbb8885dbc8b7bdd66c9 Change-Id: Ia7b08bb1e7feda08ffe9fbb8885dbc8b7bdd66c9
2020-04-06Merge changes Ifdf54ace,Ib2c1d16d into rvc-devChiachang Wang
* changes: [MP02] Make multiple probe url configration overlayable [MP01] Add configuration to support multiple probes
2020-04-03Merge "Update NetworkStack version check in NetworkMonitor." into rvc-devCody Kesting
2020-04-03Merge "Add new method to update Layer2 information when L2 roaming happens." ↵Xiao Ma
into rvc-dev
2020-04-03Getting interface params in ClearingIpAddressState#enter.Xiao Ma
In case of wifi might stop IpClient and then restart prov immediately to avoid wifi disconnection especially when roaming happens, this might cause getting interface params with incorrect interface mtu when starting provisioning again before interface mtu hasn't been restored. Moving getting interface params to ClearingIpAddressState#enter ensures that interface parameters are fetched on the handler thread so they are properly ordered with other events, such as restoring the interface MTU on teardown. Bug: 152169857 Test: atest NetworkStackIntegrationTests NetworkStackTests Merged-In: Ifd06b8d18ce570b1aa424ad215111c80f094ca97 (cherry picked from commit a6aba532103a3258d09e6931106d6fb05368c130) Change-Id: I0c8c1ed1646ab12bc30da2b7f8e5819d2d9495ba
2020-04-02Add new method to update Layer2 information when L2 roaming happens.Xiao Ma
This change adds an new method updateLayer2Information in IIpClient.aidl to update layer2 info (e.g. bssid, l2key and grouphint) to detect whether L2 roaming happens or not. Bug: 131797393 Test: atest NetworkStackTests FrameworksNetTests Merged-In: I85eabccb6f5d5f322c8e3df556ceef6647616f5a (cherry picked from commit 3168e392320087c51a677b4d14e783c853ac652d) Change-Id: Ife93fd162803ae89fa85905b45a4bb1cfb5e7e43
2020-04-01Update NetworkStack version check in NetworkMonitor.Cody Kesting
NetworkMonitor calls INetworkMonitorCallbacks#notifyNetworkTested when network validation is complete. NetworkMonitor will transition to using to NetworkStack Stable AIDL version 6. However, the current version check changes behavior for version 5, which is incorrect. Bug: 152931568 Test: atest NetworkStackTests Change-Id: Ib88b8b0c0b23079287e72e50cbe840fa8c642047 Merged-In: Ib88b8b0c0b23079287e72e50cbe840fa8c642047 (cherry picked from commit 82808cb4eb433d861536199adc7bdaecd614e37d)
2020-04-01[MP01] Add configuration to support multiple probesChiachang Wang
Add configuration to allow configuring multiple probe. Bug: 139034276 Test: atest NetworkStackTests NetworkStackNextTests Merged-In: Ib2c1d16d2088ef043cdc6f9cb323a9df552beefb Change-Id: Ib2c1d16d2088ef043cdc6f9cb323a9df552beefb
2020-04-01Correct tests for verifying data stall metricsChiachang Wang
NetworkMonitor sends data stall metrics data via static method. The DataStallStatsUtils object from its constructor is never used. Tests in NetworkMonitorTest that verify the interaction with the mock object are incorrect. Bug: 152374582 Test: atest NetworkStackTests NetworkStackNextTests Merged-In: I308344a80deef6aaf3ed4fb57723f2f210b30483 Change-Id: I308344a80deef6aaf3ed4fb57723f2f210b30483
2020-03-25Make all DHCP option numbers public.Automerger Merge Worker
This allows tests that emulate DHCP clients to include options. The values are specified by the RFC and cannot change, so there is no downside to making them public. Test: builds Bug: 150644681 Change-Id: I939bfac5ec14175b74ce3713f5af1362de577839 Merged-In: I939bfac5ec14175b74ce3713f5af1362de577839 (cherry picked from commit f75cd4768124c20c9eda14e21368f83c4963a260)
2020-03-24Add test to verify make urls configurationChiachang Wang
Follow up from the commit(ChangeId: I66141e4bdc71d19e766aeec6ca33db8e1cb737fe) Bug: 152178565 Test: atest NetworkStackTests NetworkStackNextTests Change-Id: Ib9c25b43a52963e4222de8152c47c9eb26227e65 Merged-In: Ib9c25b43a52963e4222de8152c47c9eb26227e65 (cherry picked from commit 6e30cd8bbaea529bc1661f68a605c9a17476678b) (Clean cherry-pick from internal master)
2020-03-23Use location mcc to load the array config resourceChiachang Wang
Align the mechanism to load resource with others inside NetworkMonitor. Bug: 141406258 Test: atest NetworkStackTests Change-Id: I66141e4bdc71d19e766aeec6ca33db8e1cb737fe Merged-In: I66141e4bdc71d19e766aeec6ca33db8e1cb737fe (cherry picked from commit a2d25ddbd828fa45f6875e722c6ff18ff4049827)
2020-03-19Merge "Detect upstream hotspot device type by checking the vendor specific ↵TreeHugger Robot
IE." into rvc-dev
2020-03-19Update the title & description of notificationLucas Lin
Refer to the UX design doc to fix the title & description. Bug: 150903640 Test: 1. Build pass 2. atest NetworkStackTests 3. Manual test to see if the title & description are shown as expected Change-Id: I5ab49a3b5b220e144c69627eb9d02c6ddc438716 Merged-In: I354f9f19aa4d8057b49833107c8bd4d9c67d5525 (cherry picked from commit 07c905836d8a0d153ad3f02421b9776a0cee1108)
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
2020-03-17Provide RRO to configure neighbor unreachable probes parameters.Automerger Merge Worker
Bug: 130871097 Test: atest FrameworksNetTests NetworkStackTests Merged-In: Idc2c4303640d4fd3fc29dd0957771088820030ff (cherry picked from commit f540206076ca0e55d685ef81e3e04da3e9a654cf) Change-Id: Icd69008635461aa24d976f9b9d2d0ef1d60e23d5
2020-03-16Merge "Address aosp/1199568 leftover comments" into rvc-devPaul Hu
2020-03-11Make IpClient populate the DHCP server address in LinkPropertiesAutomerger Merge Worker
Bug: 134098566 Test: lunch arm_aosp-userdebug make -j32 Change-Id: Ide9610f9b17992eef83e1c42ac71b1b79c179f44 Merged-In: If86a6303671b03bb2ccf98de7e9d77020b013d2f (cherry picked from commit 10d243214ae933d063affdd2b4f6c1f837279586)
2020-03-10Address aosp/1199568 leftover commentsAutomerger Merge Worker
Bug: 139269711 Test: atest NetworkStackTests NetworkStackNextTests Change-Id: I6e4f16e70b290ce6a3566b92e5946c65075971a1 Merged-In: I6e4f16e70b290ce6a3566b92e5946c65075971a1 (cherry picked from aosp/1240746)
2020-03-10Use redirect URL to start webviewAutomerger Merge Worker
NetworkMonitor will detect captive portal and may get a redirect URL from WiFi AP. Redirect URL should able to send to captive portal app to open the webview instead of detecting again by captive portal app. Bug: 134892996 Test: Manually test with captive portal AP Test: atest NetworkStackTests NetworkStackNextTests Change-Id: Idf363c79b7243a899121be8a68b32d0541dff14f Merged-In: Idf363c79b7243a899121be8a68b32d0541dff14f
2020-02-20Merge "Add captive portal info to DhcpClient output"Xiao Ma
2020-02-20Merge "Show notifications after capport login"Chalard Jean
2020-02-19Add captive portal info to DhcpClient outputRemi NGUYEN VAN
Requesting the captive portal option is flagged off by default. The URL it provides will be used to support the captive portal API; see RFC7710bis. Bug: 139269711 Test: atest NetworkStackTests NetworkStackNextTests Test: atest NetworkStackIntegrationTests NetworkStackNextIntegrationTests Change-Id: I783466e0e60f364e79cd76af3fe43a7862d35cf2
2020-02-19Show notifications after capport loginRemi NGUYEN VAN
Add NetworkStackNotifier to manage notifications created by NetworkStack. NetworkStackNotifier handles the "connected" notifications shown after connecting to a captive portal, which may contain information sourced from the captive portal API. Test: atest NetworkStackTests Bug: 139269711 Change-Id: Iaf96f7e5f02be04b098230316595ad4c0777a9d8
2020-02-19Merge "Send the capport fields to the system server."Chalard Jean
2020-02-18Merge "Update version check for notifyNetworkTested() call."Cody Kesting
2020-02-18Send the capport fields to the system server.Chalard Jean
The fields are behind a protection method to avoid inadvertently sending private data to apps. This is going to the system server which needs those fields. Test: NetworkStackTests Change-Id: I7c9a7a82efa364835164622d2e93977e0bcd3d8c
2020-02-18Allow tethering to use IpNeighborMonitor.Lorenzo Colitti
Test: m Change-Id: I4ca0c47d62ea90c30f88278b3ebf766be2c5a2e9
2020-02-18Never register a null lease callback.Lorenzo Colitti
Bug: 149458372 Test: new unit test Test: tethering no longer crashes Change-Id: Ic5f709c1ce50d3bb7af26a698dd32adb87012316
2020-02-18Revert "Revert "Add DhcpLeaseCallbacks""Lorenzo Colitti
This reverts commit e8fff42022f8c22e84d51bc093189d469bdd9af1. Bug: 135411507 Test: atest NetworkStackTests Change-Id: I0609301d7b37309a35c764a7551b0ca93b3faeee
2020-02-15Add CaptivePortalData fetching to NetworkMonitorRemi NGUYEN VAN
When a capport API URL is sent through notifyNetworkConnected or notifyLinkPropertiesChanged, NetworkMonitor will (re)evaluate to fetch the data, and report it back via notifyCaptivePortalDataChanged. Test: atest NetworkStackTests NetworkStackNextTests Bug: 139269711 Change-Id: I101e2b2799d399fa7b560bf5ea3d86dac7ba1be9
2020-02-14Merge "Add NetworkStack utilities for reading text"Remi NGUYEN VAN
2020-02-14Add NetworkStack utilities for reading textRemi NGUYEN VAN
The utilities will be useful for: - Implementing the captive portal API - Implementing generic probes based on regular expressions Test: atest NetworkStackTests Bug: 139269711 Change-Id: I17a9564033f985af9061534f5cffcc8a0e70f9ed
2020-02-13Merge "Revert "Add DhcpLeaseCallbacks""Treehugger Robot
2020-02-13Revert "Add DhcpLeaseCallbacks"Remi NGUYEN VAN
This reverts commit dc018dd943f0c11e0b9172dee0db0966871af20d. Reason for revert: crashes tethering: b/149458372 Bug: 149458372 Change-Id: I1fad8528443d8cc133f719aad042cb22d3a8e2a0
2020-02-12Merge "update structure of TcpInfo"Chiachang Wang
2020-02-12update structure of TcpInfoChiachang Wang
The TCP infoamtion will be kept for evaluating data stall. The memoery usage inside TST will increase based on the number of TCP sockets exist in the device. For the evaluation, TST needs only 4 fields from TcpInfo. The others are redundant currently. Thus, keep only necessary field inside TcpInfo to reduce the memory usgae. Bug: 148115807 Test: atest NetworkStackTests NetworkStackNextTests Test: manual test to check memory change Change-Id: I35275f3d77bbf1e076f2fd327a961278fe038b63
2020-02-12Add DhcpLeaseCallbacksRemi NGUYEN VAN
The callbacks will be used by Tethering to provide callbacks when DHCP leases are updated. The current design only supports one client as Tethering may want to send callbacks to multiple callers, but DhcpServer is only owned by Tethering. Bug: 135411507 Test: atest NetworkStackTests Change-Id: I1e44221d6fbd1b1f2d0d0057a29c7445af1cdbcf
2020-02-10Update version check for notifyNetworkTested() call.Cody Kesting
NetworkMonitor checks the version of INetworkMonitorCallbacks used by the platform before invoking notifyNetworkTested() or notifyNetworkTestedWithExtras(). The version number used for checking is currently 5. However, this should be changed to 4, as the functionality for notifyNetworkTestedWithExtras() is actually being added in version 5 of the callback. Bug: 148032944 Test: atest NetworkStackTests Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest Change-Id: I2337120fe70f75c072a9286038e66065fddcf857
2020-02-05Include Bundle values with ConnectivityDiagnostics calls.Cody Kesting
ConnectivityDiagnostics allows PersistableBundles to be passed from NetworkMonitor to ConnectivityDiagnosticsCallbacks that are registered with the System in ConnectivityService. This change populates the bundles passed from NetworkMonitor with values relating to ConnectivityDiagnosticsManager#ConnectivityReport and ConnectivityDiagnosticsManager#DataStallReport using keys defined in those classes. The keys used for the bundles are defined in ConstantsShim. Bug: 147249364 Test: compiles Test: atest NetworkStackTests Change-Id: Id007ab38a20c6a107c9528e3e861dafa191797c3 Merged-In: Id007ab38a20c6a107c9528e3e861dafa191797c3
2020-02-05Define callback for suspected data stall.Cody Kesting
Currently, NetworkStack does not notify ConnectivityService explicitly when it detects a potential data stall. This adds a new method notifyDataStallSuspected() to INetworkMonitorCallbacks for notifying ConnectivityService. ConstantsShim is defined for using constants from the Android platform that are introduced after the NetworkStack mainline module was defined. Bug: 143187964 Test: compiles Test: atest NetworkStackTests Change-Id: Ie3b5b4e71e4a4b15a5a84f761eaead3acf6fc807 Merged-In: Ie3b5b4e71e4a4b15a5a84f761eaead3acf6fc807
2020-02-04Skip data stall check on unnecessary networkChiachang Wang
Except validation required networks, validation will be skipped. Even there is signal comes from those networks, the validation will not be proceeded and come back to ValidatedState. Thus, skip the unnecessary state transition. Bug: 144488209 Bug: 145275899 Test: atest NetworkStackTests NetworkStackNextTests Change-Id: I6271cf812bc438882bfba94ca91673471814061c
2020-02-04Skip DNS event if dns data stall detection is disabledChiachang Wang
Data stall detection using DNS event can be controlled by DeviceConfig. However, feature disable only skip data stall evaluation. DNS events are still processed. Update to disable all events handle if feature is disabled. Bug: 147857311 Test: atest NetworkStackTests Test: Test with ./out/host/linux-x86/bin/statsd_testdrive 121 to ensure log properly Change-Id: I985af202d4406b831dbf3d66bcae14794f3ca26d
2020-02-01Notify IpClient DHCP process success before configuring Interface.Xiao Ma
This patch fixes the bug introduced by aosp/1169224 which moves notifySuccess function to DhcpBoundState#enter. This behavior is correct for DHCP reacquiring process (e.g. when client renews or rebinds the previous leased IPv4 address, then enters Bound state after receiving DHCPACK packet). However, this is incorrect for DHCP solicit at the first time, since notifying IpClient DHCP success after configuring interface causes mDhcpResult member is still empty when handleLinkPropertiesUpdate is triggered by netd completes configuring interface with new IPv4 address. Hence, new Link Properties passed to wifi state machine doesn't contain the available DNS servers received from DHCPACK. Moving notifySuccess before sending CMD_CONFIGURE_LINKADDRESS cmd to IpClient ensures mDhcpResult member has been initialize correctly before assembling new LinkProperties. Bug:146850745 Test: atest NetworkStackIntegrationTests NetworkStackTests Change-Id: Ifb990ccc06c1374e616f71038b1811640821e954
2020-01-29Add implementation of getInterfaceHash()Paul Trautrim
Exempt-From-Owner-Approval: cherry-pick from internal Bug: 136065010 Test: m Change-Id: Iaf682c850b7cf22980d6fb88d3d60e24c189b74c Merged-In: Iaf682c850b7cf22980d6fb88d3d60e24c189b74c
2020-01-20Return actual payload (DHCPDISCOVER) bytes array when starting FILS.Xiao Ma
Generally "ByteBuffer packet" has been allocated with a maximum length of 1500. Calling packet.array() is to return a byte array of length 1500 but the actual DHCPDISCOVER packet payload is much less. Return actual DHCP packet byte array instead in this patch, which allows caller use the payload byte array directly without extra operation (e.g. calling packet.remaining() to get the correct length of actual payload). Bug: 140223017 Test: atest NetworkStackTests NetworkStackIntegrationTests Change-Id: Ib08f2450fb649ea1ffcdbf8dedc829965f13da86
2020-01-16Reduce redundant network probing and prevent probing loopChiachang Wang
NetworkMonitor did not limit the probe usage on a non-metered network for data stall detection verification. As NM polls TCP information with certain timer(10s for now), NM may get legacy information if the data stall suspicion comes from other signals, e.g. DNS. It may cause false alarm probing on the network. The first tcp polling event will be 10s later. It may cause a loop due to dns result received w/o latest tcp info. Hence, start first polling while entering validated state. Bug: 145275899 Bug: 147673885 Test: atest NetworkStackTests NetworkStackNextTests Test: Manually test with such network and observe the probe behavior Change-Id: Icb56ebe9d8304880d4f9f4fa8153b6e3727000fb
2020-01-07Merge "Add rate-limiting to reduce CPU loading of IpClient"Treehugger Robot
2020-01-06Add rate-limiting to reduce CPU loading of IpClientjohnson.yeh
Bug: b/144826001 Test: Build Pass: OK Test: Power ON/OFF: OK Test: Verify CPU loading improvement: OK Change-Id: I412f3db7071672ebc3213dc128bbfc8f8bd2abcc
2019-12-27Merge "Provide RRO configuration to send DHCP client hostname option."Xiao Ma