Commit graph android_packages_modules_Co.../Tethering
Message SHA1
Ignore UDP offload test on kernel which is older than 4.14
Kernel version which is older than 4.14 doesn't support UDP offload
absolutely. Kernel version which is between 4.14 and 5.8 support UDP
offload probably. Simply set kernel 4.14 to be threshold first and
monitor on what devices tests fail for improving the offload support
checking.

Also fix a minor bug which UDP tethering without offload is not tested
on R.

Bug: 230359047
Test: atest EthernetTetheringTest
Change-Id: Ieb181d1b5ed67b922e18ce77a9c96208b2984d10

Hungming Chen   authored and   Nucca Chen   commited 2022-05-05 09:35:00 +00:00
08c48a3dff
remove _mainline suffix from {clatd,netd}.o_mainline targets
this hack is no longer needed now that duplicate target in system/netd
is no longer an issue due to automerger to sc-mainline-prod being
turned off

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id2c1dfac3bc4e6a8f5376a41ca2d1432b838da38

Maciej Żenczykowski   commited 2022-05-02 14:49:13 -07:00
d72a5a7a70
Merge "[Tetheirng] Refactor carrier config to EntitlementManager"
Tom Hsu   authored and   Gerrit Code Review   commited 2022-04-21 13:43:14 +00:00
1135676150
[Tetheirng] Refactor carrier config to EntitlementManager
- To reduce CarrierConfigManager access times, move CarrierManager
  to TetheringConfiguration.

Bug: 225900149
Test: atest EntitlementManagerTest pass
Test: atest TetheringConfigurationTest pass
Change-Id: I5b206e2bc012cbbca26fb1e5c72558383981f183

tom hsu   commited 2022-04-21 12:44:26 +08:00
f0d60e9902
Add bpf forwording packet count test
- Add dumpsys option to dump stats map in BpfCoordinator
- Add stats test to check bpf forwording packet count in
  EthernetTetheringTest

Bug: 227159997
Test: atest TetheringCoverageTests
Change-Id: I177787ed0c28ebe137ff1431f40a23b1e4b22a19

Hungming Chen   authored and   Nucca Chen   commited 2022-04-20 08:54:08 +00:00
e32dbded7c
Tethering: replace argsContain with CollectionUtils.contains
Bug: 227159997
Test: adb shell dumpsys tethering --short
Change-Id: I6158d4cb4aecf9db4d7cc6698db898ce2cbb2c4c

Hungming Chen   authored and   Nucca Chen   commited 2022-04-20 08:53:49 +00:00
6abd0ff25d
BpfCoordinator: Add an option to choose which raw bpf map to dump
Make that tethering dumpsys can choose which map to dump.
The related functions in BpfCoordinator and its test are refactored
into template functions. This is used in the following commits which
will dump stats map for testing.

Bug: 227159997
Test: atest TetheringCoverageTests

Change-Id: I23d747543d16a971773c132b60227eb3f42efe25

Hungming Chen   commited 2022-04-20 15:58:47 +08:00
e4a6b28938
Merge "Fix R8 full mode for Tethering"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-04-20 06:39:13 +00:00
498919b44c
Merge "Add onSupportedTetheringType callback"
Mark Chien   authored and   Gerrit Code Review   commited 2022-04-20 03:38:42 +00:00
c4379c2440
Fix R8 full mode for Tethering
Ensure runtime-visible field annotations are properly preserved
when using R8 full mode.

Bug: 215530220
Change-Id: I3d09fa122a03e5c86cbefc68e7dfabd56241dcfe
Test: m + presubmit

Jared Duke   commited 2022-04-19 21:45:05 +00:00
4ed9942546
Add onSupportedTetheringType callback
This new callback could tell caller Tethering is supported for what tethering
types.

Bug: 184996041
Test: atest TetheringTests
      atest EthernetTetheringTest
CTS-Coverage-Bug: 223340235

Change-Id: Ib80ed8d7f73f4a098b8965db186d24d8cf1884d3

markchien   commited 2022-04-20 00:41:41 +08:00
ae3d303344
Merge "Move TetherStatsKey and TetherStatsValue to common libs"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-04-19 08:35:03 +00:00
8315d1cf03
Filter out excluded routes in LinkProperties
Gate presence of excluded routes in LinkProperties on target sdk T.

