Commit Graph

11326 Commits

Author SHA1 Message Date
Lorenzo Colitti
7246474dfd Use NET_CAPABILITY_NOT_VCN_MANAGED from ConstantsShim.
This is required to build in mainline-prod, which does not have
access to in-progress S APIs.

The Merged-In tag in this CL is from aosp/1604974, which is an
arbitrary CL that is already in sc-dev, with the purpose of
preventing this CL from reaching sc-dev.

Bug: 167645754
Ignore-AOSP-First: need to fix build
Test: m NetworkStack CtsNetTestCasesLatestSdk CtsHostsideNetworkTests CtsHostsideNetworkTestsApp
Change-Id: If40ebfadbf6d3ee86a58a55711fbc146a8599fdb
Merged-In: I5cd32efd0f87c823cd2d0a2fa3a95a83093fb6f9
2021-02-26 13:48:00 +00:00
Junyu Lai
0937250278 Merge "Fix CTS test failed on R device" am: 75d28bee27 am: 3ec8882370
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1602480

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9003eaba1c2548349904c5281cfaf0089320c56a
2021-02-26 10:01:40 +00:00
Remi NGUYEN VAN
62a1ba2d1b Merge "Add flag to force choosing upstreams automatically" am: e43c960d50 am: a474b9edfa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1596352

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaef23446e43ef557521785a23e5dcf81655d7f05
2021-02-26 10:01:35 +00:00
Junyu Lai
3ec8882370 Merge "Fix CTS test failed on R device" am: 75d28bee27
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1602480

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76b422a0f86a5ca63021d1cb88db37089a310280
2021-02-26 09:31:05 +00:00
Remi NGUYEN VAN
a474b9edfa Merge "Add flag to force choosing upstreams automatically" am: e43c960d50
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1596352

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If6b4415a3a3f507101d63b53296925b3572ebf1e
2021-02-26 09:30:57 +00:00
Junyu Lai
75d28bee27 Merge "Fix CTS test failed on R device" 2021-02-26 07:17:47 +00:00
Treehugger Robot
f14f0783aa Merge "ebpf offload: bump size of ipv4 tethering maps" am: fcd5ec1971 am: f1a420808c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1608893

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I315667fba6cafe2e43e217a3fd430cbd219f849e
2021-02-26 06:57:11 +00:00
Treehugger Robot
0057b06d90 Merge "ebpf offload: mark as critical for tethering not netd" am: 4945772ba7 am: 9ea87036a8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1607252

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa82c02dee9bad56257d3834c16091f19f7cdd41
2021-02-26 06:57:05 +00:00
Junyu Lai
da1951ace8 Merge "[VCN07.1] Add test for bypassing VCN for non-internet request" am: 3f134a3805 am: b209d3a2a7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1597477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic26361a1b95dcdf6322b086e558a843a645a0a8e
2021-02-26 06:56:59 +00:00
Chalard Jean
41870192e3 Merge "Release test network in a test" am: 26c11595bc am: d3e8ae1f88
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1605235

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I698d0908daa511b48b387d973fdd8b724a203e75
2021-02-26 06:56:52 +00:00
Daulet Zhanguzin
f50b47f13f Use unbundled version of BouncyCastle in Ike cts tests am: bb540131b7 am: c4f27ccd99
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1605037

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icaef49183428ae3f2d7404dfa39a49258d406926
2021-02-26 06:56:24 +00:00
Remi NGUYEN VAN
e43c960d50 Merge "Add flag to force choosing upstreams automatically" 2021-02-26 06:42:00 +00:00
Treehugger Robot
f1a420808c Merge "ebpf offload: bump size of ipv4 tethering maps" am: fcd5ec1971
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1608893

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iccd3542628882fdaa25ed0a5b2c073f596ea198b
2021-02-26 06:05:10 +00:00
Treehugger Robot
9ea87036a8 Merge "ebpf offload: mark as critical for tethering not netd" am: 4945772ba7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1607252

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8d58bccf80be1fa6346922abd769c1b96e4274be
2021-02-26 06:04:04 +00:00
Treehugger Robot
fcd5ec1971 Merge "ebpf offload: bump size of ipv4 tethering maps" 2021-02-26 05:43:07 +00:00
Treehugger Robot
4945772ba7 Merge "ebpf offload: mark as critical for tethering not netd" 2021-02-26 05:39:07 +00:00
Maciej Żenczykowski
8549af9f17 ebpf offload: bump size of ipv4 tethering maps
For ipv6 we need 1 entry per client, so 64 seems like plenty,
while for ipv4 we need 1 entry per flow, so even 1024 seems
like it might not be enough, but it's much better than 64.

