Commit Graph

480 Commits

Author SHA1 Message Date
Treehugger Robot
acb4e9fc59 Merge "Add shared jarjar rule for tethering tests" am: d75774dfe0 am: 2dc283eeca am: bdca380803 am: 6e654cd7cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473223

Change-Id: I24795bc612d7956ea8f2776c90810ea5c5eca39e
2020-10-26 13:22:26 +00:00
markchien
e3126480ba Add shared jarjar rule for tethering tests
Also jarjar com.android.net.module.util* to
com.android.networkstack.tethering.util*.

Bug: 171670016
Test: atest TetheringCoverageTests
Change-Id: I3bde9ad3c41adf36da99bd944303d88ce992201c
2020-10-26 18:20:25 +08:00
Mark Chien
d1c31a2c11 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161 am: d11a25eb56 am: a1468b6591 am: c43f48d6cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: I232a3a52daeed69230215f3be135881415dbdb5c
2020-10-19 13:33:30 +00:00
markchien
4607c5535b Add the flag and default enable selectAllPrefixRange
Also add MtsTetheringTest which only run if tethering mainline
module is installed.

Bug: 166057846
Bug: 170265597
Test: atest TetheringTests
Change-Id: I434dda81eb5fab700d873a8ff3429b4222f0c7e6
2020-10-19 16:50:29 +08:00
Mark Chien
3910988c18 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a am: a5b9e4a1b4 am: 7c1badf9b0 am: 0854becd64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I9262e13e3f3919c2b36bb8765a09c4abf2e31aa4
2020-10-15 14:20:00 +00:00
Mark Chien
8565b0244a Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" 2020-10-15 12:07:19 +00:00
markchien
634f0a8ec1 Fix miss tracking downstream problem in PrivateAddressCoordinator
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-15 16:21:12 +08:00
Treehugger Robot
58a7a933ba Merge "Test conflict notification work when using cached address" am: 32456142c0 am: eea93bf6ed am: 70ba3b2c8b am: c46006da45
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459889

Change-Id: I237e8e8c4b83d12be2dfce30919dc71b3c16656c
2020-10-14 15:14:05 +00:00
Treehugger Robot
32456142c0 Merge "Test conflict notification work when using cached address" 2020-10-14 13:18:58 +00:00
markchien
ccf07b1dd6 Test conflict notification work when using cached address
This test catch the regression introduced in r.android.com/1432958.

Bug: 1432958
Test: atest TetheringTest

Change-Id: Id0c1afb5563954ffee1f598a3a5de6a245d77a0e
2020-10-14 17:02:29 +08:00
Mark Chien
2833425097 Merge "Allow tethering pick prefix from all of private address range" am: 8c9a2645d8 am: 4388f63021 am: e2a905116c am: 6f601a0374
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436852

Change-Id: I849f7d336fd4bc7d39d8b268620bcb25dbd26667
2020-10-13 14:58:33 +00:00
Mark Chien
8c9a2645d8 Merge "Allow tethering pick prefix from all of private address range" 2020-10-13 13:12:58 +00:00
markchien
d9acdccbd3 Allow tethering pick prefix from all of private address range
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-13 16:45:09 +08:00
Remi NGUYEN VAN
cf093a8815 Merge "Use IpUtils, NetworkStackConstants in DadProxyTest" am: 80794b2476 am: d7b3661334 am: 371642a328 am: 0c083c9e2d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440214

Change-Id: I4a078231e0145973c413f8dcb127275987eec8de
2020-10-13 07:55:20 +00:00
Remi NGUYEN VAN
71b9e93a83 Use IpUtils, NetworkStackConstants in DadProxyTest
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-13 11:30:03 +09:00
Remi NGUYEN VAN
aa448a3514 Merge "Move IpUtils to frameworks/libs/net" am: 4cb4ef8333 am: 9623f122df am: ff257a083e am: 1d0ddf081f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440234

