Commit Graph

1188 Commits

Author SHA1 Message Date
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
Mark Chien
a1468b6591 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161 am: d11a25eb56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: Ic540b8b0c562a730d4da307aa6890226099e9b46
2020-10-19 13:04:37 +00:00
Mark Chien
d11a25eb56 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: I6055ea6ac737bb94bd9bc8c8642e86222f1e1d1a
2020-10-19 12:46:44 +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
7c1badf9b0 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a am: a5b9e4a1b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I33842982a1a94a37d2e8b7aa78f5bc9b6e86326e
2020-10-15 13:16:01 +00:00
Mark Chien
a5b9e4a1b4 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I2874508c560cc31f99e88c02fd63995f62f86a2f
2020-10-15 12:46:39 +00:00
Mark Chien
8565b0244a Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" 2020-10-15 12:07:19 +00:00
Anton Hansson
96a954a8d6 Merge "Remove Tethering @TestApi" am: bd175573a5 am: 67f88535d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460522

Change-Id: I6d44cc10ae75426e715c95540f64e788b506f83b
2020-10-15 11:29:19 +00:00
Anton Hansson
67f88535d1 Merge "Remove Tethering @TestApi" am: bd175573a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460522

Change-Id: I3dcf776384d6c53876acaeb344820a88c19027da
2020-10-15 11:11:02 +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
Anton Hansson
b66b46f933 Merge "Remove Tethering @TestApi" 2020-10-15 07:43:03 +00:00
Anton Hansson
44b2ebcf34 Remove Tethering @TestApi
Modules shouldn't have TestApis, as documented in go/android-api-types.
Additionally, nothing depends on these TestApis existing.

Bug: 170395679
Test: m checkapi
Exempt-From-Owner-Approval: cherry-pick
Change-Id: I6e2c8298e90b4b54f0264be974d036fa08cd5632
2020-10-15 07:42:41 +00: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
Anton Hansson
87b8363cb9 Remove Tethering @TestApi
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-14 16:03:57 +01:00
Treehugger Robot
70ba3b2c8b Merge "Test conflict notification work when using cached address" am: 32456142c0 am: eea93bf6ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459889

Change-Id: I3f7f1fe42ed92147e5809d48ae5f38745fd71689
2020-10-14 14:34:43 +00:00
Treehugger Robot
eea93bf6ed Merge "Test conflict notification work when using cached address" am: 32456142c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459889

Change-Id: Ib9be992d5728346f063cea6ebc67b11a209e04c4
2020-10-14 13:34:06 +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
e2a905116c Merge "Allow tethering pick prefix from all of private address range" am: 8c9a2645d8 am: 4388f63021
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436852

Change-Id: Ie44f3b2ebfa51d2c915bd794b6ea0fade0098ecf
2020-10-13 14:01:47 +00:00
Mark Chien
4388f63021 Merge "Allow tethering pick prefix from all of private address range" am: 8c9a2645d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436852

Change-Id: Ief2520cd30059542ae3786a36b92198af6739a2a
2020-10-13 13:42:20 +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
371642a328 Merge "Use IpUtils, NetworkStackConstants in DadProxyTest" am: 80794b2476 am: d7b3661334
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440214

Change-Id: I2eb8131309f397a832b16002f7eff702e78dba80
2020-10-13 07:12:10 +00:00
Remi NGUYEN VAN
d7b3661334 Merge "Use IpUtils, NetworkStackConstants in DadProxyTest" am: 80794b2476
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440214

Change-Id: I2e8d55b7984bccbd5959b7b00fa8c8b24acdb67c
2020-10-13 06:31:32 +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
Xin Li
51ca8f56c5 Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07: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
ff257a083e Merge "Move IpUtils to frameworks/libs/net" am: 4cb4ef8333 am: 9623f122df
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440234

Change-Id: I03872655d1ef3a7bb436666196ed67bd61601f65
2020-10-09 00:52:31 +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
Mark Chien
4b52fef91d Merge "Make the IP subnet persistent till reboot" am: f052e40f79 am: 18b5773041
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432958

Change-Id: Ib0d9e5b21b88fd352b06b3064ef3c34de4c046ce
2020-10-07 10:18:00 +00:00
Mark Chien
f052e40f79 Merge "Make the IP subnet persistent till reboot" 2020-10-07 09:39:29 +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
Anton Hansson
441eb20b82 Merge "Explicitly reference framework-wifi app build rule" am: c29f606cc7 am: adedc24110
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1448635

Change-Id: Ifc377c2b8ba57bc14cfb6eb98d599e2496ef62f9
2020-10-05 13:10:31 +00:00
Anton Hansson
d594552cd9 Explicitly reference framework-wifi app build rule am: 20dd58aa8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12752580

Change-Id: Ic9cbad0d25c589bf51dfef0e48ca41aca51fa450
2020-10-05 10:53:46 +00:00
Anton Hansson
b8a342e4bc Explicitly reference framework-wifi app build rule
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-05 11:43:39 +01: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
a089de8bab Merge "Make PrivateAddressCoordinator ignore vpn network" am: 0b1e7d8956 am: 3f85eccfaa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1413610

Change-Id: I70b49d0a10b80f378dcd2ba78b5bac848e40e5c9
2020-10-05 04:46:25 +00:00
Treehugger Robot
0b1e7d8956 Merge "Make PrivateAddressCoordinator ignore vpn network" 2020-10-05 04:10:48 +00:00
Anton Hansson
20dd58aa8d Explicitly reference framework-wifi app build rule
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
2020-10-02 16:38:21 +01:00
TreeHugger Robot
0e2d8592ad Merge "Revert "Move module utils to the module package."" 2020-10-02 03:54:37 +00:00
Hridya Valsaraju
3d57544fb2 Revert "Move module utils to the module package."
Revert "Move util classes to their destination package"

Revert "Move PacketReader and FdEventReader"

Revert "Move static utils to a module package"

Revert "Move static utils to a module package"

Revert submission 12698912-move_packetreader

Reason for revert: Broke presubmit on git_master, b/169861635
Reverted Changes:
If5d1e4a58:Move module utils to the module package.
I44ffaad3d:Move PacketReader and FdEventReader
I93e9cfd96:Move util classes to their destination package
Ia84d64130:Move static utils to a module package
Iaac2810c7:Move static utils to a module package

Change-Id: Ibbe59075cd7bc4c38e0707ea6ae3b3703b40986f
2020-10-01 20:12:46 +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
e8bbfd667b Merge changes I53ca4b98,I1757fdeb am: 3a463815e2 am: f593d0eaa2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440767

Change-Id: I59f834071b66d310652016a626b0f8a6bb471d03
2020-09-30 13:53:31 +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