Nucca says:
  # cat proc/sys/net/netfilter/nf_conntrack_buckets
  65536
  # cat proc/sys/net/netfilter/nf_conntrack_max
  262144

  per https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt
  the default “nf_conntrack_max” is “nf_conntrack_buckets * 4”.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib7d1d8c19bc688c442d842cf5c9f45cdf1241754
2021-02-25 19:11:39 -08:00
Maciej Żenczykowski
607d6dda0d ebpf offload: mark as critical for tethering not netd
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5bccfcbababb09a412ac1093513ad93c254b349b
2021-02-25 19:10:01 -08:00
Lorenzo Colitti
264d8e24bd Revert "Update tests to use Doze DeviceConfig flags."
This change went into internal after R branched, and did not
go to AOSP. Revert it in mainline-prod in order to ensure that
CtsHostsideNetworkTests builds.

These tests are developed in internal, not AOSP, so do not need
to automerge to mainline-prod.

Bug: 167645754
Test: treehugger
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
Change-Id: I2b7d9855b81be5ef968a3de72bf9f7e7225075e1
2021-02-26 00:43:57 +09:00
Lorenzo Colitti
9afd779325 Revert "Fix DeviceConfig resetting."
This change went into internal after R branched, and did not
go to AOSP. Revert it in mainline-prod in order to ensure that
CtsHostsideNetworkTests builds.

These tests are developed in internal, not AOSP, so do not need
to automerge to mainline-prod.

Bug: 167645754
Test: treehugger
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Change-Id: Ieb1f0ce2a69180bbe89f810ddb3b48188ae3530e
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-26 00:43:18 +09:00
Lorenzo Colitti
5de0092e3c Revert "Do not install tethering in TEST_MAPPING"
This reverts commit c2858740c1.

Reason for revert: tethering in mainline-prod should always be
updatable.

Bug: 167645754
Test: treehugger
Ignore-AOSP-First: this change must not go into AOSP
Change-Id: I0e60eb2c4a1a2e8e985c8ff91d343d1255ddf783
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 20:42:59 +09:00
Daulet Zhanguzin
ac80a885b0 Use unbundled version of BouncyCastle in Ike cts tests
Since BouncyCastle APIs provided by platform vary, use unbundled
BouncyCastle

Fixes: 180870458
Test: atest CtsNetTestCases
Change-Id: I78c053150bb9cf86173f869dd6e13e9a6917ffa7
Merged-In: I78c053150bb9cf86173f869dd6e13e9a6917ffa7
2021-02-25 20:42:59 +09:00
Lorenzo Colitti
d3d4461f48 Temporarily stop compiling three CTS tests.
This is better than commenting out code because any changes in
AOSP will automerge cleanly. When these tests are fixed by
adding a shim for ConnectivityManager, we can simply revert this
change.

Bug: 167645754
Test: m com.android.tethering
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Change-Id: I450e2d44870e70ad3b80f1843ff90dbd5cfc4902
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 20:42:55 +09:00
Junyu Lai
b209d3a2a7 Merge "[VCN07.1] Add test for bypassing VCN for non-internet request" am: 3f134a3805
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1597477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idfe60822e28968c52514497e43537cb6e9c0fae3
2021-02-25 11:03:33 +00:00
Junyu Lai
3f134a3805 Merge "[VCN07.1] Add test for bypassing VCN for non-internet request" 2021-02-25 10:16:03 +00:00
Chalard Jean
d3e8ae1f88 Merge "Release test network in a test" am: 26c11595bc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1605235

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iae36d7f39bd1ff5287311df965829f6dee3de0d4
2021-02-25 08:46:15 +00:00
Chalard Jean
26c11595bc Merge "Release test network in a test" 2021-02-25 08:06:15 +00:00
Lorenzo Colitti
33b3e53faa Use the R checkAndNoteWriteSettingsOperation method.
In S, there is a new overload that takes an attribution tag as
well. Don't use this method yet, and add a TODO to call it via
a shim.

