summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-07Update default value of probe url to be a constantChiachang Wang
Default value for probing url should be a constant in NetworkStack but not an overlayable config due to some technical limitations. OEMs can mistakenly override configs that were not designed to be overridden. Bug: 152730542 Test: atest NetworkStackTests NetworkStackNextTests Change-Id: I1846958e7c4e8b64ae287718c63e705bb232632a Merged-In: I1846958e7c4e8b64ae287718c63e705bb232632a
2020-05-07Prevent using commas in url configurationsChiachang Wang
Literal commas are not allowed in the url configuration because they are used as a separator internally. Add document in the resource to prevent OEMs to misconfigure it and cause unexpected result. Bug: 155027030 Test: m -j30; atest NetworkStackTests Change-Id: I76a847105fc6e57542bb7b8e2dc7ce45ae8393a3 Merged-In: I76a847105fc6e57542bb7b8e2dc7ce45ae8393a3
2020-05-07Use stable networkstack-aidl-interfacesJeongik Cha
Test: m nothing Bug: 133526962 Original-Change: https://android-review.googlesource.com/1301076 Merged-In: If2dc208e55700ab715e466dbd55ba10a74dd9f40 Change-Id: If2dc208e55700ab715e466dbd55ba10a74dd9f40
2020-05-07Merge "Add EvaluatingBandwidthState to evaluate network bandwidth" into ↵Lucas Lin
rvc-dev am: b12790b922 am: f38206a9c5 Change-Id: I1a3343527ddab54528b6e0b8a451cc7307a8a271
2020-05-07Merge "Add EvaluatingBandwidthState to evaluate network bandwidth" into ↵Lucas Lin
rvc-dev am: b12790b922 Change-Id: I3b69c75a265b26b61e7059d1bb7d2962f2f45c87
2020-05-07Merge "Add EvaluatingBandwidthState to evaluate network bandwidth" into rvc-devLucas Lin
2020-05-07Add apex_available field in networkstack-aidl-interfaces am: 49d1392ef6 am: ↵Jeongik Cha
abae166326 Change-Id: Ib54e6f132f95b0d366957d0c7fa9246d2a662fe5
2020-05-07Add apex_available field in networkstack-aidl-interfaces am: 49d1392ef6Jeongik Cha
Change-Id: Iae549d50e0ee726119a967a429f1160fa801dbbc
2020-05-07Set jni_uses_sdk_apis for NetworkStackTestsColin Cross
NetworkStackTests doesn't set sdk_version but needs portable versions of its JNI libraries. Set jni_uses_sdk_apis, and remove the extra JNI libraries that don't have SDK variants. Bug: 154665579 Test: atest NetworkStackCoverageMtsConfigTests on a Q device Change-Id: Ieff8acec71d206104033a04c049840fd94adfce9
2020-05-06Test that the system doesn't accept non-/96 NAT64 prefixes.Lorenzo Colitti
Other system components (clatd, netd's DNS64 synthesis) don't support non-/96 prefixes, so such prefixes must be ignored. CTS already checks that LinkProperties#setNat64Prefix throws IllegalArgumentException when passed an invalid prefix length. Here we test that nothing happens (e.g., the network stack doesn't crash) when that exception is thrown. Bug: 153694684 Test: new unit tests Change-Id: I8a57e171d472532b930c8d5c33e11a99024cf128
2020-05-06Add EvaluatingBandwidthState to evaluate network bandwidthLucas Lin
Add a new state between EvaluatingPrivateDnsState and ValidatedState to evaluate the network bandwidth. This state is optional, OEMs can overlay the resource file and set the related config to enable this feature. Bug: 133522566 Test: atest NetworkStackTests Change-Id: I4b43450ad7ed4284bf433b0daab8d0c00d4c284e Merged-In: Ia2d6e4b8e434c15e76bc9e58874c40b1647f97fb (cherry picked from commit 679809049207e48a63fde4f00f1084a3ea287dc1)
2020-05-06Add apex_available field in networkstack-aidl-interfacesJeongik Cha
Instaed of updating the whitelist, add explicit apex_available field. Bug: 133526962 Test: m nothing Change-Id: Ia3c568d5af6c3949f40125193bc8a49b47868128
2020-05-06[SP18.2] Create TestableNetworkStatsProviderCbBinder am: aa2d8a3af4 am: ↵Junyu Lai
2f16a9c6dc Change-Id: Icef9f5652f6cd97038fa18f66608d752406d18fb
2020-05-06[SP18.2] Create TestableNetworkStatsProviderCbBinder am: aa2d8a3af4Junyu Lai
Change-Id: Ia779c0bd91d2d41051319778e30814256312a032
2020-05-05[SP18.2] Create TestableNetworkStatsProviderCbBinderJunyu Lai
Currently, in OffloadController unit test, mock object is used to verify callback sent from provider. However, verify a mock method running in different thread, is not supported if there is no additional thread synchronization mechanism applied. This is fine now since all the callbacks fired from OffloadControllerTest are on the same thread with caller. But it is not necessary true in subsequent patches that fire callbacks from handler thread. Hence, introduce a testable provider callback that based on a thread-safe ArrayTrackRecord to provide the functionality to verify mock callback fired in a different thread. Test: m -j Bug: 149467454 Change-Id: I2edf887ccee5f205368a294f5f9990edb818332d Merged-In: I2edf887ccee5f205368a294f5f9990edb818332d (cherry picked from commit bdd1690cef97c246405b43ec0d9ccea1ede5703b)
2020-05-04Don't crash if the PREF64 expires when IpClient is stopped. am: cf37ca43cb ↵Lorenzo Colitti
am: b451c135b0 Change-Id: Ib73ae981ceba077886ad9e982694ce7403c8427c
2020-05-04Don't crash if the PREF64 expires when IpClient is stopped. am: cf37ca43cbLorenzo Colitti
Change-Id: Ie37ade88d2e1cc8ce45283cb91140d5119e97780
2020-05-04Don't crash if the PREF64 expires when IpClient is stopped.Lorenzo Colitti
Currently the code does not cancel the PREF64 alarm when IpClient is stopped. If the alarm fires when IpClient has disconnected, it will call updatePref64 with a null prefix, which will crash. Ensure that the alarm is cancelled when IpClient is stopped. Bug: 153694684 Bug: 155559286 Test: new unit tests Change-Id: I397eb36c1a8ecf1324de33e720577fe2e4e07056
2020-05-02Fix testIpClientServiceAvailableAfterPolling am: a47091526a am: b0412a7edfRemi NGUYEN VAN
Change-Id: Ice370f340501f3b2d1ee146329d155917ab905fa
2020-05-02Fix testIpClientServiceAvailableAfterPolling am: a47091526aRemi NGUYEN VAN
Change-Id: Icca83bd6064c263ab352fc7d0bcacb18d9d24574
2020-05-02Fix testIpClientServiceAvailableAfterPollingRemi NGUYEN VAN
The test used NetworkStack.setServiceForTest(null) expecting that null would be returned in NetworkStack.getService, which is incorrect: using null just causes getService to use default system behavior, which returns the actual service. Bug: 139314310 Test: atest ModuleNetworkStackClientTest --rerun-until-failure 500 Original-Change: https://android-review.googlesource.com/1299379 Merged-In: I2d607d3ab26bcecd20546041ac4be2892a3fb852 Change-Id: I2d607d3ab26bcecd20546041ac4be2892a3fb852
2020-05-01Merge "Freeze Networkstack AIDL API as V6" into rvc-dev am: 76e2b1e7b9 am: ↵TreeHugger Robot
3bbc506c75 Change-Id: I5c8bd2948e3bc0c301e705a34105bbea1b97c9fb
2020-05-01Merge "Do not stop FdEventsReader on handlePacket error" into rvc-dev am: ↵TreeHugger Robot
db03d16466 am: fbae0a7a2b Change-Id: I01e1b4bce518295674fc925e098d5316d2e341fa
2020-05-01Merge "Freeze Networkstack AIDL API as V6" into rvc-dev am: 76e2b1e7b9TreeHugger Robot
Change-Id: I87a69bb5489e0528a9edd8d7d605d2ecd5aa1336
2020-05-01Merge "Do not stop FdEventsReader on handlePacket error" into rvc-dev am: ↵TreeHugger Robot
db03d16466 Change-Id: Ifa84b7b45c30f28c35b9c0418aad7cd38434ce63
2020-05-01Merge "Freeze Networkstack AIDL API as V6" into rvc-devTreeHugger Robot
2020-05-01Merge "Do not stop FdEventsReader on handlePacket error" into rvc-devTreeHugger Robot
2020-05-01Merge "Add default and nullable annotations to NetworkStack AIDLs." into ↵Lorenzo Colitti
rvc-dev am: 023ee72619 am: 2bf64d35ac Change-Id: I2eb6be4b5237133ffa76813bc46c01dcb32507ef
2020-05-01Merge "Add default and nullable annotations to NetworkStack AIDLs." into ↵Lorenzo Colitti
rvc-dev am: 023ee72619 Change-Id: I6b799f85e15405c13ad59f921f89911b6e6cc790
2020-05-01Freeze Networkstack AIDL API as V6Lorenzo Colitti
This APIs needs to be frozen before release, because unstable version in REL will be disallowed. Bug: 133526962 Test: m Original-Change: https://android-review.googlesource.com/1277432 Merged-In: I01096d4fb9f60b675aae5c3fe5d5a49d9ae0775c Change-Id: I01096d4fb9f60b675aae5c3fe5d5a49d9ae0775c
2020-05-01Merge "Add default and nullable annotations to NetworkStack AIDLs." into rvc-devLorenzo Colitti
2020-05-01Do not stop FdEventsReader on handlePacket errorTreehugger Robot
Previously if handlePacket threw an exception, FdEventsReader would stop reading and close the file descriptor. This is not helpful as users of this class may encounter errors processing a particular packet (typically), but they generally should not stop completely for that reason. Also address comments from previous change (Exception instead of Throwable: Throwable should not be caught in general; event -> events). Bug: 152842850 Test: atest NetworkStackTests Original-Change: https://android-review.googlesource.com/1295503 Merged-In: I14abe8163ecdfd5251731915f10ea374bfa38b70 Change-Id: I14abe8163ecdfd5251731915f10ea374bfa38b70
2020-05-01Fix potential exceptions in FdEventReader users am: a51a28854f am: 91ee1dfc52Remi NGUYEN VAN
Change-Id: I672bb50cb265fa21590393abbf381bf30060f168
2020-05-01Fix potential exceptions in FdEventReader users am: a51a28854fRemi NGUYEN VAN
Change-Id: Ie1358a7b62ad5331adbeb2143de98d747e936d2b
2020-05-01Merge "Wait for IpClient.StoppedState#enter before tests" into rvc-dev am: ↵Remi NGUYEN VAN
b91dc8229c am: 0162c4fc80 Change-Id: Iba35fddbeaf7187425573ee61ccb7f51876b6f6a
2020-05-01Merge "Wait for IpClient.StoppedState#enter before tests" into rvc-dev am: ↵Remi NGUYEN VAN
b91dc8229c Change-Id: Id7fc3cefb6f1f8d902e8164dcbbc76b92c483a17
2020-05-01Fix potential exceptions in FdEventReader usersRemi NGUYEN VAN
In particular, - Fix a possible NPE In IpNeighborMonitor, if a NUD_FAILED is received for some neighbor before all other neighbors have received RTM_NEWNEIGH. - Add try / catch in IpNeighborMonitor, DhcpPacketListener, ConnectivityPacketTracker in case some unexpected exception is thrown while processing packets. - Add Log.wtf logging in FdEventsReader in case any such exception is missed. Bug: 152842850 Test: atest NetworkStackTests Original-Change: https://android-review.googlesource.com/1274609 Merged-In: Ia03fec358e98b3f218220e70fc3265e14ca15f78 Change-Id: Ia03fec358e98b3f218220e70fc3265e14ca15f78
2020-05-01Merge "Wait for IpClient.StoppedState#enter before tests" into rvc-devRemi NGUYEN VAN
2020-05-01Add default and nullable annotations to NetworkStack AIDLs.Treehugger Robot
All new fields should have defaults. Do that for fields added in v6 before we freeze v6. Fields added in v5 can no longer be changed because v5 is frozen. Test: m Bug: 133526962 Original-Change: https://android-review.googlesource.com/1299381 Merged-In: Ie2ecd84919a59adf89d0c56e4fdf2b2258fa1448 Change-Id: Ie2ecd84919a59adf89d0c56e4fdf2b2258fa1448
2020-05-01Merge "Add test configuration values for probe URLs" into rvc-dev am: ↵Remi NGUYEN VAN
9d51753176 am: c370cb0a23 Change-Id: I1187cffe617a1a42a16930762ad89710ed8de86b
2020-05-01Merge "Add test configuration values for probe URLs" into rvc-dev am: 9d51753176Remi NGUYEN VAN
Change-Id: Ie66ca15fcd73f83ba3336d51f3ec8700ebaf59ac
2020-05-01Merge "Add test configuration values for probe URLs" into rvc-devRemi NGUYEN VAN
2020-05-01Wait for IpClient.StoppedState#enter before testsRemi NGUYEN VAN
IpClientIntegrationTest is flaky because some mocks that IpClient uses, like mNetd, can be stubbed while IpClient is initializing in its handler thread. This generates UnfinishedStubbingExceptions as IpClient is calling methods on the mock while the test is trying to stub additional methods. Wait for IpClient to become idle before doing any further setup. Bug: 152723363 Test: atest NetworkStackCoverageTests:IpClientIntegrationTests --rerun-until-failure [lots] on Q Cuttlefish Original-Change: https://android-review.googlesource.com/1298472 Merged-In: I90206a16fff1fa12ca7e37e36d49163b6a83e5c1 Change-Id: I90206a16fff1fa12ca7e37e36d49163b6a83e5c1
2020-04-30Merge "Fix the potential double transition in DhcpState#enter" into rvc-dev ↵TreeHugger Robot
am: 2e16ff33e9 am: df1fcffeb6 Change-Id: Ia9e1452d3d9a98dd38eb3f1a34e4f754c3c87c44
2020-04-30Merge changes I9d38c696,I8da6a8f4 into rvc-dev am: 2bfc0b3738 am: 15de8ddc87Remi NGUYEN VAN
Change-Id: I2e8c15c073879dcb10c789c18b2e92fcd0016cc2
2020-04-30Add tests for IpReachabilityMonitor am: 5f3bb6d04b am: 2a0b4913eeRemi NGUYEN VAN
Change-Id: Ic91f48367ad82aad2694bd9de4b4273b72fe74de
2020-04-30Merge "Fix the potential double transition in DhcpState#enter" into rvc-dev ↵TreeHugger Robot
am: 2e16ff33e9 Change-Id: Ib84f265fe9010b9065a1be5e290633381e06b03f
2020-04-30Merge changes I9d38c696,I8da6a8f4 into rvc-dev am: 2bfc0b3738Remi NGUYEN VAN
Change-Id: I055e200b8997bf24692f5091ea3fd63574aef9af
2020-04-30Add tests for IpReachabilityMonitor am: 5f3bb6d04bRemi NGUYEN VAN
Change-Id: I4e420dcf03caf4557920947e0ca32c789cfba8c1
2020-04-30Merge "Fix the potential double transition in DhcpState#enter" into rvc-devTreeHugger Robot