Bug: 186082280
Test: atest LinkPropertiesTest
Change-Id: If8fdb468a0a4968c5f2a878b7aacfeb4f7d9a9e5

Taras Antoshchuk   commited 2022-04-13 01:17:56 +02:00
30d41e59bc
Merge "ConnectivityCoverageTests refactoring"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-04-07 01:22:17 +00:00
1ae9c4ad07
ConnectivityCoverageTests refactoring
ConnectivityCoverageTests is a combination of several test libs, which
are jarjared differently. It causes duplicated classes not to be counted
for coverage properly. Build the test suite directly and apply jarjar
only once on top of everything.

Bug: 227694415
Test: atest ConnectivityCoverageTests

Change-Id: I4350ebdbf98030944ec3857e1ef67d76f26c3b16

markchien   authored and   Remi NGUYEN VAN   commited 2022-04-06 19:35:28 +09:00
e59f5e36e5
Merge "Add config_p2p_leases_subnet_prefix_length configuration"
Mark Chien   authored and   Gerrit Code Review   commited 2022-04-06 09:14:19 +00:00
60f25d6c5b
Remove tabs that have been removed downstream
Change https://r.android.com/2020995 was a cherry pick of a downstream
change that was updated to remove these tabs. Unfortunately, the
cherry pick was not updated to match making this change necessary to
ensure consistency.

Bug: 194063708
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: Id03bbbb749eb91a4f26b5c12b77eed03a72a83c4
Merged-In: Iaa1207799a44ab892dc30b55f363c6e7deb94d86

Paul Duffin   commited 2022-04-06 08:01:23 +01:00
7327f2cc1f
Merge "Remove implementation details from tethering hidden api flags"
Paul Duffin   authored and   Gerrit Code Review   commited 2022-04-06 06:51:07 +00:00
a2e04105bb
Move TetherStatsKey and TetherStatsValue to common libs
EthernetTetheringTest needs to parse BPF map content for bpf stats
tests. Move the struct class files to common libs.

Compare TetherStats{Key, Value}.java between frameworks/libs/net/common
and packages/modules/Connectivity/Tethering.
There is only the package name change as expected.

$ diff packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/TetherStatsKey.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/TetherStatsKey.java
17c17
< package com.android.networkstack.tethering;

Bug: 227159997
Test: atest TetheringCoverageTests

Change-Id: I87193cb6409b4d19c72184011d7e99275800dab1

Hungming Chen   commited 2022-04-04 23:25:58 +08:00
87bb6c3603
Remove implementation details from tethering hidden api flags
Ran the following to compute the set of split_packages and
package_prefixes properties.
    m analyze_bcpf &&
    analyze_bcpf --bcpf com.android.tethering-bootclasspath-fragment --apex framework-tethering --sdk tethering-module-sdk

Bug: 194063708
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: Iaa1207799a44ab892dc30b55f363c6e7deb94d86
Merged-In: Iaa1207799a44ab892dc30b55f363c6e7deb94d86

Paul Duffin   commited 2022-04-04 16:17:51 +01:00
a0c49bcc2c
Merge changes from topic "block_port"
* changes:
  Add connectivity_native_test to Presubmit
  Vendor AIDL interface for port blocking via eBPF

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-04-01 21:46:37 +00:00
6de87582c1
Merge "Adding Tethering proto"
Wayne Ma   authored and   Gerrit Code Review   commited 2022-03-31 16:24:16 +00:00
075dd6f8ff
Add config_p2p_leases_subnet_prefix_length configuration
Add new rro configuration which can be used to make the p2p dhcp
prefix length larger to reserve the address range outside of leases
subnet prefix length for EAPOL-Key feature. This configuration only
valid if its value larger than dhcp server address prefix length and
config_tether_enable_legacy_wifi_p2p_dedicated_ip is true.
E.g.:leaseSubnetPrefixLength = 25, p2p static address = 192.168.49.1/24
dhcp range: 192.168.49.0 ~ 192.168.49.127 (192.168.49.1/25), reserved
192.168.49.128 ~ 192.168.49.255 for EAPOL-Key feature.

Bug: 170056953
Test: atest TetheringTests