Bug: 167645754
Test: m com.android.tethering
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Change-Id: Ib49a73aa28d3abfc1b8f1cdad84abb022c49efe8
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 16:53:26 +09:00
Lorenzo Colitti
50caf56267 Revert "Revert^2 "Add service-connectivity to tethering APEX""
As part of syncing the tethering code from AOSP to mainline-prod,
revert the changes to the build file that added the connectivity
jar and made the module no longer updatable.

The intent is to build and release the tethering module in
mainline-prod, from latest AOSP code, without including the
connectivity code, which depends on S APIs.

This reverts commit 2812f607a0.

Bug: 167645754
Test: m com.android.tethering
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Change-Id: Ic2491f04880ff66abc3b2d3aaee6168e18f6d68a
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 16:53:24 +09:00
Daulet Zhanguzin
c4f27ccd99 Use unbundled version of BouncyCastle in Ike cts tests am: bb540131b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1605037

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I46509df9b0f5c69d698f14c5a253b75fd4f71729
2021-02-25 07:24:03 +00:00
Lorenzo Colitti
09074df188 Merge remote-tracking branch 'goog/rvc-qpr-dev-plus-aosp' into merge-sc-dev-plus-aosp-then-rvc-qpr-dev-plus-aosp
This CL merges rvc-qpr-dev-plus-aosp on top of sc-dev-plus-aosp
on top of mainline-prod. It picks up changes that were merged
into aosp/master before sc-dev-plus-aosp was on the path between
AOSP and master. One such very simple CL is aosp/1554765.

There were no merge conflicts.

Current diffstat with aosp/master is:
 97 files changed, 2219 insertions(+), 84 deletions(-)

This includes 1800 lines of translations added in 72 files like
Tethering/res/values-*/strings.xml

Bug: 167645754
Test: no merge conflicts
Test: didn't even try to build
Ignore-AOSP-First: this is a merge from AOSP
Change-Id: I63af0b95e2d0e6bddc217c29014c03ea0dbda6ec
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 16:23:06 +09:00
Lorenzo Colitti
1498ad9ac1 Merge remote-tracking branch 'goog/sc-dev-plus-aosp' into merge-sc-dev-plus-aosp-then-rvc-qpr-dev-plus-aosp
This CL merges sc-dev-plus-aosp into mainline-prod. It picks up
changes that:
- Were merged into sc-dev and automerged into sc-dev-plus-aosp
- Were merged into aosp master while sc-dev-plus-aosp was on the
  path between AOSP and master.

It does not pick up changes that were merged into aosp before
sc-dev-plus-aosp was on the merge path from AOSP to master. One
such very simple CL is aosp/1554765.

There were no merge conflicts.

Current diffstat with aosp/master is:

 161 files changed, 2923 insertions(+), 4005 deletions(-)

This includes 1800 lines of translations added in 72 files like
Tethering/res/values-*/strings.xml

Bug: 167645754
Test: no merge conflicts
Test: didn't even try to build
Ignore-AOSP-First: this is a merge from AOSP
Change-Id: Ie82ff0d3fcb82f0d66534b114af9f240f5574bfb
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-02-25 16:22:15 +09:00
junyulai
d69d7c815c Fix CTS test failed on R device
The test failed since the API is not available on R device.
Add conditions to ignore it.

Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideVpnTests
      on R device
Bug: None
Change-Id: I05a1f63adec72e89382cb095db714bccbdff0058
2021-02-25 08:39:28 +08:00
Chalard Jean
8a8bf7434c Release test network in a test
This causes failures in subsequent tests that expect
only one test network to be up.

Bug: 181033598
Test: this
Change-Id: I74444f4aff7750a5bbd2564e5e22714d73c72d8b
2021-02-24 23:07:13 +09:00
Daulet Zhanguzin
bb540131b7 Use unbundled version of BouncyCastle in Ike cts tests
Since BouncyCastle APIs provided by platform vary, use unbundled
BouncyCastle

