summaryrefslogtreecommitdiff
path: root/packages/Tethering
AgeCommit message (Collapse)Author
2020-12-08Improve OWNERS coverage across frameworks/base/.Jeff Sharkey
As general background, OWNERS files expedite code reviews by helping code authors quickly find relevant reviewers, and they also ensure that stakeholders are involved in code changes in their areas. Some teams under frameworks/base/ have been using OWNERS files successfully for many years, and we're ready to expand them to cover more areas. Here's the historical coverage statistics for the last two years of changes before these new OWNERS changes land: -- 56% of changes are fully covered by OWNERS -- 17% of changes are partially covered by OWNERS -- 25% of changes have no OWNERS coverage Working closely with team leads, we've now identified clear OWNERS on a per-package basis, and we're using "include" directives whenever possible to to simplify future maintenance. With this extensive effort, we've now improved our coverage as follows: -- 98% of changes are fully covered by OWNERS -- 1% of changes are partially covered by OWNERS -- 1% of changes have no OWNERS coverage This specific change is automatically generated by a script that identifies relevant "include" directives. Bug: 174932174 Test: manual Exempt-From-Owner-Approval: refactoring with team leads buy-in Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813 Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-10-30Restructure Module code [ com.android.tethering ]Baligh Uddin
Code Migration from frameworks/base/packages/Tethering -> packages/modules/Connectivity/Tethering BUG: 167962976 Test: m com.android.tethering + TH Merged-In: Ib4a3a7a14d7d0e544aadf1bfb21ad390f1ba76a7 Change-Id: Ifae56d991b43c02f1e3496abbafc87d1869add8a
2020-10-29Add OWNERS block to prevent the tree from mooving during migration.Baligh Uddin
BUG: 167962976 TEST: None. Change-Id: I49db5a11ee89645dac158ec3757180b2387e2d70
2020-10-29Add visibility rules for packages/modules/Connectivity/TetheringBaligh Uddin
BUG: 167962976 Test: TH Change-Id: Id28881b35cf24fc9517fa11af6d8e539ab244fa6
2020-10-26Add shared jarjar rule for tethering testsmarkchien
Also jarjar com.android.net.module.util* to com.android.networkstack.tethering.util*. Bug: 171670016 Test: atest TetheringCoverageTests Change-Id: I3bde9ad3c41adf36da99bd944303d88ce992201c
2020-10-19Add the flag and default enable selectAllPrefixRangemarkchien
Also add MtsTetheringTest which only run if tethering mainline module is installed. Bug: 166057846 Bug: 170265597 Test: atest TetheringTests Change-Id: I434dda81eb5fab700d873a8ff3429b4222f0c7e6
2020-10-15Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator"Mark Chien
2020-10-15Fix miss tracking downstream problem in PrivateAddressCoordinatormarkchien
The downstream do not be tracked if PrivateAddressCoordinator just return cached address. Then, PrivateAddressCoordinator would not notify that downstream if conflict happen. Also remove the null check in getDownstreamPrefix because: - An IpServer is only added to mDownstreams by requestDownstreamAddress. - That method will only add the IpServer to mDownstreams if it has an IPv4 address. - As soon as that method returns, the IpServer sets mIpv4Address to the address that was returned. - When an IpServer is torn down, mIpv4Address is set to null after releaseDownstream is called. So it should never be possible for this to return null. Bug: 168169687 Test: atest CtsTetheringTest atest TetheringTests Change-Id: Ide5206b013acdc499344e1c839a830c5b245af41
2020-10-14Remove Tethering @TestApiAnton Hansson
Modules shouldn't have TestApis, as documented in go/android-api-types. Additionally, nothing depends on these TestApis existing. Bug: 170395679 Test: m checkapi Change-Id: I6e2c8298e90b4b54f0264be974d036fa08cd5632 Merged-In: I6e2c8298e90b4b54f0264be974d036fa08cd5632
2020-10-14Merge "Test conflict notification work when using cached address"Treehugger Robot
2020-10-14Test conflict notification work when using cached addressmarkchien
This test catch the regression introduced in r.android.com/1432958. Bug: 1432958 Test: atest TetheringTest Change-Id: Id0c1afb5563954ffee1f598a3a5de6a245d77a0e
2020-10-13Merge "Allow tethering pick prefix from all of private address range"Mark Chien
2020-10-13Allow tethering pick prefix from all of private address rangemarkchien
Currently tethering only pick prefix from 192.168.0.0/16. There is no aviable tethering address if the upstream address is 192.168.x.y/16. This change allow tethering to pick prefix from any private address rnages. Now it still pick from 192.168.0.0/16 only to avoid behavior change. Will have follow up commit to change the configuration. Bug: 166057846 Bug: 170265597 Test: atest TetheringTests atest CtsTetheringTest Change-Id: Ib6304eb8b4788e9196d0af48e72f00a6bda73a5f
2020-10-13Use IpUtils, NetworkStackConstants in DadProxyTestRemi NGUYEN VAN
The test had TODOs to address to use IpUtils and NetworkStackConstants classes once they were moved to frameworks/libs/net. This is now done, so using the new classes. Bug: 158042941 Test: atest TetheringPrivilegedTests Change-Id: I536b4506dbc3b42547ba9cb4e7c3c7a3e9459dd1
2020-10-09Merge "Move IpUtils to frameworks/libs/net"Remi NGUYEN VAN
2020-10-07Merge "Make the IP subnet persistent till reboot"Mark Chien
2020-10-06Make the IP subnet persistent till rebootmarkchien
Make the IP subnet persistent if it do not conflict with upstream. It allow client to reuse its IP that usually reduce DHCP procedure. Bug: 168169687 Test: atest TetheringTests Change-Id: Iddc5304730dce7b11c5d124b7eddce057d752bbd
2020-10-05Explicitly reference framework-wifi app build ruleAnton Hansson
This works around a build-system limitation where it does not know which jars to feed r8 to resolve all classes during proguarding. Bug: 160453030 Bug: 169931783 Test: build_mainline_modules.sh (with prebuilt sdk) Change-Id: I3d9f2049cf898b5e551a5c5764df423abaa5e92d Merged-In: I3d9f2049cf898b5e551a5c5764df423abaa5e92d
2020-10-05Move IpUtils to frameworks/libs/netRemi NGUYEN VAN
The utility classes are useful for mainline modules and their tests, for example IpClientIntegrationTest. Bug: 168868607 Test: m && atest NetworkStaticLibTests Change-Id: If2b1613aa18a7990391e2d31cc2951ca93f1cf3c
2020-10-05Merge "Make PrivateAddressCoordinator ignore vpn network"Treehugger Robot
2020-09-30Fix OffloadHardwareInterfaceTest.Lorenzo Colitti
r.android.com/1424920 changed the code but forgot to update the unit test. Also fix some lint errors. Bug: 149109043 Test: atest TetheringTests TetheringPrivilegedTests Change-Id: I53ca4b9877dcb4a759dee6ec63133653315d826f
2020-09-30tethering: offload: Netlink Req NfGenTyler Wear
Add the netfilter generic message header to the netlink req. This is needed so the kernel won't ignore the request for invalid params. Bug: 149109043 Test: ConntrackSocketTest Change-Id: I1757fdeb11a0cac5821021a22323cbd74fe22bdc
2020-09-28Make PrivateAddressCoordinator ignore vpn networkmarkchien
If vpn app make its netmask as 0, PrivateAddressCoordinator would not able to find suitable address for tethering downstream. Since tethering do not support vpn as upstream, just ignore vpn in PrivateAddressCoordinator. Bug: 166365863 Test: atest TetheringTests atest CtsTetheringTest Change-Id: Iabe265467044fea9fa437674ca29ffc7bcdefe3b
2020-09-28Merge "Fix TetheredClient callback fail in InProcessTethering"Treehugger Robot
2020-09-28Merge "Remove double check interface by NetworkInterface"Treehugger Robot
2020-09-27Remove double check interface by NetworkInterfacemarkchien
NetworkInterface#getByName can not get the interface without IP addresses. When setIncludeTestInterfaces(true) is called, the interface will be placed in client mode, which will delete the link-local address. So calling NetworkInterface#getByName to get test interface may not work before switching to server mode. Bug: 168215721 Test: atest CtsTethering Change-Id: Ice8adcce1c4b2c86bd219c701b2afa9ba2339f24
2020-09-24Merge "Remove unused testutils lib from tethering tests"Remi NGUYEN VAN
2020-09-24Fix TetheredClient callback fail in InProcessTetheringmarkchien
TetheredClient callback would additional check whether caller has NETWORK_SETTINGS or {MAINLINE_}NETWORK_STACK permission, but it do not grant for self accessing. InProcessTethering run in system server, so the services in system server would fail to call TetheredClient callback. Grant permission for self process. Bug: 169231588 Test: atest CtsTetheringTest Change-Id: Ic04e44aef4df772c718ff25ed331bf02f5940c1d
2020-09-23Remove unused testutils lib from tethering testsRemi NGUYEN VAN
frameworks-base-testutils is unused in tethering integration tests, so the dependency can be removed. That test library also contains test classes, so removing the dependency allows tethering tests to stop running the associated tests. Also add jarjar rules to the unit tests to zap (remove) the test classes from the output APK. Ideally the unit tests should stop depending on that library too (TestableLooper can be used instead of TestLooper), or the frameworks-base-testutils library should stop including test classes. Bug: 167968946 Test: m CtsTetheringTest TetheringTests Change-Id: Ie950ce5b6181e388a7f71da430fd2dd8ada32e49
2020-09-23Merge "tethering: DAD Proxy Daemon"Remi NGUYEN VAN
2020-09-22tethering: DAD Proxy DaemonTyler Wear
DAD proxy daemon responsible for forwarding NS/NA between tethered iface and upstream iface. Change-Id: I2e58e10e7fa7dba6a6f63ad03b000549f3afc37e
2020-09-17Merge mainline-release 6664920 to master - DO NOT MERGEBill Yi
Merged-In: Id04ea331831e8b26ba99478848392b40a92548d5 Change-Id: I888da0c9475f2d00602d917d2f58169f8d7c93a4
2020-09-16Move BPF offload program from netd to mainlineHungming Chen
Test: as the follows. $ adb shell ls sys/fs/bpf | grep offload map_offload_tether_ingress_map map_offload_tether_limit_map map_offload_tether_stats_map prog_offload_schedcls_ingress_tether_ether prog_offload_schedcls_ingress_tether_rawip $ adb shell dumpsys netd --short TetherController BPF ingress map: iif(iface) v6addr -> oif(iface) srcmac .. 13(rmnet_data3) 2401:e180:8842:6e3:bc6a:2e45:c30:f418 -> .. BPF stats (downlink): iif(iface) -> packets bytes errors 13(rmnet_data3) -> 7 488 0 BPF limit: iif(iface) -> bytes 13(rmnet_data3) -> 9223372036854775807 Log: bpfloader: Loaded object: /apex/com.android.tethering/etc/bpf/offload.o Change-Id: I71b7efb1f4bd6eb1cd469a0e1e4a56342dc6e579
2020-09-07Simplify module visibility post build refactorAnton Hansson
//visibility:override is no longer needed for impl_library_visibility to override visibility. Removing this allows the defaults module to specify better defaults. - Stub libraries are made publicly visible, via `visibility` - Impl libraries are private by default, but visibility is extended by the modules Bug: 165017290 Test: m Exempt-From-Owner-Approval: build refactor Change-Id: Ibf35bfac5c99a21125f89ba10945f3364217b90f
2020-09-05Import translations. DO NOT MERGE ANYWHEREBill Yi
Auto-generated-cl: translation import Change-Id: Ibfe7031a80e38ed3fe776e195514e6c7cad418ab
2020-09-03Import translations. DO NOT MERGE ANYWHEREBill Yi
Auto-generated-cl: translation import Change-Id: I946ba0e5ca40f934bdc7588eb244969103813c4c
2020-08-31Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li
Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-18Merge "Add usesCleartextTraffic to Tethering"Mark Chien
2020-08-18Add usesCleartextTraffic to Tetheringmarkchien
usesCleartextTraffic needs to be true for the networkstack process so that the NetworkStack module can use no-encrypted probes to detect captive portals. When loaded in the networkstack process, all packages in process must set usesCleartextTraffic=true, otherwise there may be races causing the flag not to be set for the process. Bug: 161860610 Test: CtsTetheringTest, TetheringTests Change-Id: Ife03ee0c7096ea242eb701b297a69b471e15b436
2020-08-12Rename Kotlin util files to not include the Kt suffixChalard Jean
Callers don't care what language the utilities are written in Test: builds Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e
2020-08-10Merge "Verify pending intent flags"Paul Hu
2020-08-07Merge changes I33b70b0a,I1074eedbChalard Jean
* changes: Remove the services.net-module-wifi module target. Revert "Revert "Move Inet[4]AddressUtils to libs/net""
2020-08-07Revert "Revert "Move Inet[4]AddressUtils to libs/net""Chalard Jean
This patch is still needed and should go in now that the error is fixed. The patch was submitted into rvc-dev and is already in rvc-dev-plus-aosp (patch in in ag/11923559, revert skipped in ag/12072199). A follow-up will remove the unused services.net-module-wifi target. Test: originally tested in aosp/1324109 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I1074eedb0b0f156a1135e11210ec102de15ea674 Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
2020-08-05Merge "Allow wifi p2p to use legacy dedicated address"Mark Chien
2020-08-05Allow wifi p2p to use legacy dedicated addressmarkchien
Some exsting applications may expect wifi p2p use legacy "192.168.49.1/24" address. Have a configuration for wifi p2p to decide whether to use legacy dedicated address or random address. Bug: 161520826 Test: atest TetheringTests Change-Id: If79973416a6780ee19ee785c65772b1a2dc1fbf7
2020-08-04Verify pending intent flagspaulhu
All PendingIntent included activity and broadcast should set FLAG_IMMUTABLE flag. Bug: 156353008 Test: atest TetheringTests Change-Id: I4592e914b67ecb8865d7de47797423f27e9ff840
2020-07-31Merge "Move utils from network stack to libs."Chalard Jean
2020-07-30Merge "Update language to comply with Android's inclusive language guidance"Chiachang Wang
2020-07-29Move utils from network stack to libs.Chalard Jean
This package is using some common utilities from a library that used to live in the network stack. A better home for these utilities is frameworks/libs, so this topic moves the files ther and also changes the package of some utilities. See aosp/1350222 and aosp/1350182 for a detailed description of the specific files that moved. Test: checkbuild Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
2020-07-29Update language to comply with Android's inclusive language guidanceChiachang Wang
See https://source.android.com/setup/contribute/respectful-code for reference. Test: m ; atest TetheringTests Bug: 161896447 Change-Id: Idc58697c72fb00896bee00185fefc50c1a24dd35