Change-Id: I1319efd871796da7234383a29ab64a1623101ae7

markchien   commited 2022-03-31 16:32:55 +08:00
fb65dfeb8d
Add test for tetherOffloadClient{Add, Remove, Clear}
also remove the redundant constructor definition in
test key/value class builder.

Test: atest TetheringCoverageTests
Change-Id: Icf93d4f196846c82c3a1c2b2b8697f4a5156ea92

Hungming Chen   commited 2022-03-30 16:28:11 +08:00
dad664748a
Add test for tetherOffloadRule4Clear
Test that clear IPv4 offload rules once tethering stopped

Test: atest TetheringCoverageTests
Change-Id: I107b15bef2a15f7c85236f2801c43288fe7d0f4d

Hungming Chen   commited 2022-03-30 16:28:11 +08:00
fa3942c7e7
Vendor AIDL interface for port blocking via eBPF
New Connectivity Service exposed to vendor for
restricting certain ports for use only in vendor.

Bug: 179733303

Change-Id: Iad9aff6924498ede5a08cfa5482082f094c0a90b

Tyler Wear   commited 2022-03-25 09:14:48 -07:00
b37f551287
Adding Tethering proto
Bug: 153942334
Test: m, flash and boot
Change-Id: I853d3a4dd914dd0c65a6c9e1749d8898da68540e

Wayne Ma   commited 2022-03-24 17:40:31 +08:00
71d66396d2
Merge changes from topic "ethernet_mainline"
* changes:
  Fix the NPE thrown when starting Ethernet service in OS lower than T.
  Remove the stub ethernet service from Connectivity module.
  Update hidden API files for EthernetManager API move.
  Provide a stub ethernet service to build in sc-mainline-prod.
  Build ethernet framework source into framework-connectivity-tiramisu

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-16 16:03:30 +00:00
6dde8ac532
Merge "[DU04-4]Appropriate changes to the NetworkPolicyManager API"
Frank Li   authored and   Gerrit Code Review   commited 2022-03-16 12:28:24 +00:00
cd9fe9b220
Merge "Add a carrier config to block tethering."
Tom Hsu   authored and   Gerrit Code Review   commited 2022-03-16 07:26:39 +00:00
1c12d0790e
Add a carrier config to block tethering.
When KEY_CARRIER_SUPPORTS_TETHERING_BOOL=false, it will behave as if
entitlement check failed and a system notifcation shows up if user
tries to turn on tethering from Settings UI.

Bug: 161206517
Test: manual
Change-Id: I78da390ecb0c8f4f68285ef16da80653f136c11e

Meng Wang   authored and   tom hsu   commited 2022-03-16 12:40:24 +08:00
a84bb2d8ba
[DU04-4]Appropriate changes to the NetworkPolicyManager API
Divide the NetworkPolicyManager API
notifyStatsProviderWarningOrLimitReached into the following two APIs:
1. notifyStatsProviderWarningReached()
2. notifyStatsProviderLimitReached()

Bug: 216474563
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest OffloadControllerTest
Change-Id: I473b8b677d492a7076e63f445b3a3be24d25e14d

Frank   commited 2022-03-16 12:23:34 +08:00
9ff8eb1829
Update hidden API files for EthernetManager API move.
Test: m
Bug: 210586283
Merged-In: I995c81f9bcfdd57c37f679878b6973d3de739803
Change-Id: I5f8c35a225cad94c87b00f7523497d145d335a13

Xiao Ma   commited 2022-03-16 02:09:25 +00:00
885acf0abc
Merge changes I5af6ce96,Ibc1f6813
* changes:
  Refactor make{Tether4Key, Tether4Value ConntrackEvent} helper
  BpfCoordinatorTest: refactor upstream and downstream setup functions

Nucca Chen   authored and   Gerrit Code Review   commited 2022-03-11 18:05:14 +00:00
3938102448
Merge "Use U32 from shared library"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-10 16:27:33 +00:00
98502b78bc
Use U32 from shared library
There is U32 added in frameworks/libs/net. Use shared one to avoid
duplicated code.

Bug: 215095957
Test: m
Change-Id: I861bc2f65ea947a908de2ec83e9b137d3342c8ce