Fixes: 180870458
Test: atest CtsNetTestCases
Change-Id: I78c053150bb9cf86173f869dd6e13e9a6917ffa7
2021-02-24 13:09:36 +00:00
Lorenzo Colitti
ad38d27ebb Add a BpfMap#clear method. am: ffb0ccd04b am: 10be22076e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1604974

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e4d5e6005cdd006ddd814692714fb80a6c46936
2021-02-24 12:30:56 +00:00
Lorenzo Colitti
10be22076e Add a BpfMap#clear method. am: ffb0ccd04b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1604974

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idebe06d79cb8f6e91634057c59bb0cc022ba1ee0
2021-02-24 11:40:11 +00:00
Lorenzo Colitti
f6603588ab Make the CTS tests explicitly depend on modules-utils-build. am: 2be434ab12 am: 6af777632d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1604973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idfdd67fa1502614e57d7a2b3ea6fdae788024b4c
2021-02-24 07:00:05 +00:00
Lorenzo Colitti
4d09a87075 Move definitions used by tethering bpf code into the module. am: 56be03eb28 am: 69b0769eb0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1601855

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I842250d341916f7d5a1f48ba8ec09c4235d20d51
2021-02-24 06:59:26 +00:00
Lorenzo Colitti
ffb0ccd04b Add a BpfMap#clear method.
A caller can mostly already do this via forEach(), but having a
specific method is faster (since the code does not need to read
the value) and easier to use.

The semantics of this method (e.g., ignore ENOENT while deleting
a key, but throw on any other error) match those of the native
BpfMap::clear method.

Test: new unit tests
Change-Id: I5cd32efd0f87c823cd2d0a2fa3a95a83093fb6f9
2021-02-24 06:09:46 +00:00
Lorenzo Colitti
6af777632d Make the CTS tests explicitly depend on modules-utils-build. am: 2be434ab12
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1604973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iedfba98ac066241a5959fc45d28d0feb8db159ab
2021-02-24 05:52:14 +00:00
Lorenzo Colitti
69b0769eb0 Move definitions used by tethering bpf code into the module. am: 56be03eb28
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1601855

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9b84ca223c4a950a55cb63642a435e87e158949d
2021-02-24 05:51:57 +00:00
Lorenzo Colitti
2be434ab12 Make the CTS tests explicitly depend on modules-utils-build.
In AOSP master and downstream branches, this likely works via a
transitive dependency. In mainline-prod, this doesn't work. Add
the dependency explicitly, since it makes things build everywhere
and in general it's also good practice to "include what you use".

Bug: 167645754
Test: m CtsNetTestCasesLatestSdk in mainline-prod has fewer errors
Change-Id: Ie575372415a806deee9996aab7f920d2c15bff80
2021-02-24 05:43:36 +00:00
Lorenzo Colitti
56be03eb28 Move definitions used by tethering bpf code into the module.
Bug: 167645754
Test: m com.android.tethering
Change-Id: Ia4fb1201e5f4e0c35baba7865b26b4cec0945a64
2021-02-24 12:16:05 +09:00
Treehugger Robot
d517fa33a0 Merge "Fix CTS test failed on R device" am: afa18f0256 am: 0919cc06c5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1597475

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I652339d80d81e97399a35e5c2740d878a458a560
2021-02-22 12:49:20 +00:00
Treehugger Robot
1eed01b25c Merge "Add MUTABLE flag when creating PendingIntent" am: f754671f07 am: ac7587318f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1598634

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie8b0bf1eb1c93dd568d8a5bb9cf002c9b67b81bf
2021-02-22 12:48:39 +00:00
Treehugger Robot
0919cc06c5 Merge "Fix CTS test failed on R device" am: afa18f0256
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1597475

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If786db7b5635bcd4bb41043169e1c187b13d0eee
2021-02-22 11:50:46 +00:00
Treehugger Robot
ac7587318f Merge "Add MUTABLE flag when creating PendingIntent" am: f754671f07
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1598634

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7260575a7b680dbe09599aba59ef597ed42d387b
2021-02-22 11:47:12 +00:00
Treehugger Robot
afa18f0256 Merge "Fix CTS test failed on R device" 2021-02-22 10:37:29 +00:00
Treehugger Robot
f754671f07 Merge "Add MUTABLE flag when creating PendingIntent" 2021-02-22 10:29:31 +00:00