Change-Id: I27072c126ee7eedc2de3d1cdccd0fd503f1577a1
2020-10-09 01:58:35 +00:00
Remi NGUYEN VAN
4cb4ef8333 Merge "Move IpUtils to frameworks/libs/net" 2020-10-09 00:13:40 +00:00
Mark Chien
7dc14ccfdf Merge "Make the IP subnet persistent till reboot" am: f052e40f79 am: 18b5773041 am: 4b52fef91d am: acbdee3924
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432958

Change-Id: I8b109e26a043478b9058dbb058b65778259c496d
2020-10-07 11:12:10 +00:00
markchien
a2ffad84c7 Make the IP subnet persistent till reboot
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-06 20:25:19 +08:00
Treehugger Robot
9faf2c5b2a Merge "Make PrivateAddressCoordinator ignore vpn network" am: 0b1e7d8956 am: 3f85eccfaa am: a089de8bab am: f572842106 am: c92ae41b1e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1413610

Change-Id: Ifb6e7159d4c45136414a9e1a9d0c8f05abdc1ecb
2020-10-05 05:57:55 +00:00
Remi NGUYEN VAN
2494a06bb3 Move IpUtils to frameworks/libs/net
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-05 14:38:19 +09:00
Treehugger Robot
0b1e7d8956 Merge "Make PrivateAddressCoordinator ignore vpn network" 2020-10-05 04:10:48 +00:00
Lorenzo Colitti
74f96cb61a Merge changes I53ca4b98,I1757fdeb am: 3a463815e2 am: f593d0eaa2 am: e8bbfd667b am: de14ddcb35 am: befc49ea1d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440767

Change-Id: I6960604ea5fe5958906d9f62d0c5816d222a5b25
2020-09-30 14:33:32 +00:00
Lorenzo Colitti
c99ef48090 Fix OffloadHardwareInterfaceTest.
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-30 17:04:19 +09:00
Tyler Wear
7f70074abc tethering: offload: Netlink Req NfGen
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-30 15:07:47 +09:00
markchien
1a2163b972 Make PrivateAddressCoordinator ignore vpn network
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-28 17:22:19 +08:00
Treehugger Robot
f58088e557 Merge "Remove double check interface by NetworkInterface" am: f5096cc1e3 am: 2162a75d50 am: 155e2a5212 am: 11409a5b2f am: 35e26a0675
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440032

Change-Id: Ic411fd07e82029fb3bb557912481af1170d310d0
2020-09-28 06:50:57 +00:00
Treehugger Robot
f5096cc1e3 Merge "Remove double check interface by NetworkInterface" 2020-09-28 04:21:28 +00:00
markchien
f609923b4b Remove double check interface by NetworkInterface
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-27 17:11:20 +08:00
Remi NGUYEN VAN
1f7f7ae82a Merge "Remove unused testutils lib from tethering tests" am: a8e68bb723 am: d8c1f0dc19 am: a3de2aa6d3 am: 3065a5df85 am: a38ddf0107
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433924

Change-Id: Ibbd6698b108ae67f0db7c435c8e7178e14ee1bb0
2020-09-24 10:11:18 +00:00
Remi NGUYEN VAN
a8e68bb723 Merge "Remove unused testutils lib from tethering tests" 2020-09-24 08:16:21 +00:00
Remi NGUYEN VAN
8f59ec090d Remove unused testutils lib from tethering tests
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-23 17:10:42 +09:00
Remi NGUYEN VAN
6432435cd4 Merge "tethering: DAD Proxy Daemon" am: 72e81859f8 am: 4508ee1e28 am: fa3997133c am: 149bcd9a8d am: de20384cf9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1258645

Change-Id: I35ed011484134d1952fc5b4ba8d4ff766bfcb447
2020-09-23 07:15:41 +00:00
Remi NGUYEN VAN
72e81859f8 Merge "tethering: DAD Proxy Daemon" 2020-09-23 04:57:42 +00:00
Tyler Wear
90e4063fd2 tethering: DAD Proxy Daemon
DAD proxy daemon responsible for forwarding NS/NA between
tethered iface and upstream iface.