markchien   commited 2022-03-09 15:05:16 +08:00
22c1a3aa1f
Merge "Using common apex_defaults for com.android.tethering module." am: 6802eadef5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2007756

Change-Id: I03636e6b8b4dc200fcb039b99190759bc7d5e776

Gurpreet Singh   authored and   Automerger Merge Worker   commited 2022-03-07 17:56:53 +00:00
3acad24476
Merge "Using common apex_defaults for com.android.tethering module."
Gurpreet Singh   authored and   Gerrit Code Review   commited 2022-03-07 17:32:37 +00:00
6802eadef5
Merge "Make isTetheringSupported respect all tethering downstreams" am: 8dcc3000fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1938694

Change-Id: Ic5f106a611a729fd63af2710bb9354be447641fd

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-07 06:17:57 +00:00
c4b5faefaf
Merge "Make isTetheringSupported respect all tethering downstreams"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-07 05:56:20 +00:00
8dcc3000fd
Make isTetheringSupported respect all tethering downstreams
Currently if wifi, usb and bluetooth tethering is not supported,
isTetheringSupported would return false. Then ethernet, ncm tethering
and wifi p2p would also not be supported anymore. Make
isTetheringSupported respect all tethering downstreams after T.

Also remove redundant code:
1. tethering always has upstream configuration, checking whether has
upstream configuration for isTetheringSupported is useless.
2. Remove TetheringDependencies#isTetheringSupported because it don't
have any caller.

Test: atest TetheringTests
Change-Id: I3db5ce410c064d37c9e9e704fce2a2b68705834e

markchien   commited 2022-03-07 10:55:51 +08:00
259d5c08a8
Merge changes from topic "dedup-interfaceparams" am: a63535bfd1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2007154

Change-Id: I7bd8c3a2ef89d0f358d6002d87dd08d6cd818691

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-03-05 08:50:34 +00:00
ef0b4884d0
Merge changes from topic "dedup-interfaceparams"
* changes:
  Remove unused InterfaceParams jarjar rule
  Deduplicate InterfaceParams

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-03-05 08:23:55 +00:00
a63535bfd1
Deduplicate InterfaceParams
CS should use InterfaceParams from frameworks/libs/net.

Test: builds
Bug: 222448728
Change-Id: I1f45d3171b265461a8724b4be7b212c030b63fe9

Patrick Rohr   commited 2022-03-04 16:53:51 +01:00
9f371f024b
Using common apex_defaults for com.android.tethering module.
In /packages/modules/common/sdk/ModuleDefaults.bp file, some
apex_defaults are added to provide common parameters corresponding to
Q, R, S, and T releases.
(Refer to CL link for above mentioned change -
https://android-review.googlesource.com/c/platform/packages/modules/common/+/2005890?forceReload=true)

This CL is using the apex_default corresponding to R release for the
com.google.android.tethering module.

Bug: 172589606
Test: USE_RBE=true m
Since there are no runtime changes, successful code build is enough for
testing.

Change-Id: I4b3b3d6add96da1ee4421227996b54f7b96bc2c2

Gurpreet Singh   commited 2022-03-04 15:34:29 +00:00
a12858d494
Merge "Pass whole TetheringConfiguration to IpServer" am: 9edd999725
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1999083

Change-Id: I79e2d5d822703902d35d8963bf32edc1ad2f3e26

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-03 12:20:54 +00:00
9024fe85bd
Merge "Pass whole TetheringConfiguration to IpServer"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-03 11:54:59 +00:00
9edd999725
Pass whole TetheringConfiguration to IpServer
This is a no-op CL that passing whole TetheringConfiguration to IpServer
to reduce the number of IpServer constructor parameters.

Bug: 170056953
Test: atest TetheringTests
Change-Id: I4ec17f7ecaefd7f275139ad9c7f7551635b192c9

markchien   authored and   Mark Chien   commited 2022-03-03 11:54:24 +00:00
b961d3d70f
Merge "Remove tether_enable_select_all_prefix_ranges flag" am: a3728e97ca
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2005315

Change-Id: I34f748e1fdbc1c8ec82dfce4053e12989a99cad2

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-03 10:08:41 +00:00
38bfe95387
Merge "Remove tether_enable_select_all_prefix_ranges flag"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-03 09:40:27 +00:00
a3728e97ca