summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-23Merge "Ensure that the NAT64 prefix is removed when its lifetime expires." ↵Lorenzo Colitti
into rvc-dev am: 00b170459f Change-Id: I9f38bb9736b484a012ef466019d164d4d563a3c4
2020-04-23Merge "Ensure that the NAT64 prefix is removed when its lifetime expires." ↵Lorenzo Colitti
into rvc-dev
2020-04-23Import translations. DO NOT MERGEBill Yi
Auto-generated-cl: translation import Change-Id: I22038ebea5d21d055e05c6eaabb16aaf392399be
2020-04-23Import translations. DO NOT MERGEBill Yi
Change-Id: I2649b4bad63c659640ab40067d5fc8ea7ae12290 Auto-generated-cl: translation import
2020-04-23Ensure that the NAT64 prefix is removed when its lifetime expires.Lorenzo Colitti
Bug: 153694684 Test: new test coverage in IpClientIntegrationTest Change-Id: Ie207940d79abbc0d92dd15becee867e72f171786
2020-04-22Fix an issue in TrackRecord. am: 768d586ccf am: 9b2ec350e3Treehugger Robot
Change-Id: Ia9e7afab36a18f52475a8487d3fa24ab54edc741
2020-04-22Fix an issue in TrackRecord. am: 768d586ccfTreehugger Robot
Change-Id: I02b0c3aab14e7f29d534638a97332d468191a9c5
2020-04-22Fix an issue in TrackRecord.Treehugger Robot
TrackRecord<T> implements List<T> but also has an add(T) method which conflicts with List<T>#add as it has a different return type. As nobody is using the return value of this now, use the signature of List<T>#add to remove the problem. Bug: 153613718 Test: NetworkStackTests FrameworksNetTests Merged-In: Ie9eb4d7158e9583d4052e86f87062e3032b023e3 Change-Id: Ie9eb4d7158e9583d4052e86f87062e3032b023e3
2020-04-22Fix NetworkStackCoverageTests on Q am: af558386e7 am: 7b0859b14bRemi NGUYEN VAN
Change-Id: I0bae449d5f8e20d9893d525c292bac76f00f6aea
2020-04-22Fix NetworkStackCoverageTests on Q am: af558386e7Remi NGUYEN VAN
Change-Id: I9d6cb6562ba45c7b58b8e897c23787ebee9e504b
2020-04-21Fix NetworkStackCoverageTests on QRemi NGUYEN VAN
Fix regressions in the coverage tests when run on a Q device: - Do not attempt to verify CaptivePortalData in IpClientIntegrationTest on Q, since it cannot be set considering that the class does not exist on Q. - Replace HexEncoding.encodeToString(byte[], boolean) with HexEncoding.encodeToString(byte[]) in StructNdOptPref64Test. - Skip ModuleNetworkStackClientTest using DevSdkIgnoreRule instead of assumeTrue() in setUp, as the latter would still run tearDown(). - Ignore NetworkStatsUtilsTest: this is a unit test for a test utility, and that utility uses R APIs (so can only be used in R-only tests). - Lazy-initialize LinkProperties with capport attributes in NetworkStackNotifierTest as initializing at class creation would crash. - Manually create a INetworkMonitorCallbacks mock in NetworkMonitorTest, create capport LinkProperties on demand, and skip capport tests that cannot run on Q. Test: atest NetworkStackCoverageTests Bug: 152723363 Merged-In: I3ae98e24a542c6313e06bcc787ad5a0a2a1db723 Change-Id: I3ae98e24a542c6313e06bcc787ad5a0a2a1db723
2020-04-20Get the l2key and grouphint from the initial provisioning configuration. am: ↵Xiao Ma
43cbcaea68 am: 327e1b1dc7 Change-Id: I794f10887b6ba2a081215f25607b045cf6ade014
2020-04-20Get the l2key and grouphint from the initial provisioning configuration. am: ↵Xiao Ma
43cbcaea68 Change-Id: I0ebf0c476d48f0eaff383d73a7363fcbaf4023fd
2020-04-20Merge "Mark StructNdOptPref64#prefix @NonNull." into rvc-dev am: 039d796052 ↵Lorenzo Colitti
am: 64ff01eeec Change-Id: I210c2bbb0ea22972c6541b7873e308f39af456e6
2020-04-20Get the l2key and grouphint from the initial provisioning configuration.Xiao Ma
The purpose of processing CMD_UPDATE_L2INFO command in the Stopped State is just to update the initial l2key and grouphint which are used when starting DhcpClient (e.g. for INIT-REBOOT). We can get both of l2key and groupHint from the initial prov configuration parcelable instead, then be able to delete CMD_UPDATE_L2INFO from the StoppedState. Bug: 154441742 Test: atest FrameworksNetTests NetworkStackTests Test: atest NetworkStackIntegrationTests Change-Id: I760957017b18975be969a2f519ec09ee4495ebad
2020-04-20Merge "Mark StructNdOptPref64#prefix @NonNull." into rvc-dev am: 039d796052Lorenzo Colitti
Change-Id: I45c88e337ac76a9d3ecb34b3f1698873f9eab5b7
2020-04-20Merge "Mark StructNdOptPref64#prefix @NonNull." into rvc-devLorenzo Colitti
2020-04-20Merge "Listen for pref64 RA attributes in IpClientLinkObserver." into ↵Lorenzo Colitti
rvc-dev am: 1e420c1d39 am: e665b54a0e Change-Id: I4e7d0ad37b109433eab824ac71f884be416a62c7
2020-04-20Merge "Listen for pref64 RA attributes in IpClientLinkObserver." into ↵Lorenzo Colitti
rvc-dev am: 1e420c1d39 Change-Id: I8e828e8ea26b0212e2e6aa23af6ebc53e71500d4
2020-04-20Merge "Listen for pref64 RA attributes in IpClientLinkObserver." into rvc-devLorenzo Colitti
2020-04-20Mark StructNdOptPref64#prefix @NonNull.Lorenzo Colitti
The prefix can never be null. Mark it as such to make it clearer that no null checks for it are needed. Bug: 153694684 Test: atest NetworkStackTests:NduseroptMessageTest NetworkStackTests:StructNdOptPref64Test Merged-In: Ica4f6f7545e63e0665c2a4ae4de8323f3fd93e1c Change-Id: Ica4f6f7545e63e0665c2a4ae4de8323f3fd93e1c
2020-04-20Listen for pref64 RA attributes in IpClientLinkObserver.Lorenzo Colitti
This allows IpClient to parse the pref64 RA option and put it in the LinkProperties to be sent to ConnectivityService. IpClientLinkObserver is a natural place for this because it is the part of IpClient that is already tasked with receiving netlink events and storing the results in IpClient's LinkProperties. Instead of using the path used by most attributes, which are parsed by NetlinkHandler, converted to a string array, then re-parsed and sent over binder call to the networkstack, simply open a netlink socket in the networkstack process and read the netlink messages from there. In the future, we can build on this to parse other netlink messages (e.g., IP addresses, routes, RDNSS, etc.) in the networkstack and entirely remove the dependency on netd's NetlinkHandler, which is crufty, hard to extend, and does not support interface indices. This means that the pref64 attribute will not be ordered with respect to other netlink events. This is acceptable because the pref64 attribute does not need to be ordered with any other information and its presence or absence does not cause provisioning to succeed or fail. Today the pref64 is learned through an entirely different codepath (DNS lookups) and that is not ordered in any way either. This CL does not change the threading model: the netlink updates are processed on the handler thread like all the other updates seen by IpClientLinkObserver, and all access to mLinkProperties is synchronized (this). This synchronization is no longer necessary because everything is on the handler thread anyway, but that will be cleaned up in a future CL. Because netlink events contain interface indices, but IpClient and netd deal with interface names, IpClientLinkObserver must be told what the interface index is. This is done when startProvisioning is called, because that is when IpClient fetches the interface parameters including the MAC address and interface index. It cannot be done when IpClientLinkObserver is started, because at that time the interface might not exist, or might exist with a previous interface index. The interface index is cleared when IpClient enters the stopped state and the LinkProperties are cleared. Bug: 153694684 Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest#testPref64Option --iterations 100 Change-Id: I3f8d2fbf2e203c6f90029947fa55b5e0b3b06d94
2020-04-20Merge "Refine NetworkMonitorTest#testReadAsString_StreamShorterThanLimit()" ↵Lucas Lin
into rvc-dev am: e2509d6f9d am: 037df74b34 Change-Id: I91c009f1a595b746557676079469d56ac2ae0cff
2020-04-20Merge "Refine NetworkMonitorTest#testReadAsString_StreamShorterThanLimit()" ↵Lucas Lin
into rvc-dev am: e2509d6f9d Change-Id: If3f9fa976cfb69c6c7527484f361d0e4826e32c6
2020-04-20Merge "Refine NetworkMonitorTest#testReadAsString_StreamShorterThanLimit()" ↵Lucas Lin
into rvc-dev
2020-04-19[automerger skipped] Import translations. DO NOT MERGE am: bf5ef27b1d -s ↵Bill Yi
ours am: 36ae7e91dc -s ours am skip reason: subject contains skip directive Change-Id: I613f690b1aeee3ec78668e7245de39cab7822113
2020-04-19[automerger skipped] Import translations. DO NOT MERGE am: bf5ef27b1d -s oursBill Yi
am skip reason: subject contains skip directive Change-Id: I8aad54bb880634fb74e9150d8622be85b1dbb8c7
2020-04-19Import translations. DO NOT MERGEBill Yi
Auto-generated-cl: translation import Change-Id: I30ad1c7d884a436788b5e5159881e1e3090c50d3
2020-04-18Support constructing a StructNdOptPref64 from data. am: 2e0f009fb4 am: ↵Lorenzo Colitti
5d6eb342eb Change-Id: I50f85db522bbb7800a331f563bfd0674094f8960
2020-04-18Support constructing a StructNdOptPref64 from data. am: 2e0f009fb4Lorenzo Colitti
Change-Id: Ide36071503de0a09700a2c0dc90a303c1d9a8b75
2020-04-18Support constructing a StructNdOptPref64 from data.Lorenzo Colitti
This is mostly useful in tests at the moment. Also address a review comment from a previous CL. Bug: 152723363 Test: atest NetworkStackTests:NduseroptMessageTest NetworkStackTests:StructNdOptPref64Test Merged-In: I29c3967200e1353972503739b9ba4d1194ce162b Change-Id: I29c3967200e1353972503739b9ba4d1194ce162b
2020-04-18Merge "Make IpClientIntegrationTest pass on rvc-dev." into rvc-dev am: ↵Lorenzo Colitti
5d74a29e95 am: 0c9452d2ba Change-Id: If7c722637b7efe1944eafe5a47161a64408ade00
2020-04-18Support serializing a StructNdOptPref64 to a ByteBuffer. am: 3841078baa am: ↵Lorenzo Colitti
52e7aac6b4 Change-Id: I3f0902e1f2c329e0c3cb98f58c80ed3f8d4ee93b
2020-04-18Merge "Make IpClientIntegrationTest pass on rvc-dev." into rvc-dev am: ↵Lorenzo Colitti
5d74a29e95 Change-Id: I8ae7080bdd43fd6d276773582a36e367c43d9f4b
2020-04-18Support serializing a StructNdOptPref64 to a ByteBuffer. am: 3841078baaLorenzo Colitti
Change-Id: I369eccb7f221745598ded5c1e6bea374dee26adc
2020-04-18Merge "Make IpClientIntegrationTest pass on rvc-dev." into rvc-devLorenzo Colitti
2020-04-18Support serializing a StructNdOptPref64 to a ByteBuffer.Lorenzo Colitti
Bug: 153694684 Test: new unit tests Merged-In: I82a3239a532fe4141627d146f9d47ba99d1622dd Change-Id: I82a3239a532fe4141627d146f9d47ba99d1622dd
2020-04-18Make IpClientIntegrationTest pass on rvc-dev.Lorenzo Colitti
On rvc-dev, IpClientIntegrationTest fails almost all the time because the tap interface disappears before the tests can run. This is due to the ParcelFileDescriptor finalizer, which helpfully closes the fd stored in the object even if it is in use elsewhere. Stash the ParcelFileDescriptor itself in the test class, instead of the actual FileDescriptor which everything uses, in order to ensure that the garbage collector does not finalize it. With this change, IpClientIntegrationTest#testRaRdnss (just an arbitrary test case in that class) goes from 10/10 failures to 10/10 passes. Bug: 152723363 Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest#testRaRdnss Merged-In: I1015e7893ba6af74876665826960e8fcc1711476 Change-Id: I1015e7893ba6af74876665826960e8fcc1711476
2020-04-17Merge "Mark NetworkStack as updatable." into rvc-dev am: 4fc16c370a am: ↵Artur Satayev
6441db90e2 Change-Id: I42b664c40a8b6d53e838c8cc2c5411eb25838952
2020-04-17Merge "Mark NetworkStack as updatable." into rvc-dev am: 4fc16c370aArtur Satayev
Change-Id: Ie24721fb52070026aefbcf22791b492a94763c92
2020-04-17Merge "Mark NetworkStack as updatable." into rvc-devArtur Satayev
2020-04-17Mark NetworkStack as updatable.Artur Satayev
This is an updatable module. The flag enforces conformance to associated requirements with a module being updatable e.g. compiling against stable SDKs. Bug: 153333044 Test: m Change-Id: If34230b65fea3d73da28db2d6ee8a499b108f3ae Merged-In: If34230b65fea3d73da28db2d6ee8a499b108f3ae Exempt-From-Owner-Approval: clean cherry-pick (cherry picked from commit 862a1a1f6ff3671bd75dfaaed0c257427b25db2b)
2020-04-17Refine NetworkMonitorTest#testReadAsString_StreamShorterThanLimit()Lucas Lin
The characters of string may not only contain ASCII characters, so the length of string may not the same as bytes. Replace the string to byte[]. Bug: 154217644 Test: atest NetworkStackTests:NetworkMonitorTest Change-Id: I3c1f826ef1be0302fdb19c294087464af8573105 Merged-In: I6552a6c8a291d54fc16bd3a1df3ab29a4481b20d (cherry picked from commit 57096958ca18bf26ea8bbc7b2fb48619a1756097)
2020-04-17Fix parsing a NduseroptMessage inside a NetlinkMessage. am: 17fd4b42c6 am: ↵Treehugger Robot
b495508138 Change-Id: I3e287f5faca7ffa0e233e70dbfc0583c53208602
2020-04-17Fix parsing a NduseroptMessage inside a NetlinkMessage. am: 17fd4b42c6Treehugger Robot
Change-Id: I031717e719123e32cb70ea73fd94a1b71afdbcca
2020-04-17Fix parsing a NduseroptMessage inside a NetlinkMessage.Treehugger Robot
The parsing code inside NduseroptMessage assumed that the message started at the beginning of the buffer. Fix this, and also restore the original endianness and limit of the buffer after parsing. Add tests for this, and make the existing tests a bit more readable. Bug: 153694684 Test: new unit tests Merged-In: Id0b4dc18dd219b4d35846e161022a37c8de3e3bb Change-Id: Id0b4dc18dd219b4d35846e161022a37c8de3e3bb
2020-04-17Merge "Add a new field changePrefixOnDecline in DhcpServingParamsParcel." ↵TreeHugger Robot
into rvc-dev am: 548bf84252 am: a2531162a1 Change-Id: Ia1e77d1b159ca59e6693a6bfe6f9ed6900931fef
2020-04-17Merge "Fix the incorrect behaviour when receiving a mismatched renew lease." ↵TreeHugger Robot
into rvc-dev am: bb771b1f69 am: 17bed15f2e Change-Id: I308404cd13efdbbfd1650b1a32f668b7dcbdcbe7
2020-04-17Merge "Renew previous IP address when roaming happens in certain specific ↵TreeHugger Robot
Wi-Fi networks." into rvc-dev am: b306958535 am: cf58a10d72 Change-Id: Icfa9b4d8f847413a836ff502ecc1800dd8203e97
2020-04-17Merge "Add a new field changePrefixOnDecline in DhcpServingParamsParcel." ↵TreeHugger Robot
into rvc-dev am: 548bf84252 Change-Id: If1baa8c0a527fe3a8749bc5ea6536f432c1d0e29