Change-Id: I2e58e10e7fa7dba6a6f63ad03b000549f3afc37e
2020-09-22 11:58:49 -07:00
Xin Li
82a71b8f72 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Chalard Jean
d6fddfbfc9 Merge "Rename Kotlin util files to not include the Kt suffix" am: b1a3247ab4 am: c5d748e694 am: 09fdd9236d am: 8c4ebe4067 am: d114cd412d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I89b50df2ea418f609d4ce7919f3154f54a1379b1
2020-08-13 05:14:14 +00:00
Chalard Jean
09fdd9236d Merge "Rename Kotlin util files to not include the Kt suffix" am: b1a3247ab4 am: c5d748e694
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I6362695120ea8669e1da84bb686e886b85efd6a3
2020-08-13 04:26:11 +00:00
Chalard Jean
96924bf201 Rename Kotlin util files to not include the Kt suffix
Callers don't care what language the utilities are written in

Test: builds
Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e
2020-08-12 10:02:50 +09:00
Paul Hu
893d9e21e6 Merge "Verify pending intent flags" am: 346a361e93 am: 9caa751767 am: 0ee374a02c am: 90ffbeea18 am: fcf09fb717
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1325696

Change-Id: I154ad1f3e02b9f94dad208f1c5c5dc667ef9114d
2020-08-10 03:02:22 +00:00
Paul Hu
0ee374a02c Merge "Verify pending intent flags" am: 346a361e93 am: 9caa751767
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1325696

Change-Id: Id37713388c0c2245e708ca1ca81e78d288168dfd
2020-08-10 02:04:40 +00:00
Paul Hu
346a361e93 Merge "Verify pending intent flags" 2020-08-10 01:32:12 +00:00
Chalard Jean
8818498877 Merge changes I33b70b0a,I1074eedb
* changes:
  Remove the services.net-module-wifi module target.
  Revert "Revert "Move Inet[4]AddressUtils to libs/net""
2020-08-07 06:45:15 +00:00
Chalard Jean
78701646dd Revert "Revert "Move Inet[4]AddressUtils to libs/net""
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-07 03:31:04 +00:00
Mark Chien
e60e4bc62f Merge "Allow wifi p2p to use legacy dedicated address" am: d2af4d9e2a am: b537c25685 am: 04720e79b0 am: e0e75de37e am: 264d16941a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382398

Change-Id: I3d24b5c68ca741ee3f63bf60623ff7882ea9cc50
2020-08-05 07:35:53 +00:00
Mark Chien
04720e79b0 Merge "Allow wifi p2p to use legacy dedicated address" am: d2af4d9e2a am: b537c25685
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382398

Change-Id: Ica17499f82135bc96b87ca4071b603bb8cc23053
2020-08-05 06:36:36 +00:00
Mark Chien
d2af4d9e2a Merge "Allow wifi p2p to use legacy dedicated address" 2020-08-05 06:01:37 +00:00
markchien
eb8fec2111 Allow wifi p2p to use legacy dedicated address
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-05 11:03:46 +08:00
paulhu
f603ed5fb8 Verify pending intent flags
All PendingIntent included activity and broadcast should set
FLAG_IMMUTABLE flag.

Bug: 156353008
Test: atest TetheringTests
Change-Id: I4592e914b67ecb8865d7de47797423f27e9ff840
2020-08-04 11:24:33 +08:00
Chiachang Wang
309cdb03d2 Merge "Update language to comply with Android's inclusive language guidance" am: e66098036f am: d85403cc70 am: d3a216ae4f am: 230cbcc611 am: 0b192779c3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1375618

Change-Id: Ib1c23f0a9758bdcf55d11ac67ff6ff54dc513066
2020-07-31 01:10:21 +00:00