Commit Graph

43168 Commits

Author SHA1 Message Date
Chalard Jean
66bd87f0d4 S- not to crash on NetworkInfo(null) or setDetailedState(null) am: dece0d805f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892101

Change-Id: Idfb993a40d43a4ead862c229c93b8cb680b7bc1a
2021-11-17 06:49:44 +00:00
Chalard Jean
dece0d805f S- not to crash on NetworkInfo(null) or setDetailedState(null)
When NetworkInfo(null) or setDetailedState(null, any, any) are
called, S used to not crash but plant a null bomb for later
which may explode in some calls (notably, parceling) : see the
bug referenced below for details.

To help catching these errors earlier a patch was made to crash
as soon as one of these methods is called with a null argument,
but this will also crash incorrect use on existing code that
may never actually step on the mine, crashing code that used not
to crash. For safety, implement the new behavior only on T.

Bug: 145972387
Test: NetworkInfoTest
Change-Id: Ib710497d83b2d26439c2bd4d2f572310db97d6fd
2021-11-15 21:18:25 +09:00
Maciej Żenczykowski
694ecd1c53 Merge changes from topics "rename-libbpfmapjni", "rename-libtetherutiljni" am: ff81692077
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1886108

Change-Id: I14463253c218b1a6f7964566fbc1c93fe48de672
2021-11-11 13:42:41 +00:00
markchien
de93cf9aba Rename tethering jni and get the jni by its package name am: f967b11087
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885530

Change-Id: Icc18029f126a4845d6d2071d9e36458cbab4c313
2021-11-11 13:42:39 +00:00
Maciej Żenczykowski
ff81692077 Merge changes from topics "rename-libbpfmapjni", "rename-libtetherutiljni"
* changes:
  Rename libbpfmapjni and include bpf common util library
  Rename tethering jni and get the jni by its package name
2021-11-11 13:19:48 +00:00
Treehugger Robot
d5ad273033 Merge "replace R + 1 with S" am: 7eb9f88a6e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1888235

Change-Id: I81fd120c00c876399a69644fa2fe2dd2738b2310
2021-11-11 07:41:53 +00:00
Treehugger Robot
7eb9f88a6e Merge "replace R + 1 with S" 2021-11-11 07:26:39 +00:00
markchien
782a56809b Rename libbpfmapjni and include bpf common util library
1. libbpfmapjni.so is rename to libnet_utils_device_common_bpf.so
2. net-utils-device-common-bpf.jar is separated from
   net-utils-device-common-netlink.jar

Bug: 205088391
Test: atest TetheringTests
      atest CtsTetheringTest
      atest TetheringPrivilegedTests

Change-Id: If59b35b3429ebd597c18678499ff458183f89026
2021-11-11 13:49:15 +08:00
Remi NGUYEN VAN
31969c1dc5 Merge "Fix NetworkCapabilitiesTest on S" am: 4638c093ed
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1887835

Change-Id: I7e2c6a22a7314584c05bf12083648cad45249bb2
2021-11-11 04:54:53 +00:00
Remi NGUYEN VAN
4638c093ed Merge "Fix NetworkCapabilitiesTest on S" 2021-11-11 04:42:36 +00:00
Remi NGUYEN VAN
daa03defee Fix NetworkCapabilitiesTest on S
Mark NetworkCapabilitiesTest as ConnectivityModuleTest so that it is
only run in MTS with the Connectivity module installed, and fix
parceling tests to use the right number of fields in that case.

NetworkCapabilitiesTest is only useful to test the Connectivity module,
and not other modules like NetworkStack, as it is a unit test of a class
in the Connectivity module.

Bug: 205901761
Test: atest NetworkCapabilitiesTest
Change-Id: I10ba0f866bc7a39b2c90bdde12a79feefea2d5ee
2021-11-11 12:30:07 +09:00
Maciej Żenczykowski
8834250ef8 replace R + 1 with S
Test: TreeHugger
Bug: 170424293
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I43f53268b6c1605d928ce3431cc95b8a66b6c052
2021-11-10 18:20:01 -08:00
Mark Chien
e4235b83be Merge "Rename tethering util folder and its package name" am: ea0cfd1897
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1879620

Change-Id: Ifb50013d1bca2b99d8c492992ab2ec0a1fec7e32
2021-11-10 06:26:11 +00:00
Mark Chien
ea0cfd1897 Merge "Rename tethering util folder and its package name" 2021-11-10 06:08:28 +00:00
markchien
f967b11087 Rename tethering jni and get the jni by its package name
tetherutiljni is renamed to com_android_networkstack_tethering_jni_util

Bug: 205088391
Test: atest TetheringTests
      atest CtsTetheringTest
      atest TetheringPrivilegedTests
Change-Id: Ifd1f4473625e33d3ebe190c9f8a2b5d54aa1ff49
2021-11-10 14:07:24 +08:00
Remi NGUYEN VAN
b92f209a18 Don't rematch all requests when adding new ones am: 959d2cb6bd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784387

Change-Id: I6fda0e23d242b54e33bf6e4085ef3146c4d51a55
2021-11-10 04:25:52 +00:00
markchien
d02f9af918 Rename tethering util folder and its package name
Move tethering util files from android.net.util into
com.android.networkstack.tethering.util. The goal is move all of
tethering internal files into its own namespace
com.android.networkstack.tethering.util.

Bug: 205088391
Test: atest TetheringTests
      atest CtsTetheringTest
      atest TetheringPrivilegedTests

Change-Id: I6559fb4f873b3cad5b210b10e49df1b6c6914a70
2021-11-09 17:02:47 +08:00
Remi NGUYEN VAN
959d2cb6bd Don't rematch all requests when adding new ones
With the network selection rewrite in S, rematching a single request can
now easily be done; this can be used as an optimization in
handleRegisterNetworkRequests to avoid rematching all requests when
registering a new one.

This can be disabled by a flag that is unset by default,
REMATCH_ALL_REQUESTS_ON_REGISTER.

Test: atest ConnectivityServiceTest
Change-Id: If76f79b41ac88863974f7025624667134bea2570
2021-11-08 19:17:57 +09:00
Treehugger Robot
5b6e2b3509 Merge "Add TetheredInterface{Request, Callback} interface" am: 7269fb17fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1873874

Change-Id: Iae7cf249cd17ad9eff30932d686b338763b2b5e5
2021-11-08 10:08:30 +00:00
Treehugger Robot
7269fb17fd Merge "Add TetheredInterface{Request, Callback} interface" 2021-11-08 09:54:54 +00:00
markchien
48e271bdcb Add TetheredInterface{Request, Callback} interface
Define interfaces that match the signature of the existing
EthernetManager.TetheredInterfaceRequest and TetheredInterfaceCallback
classes and make EthernetManager.TetheredInterfaceRequest and
TetheredInterfaceCallback implement/subinterface these interfaces. The
new bluetooth API could also implement these interfaces to make API surface
consistent.

Test: TH would test the existing tests that use the subclass.
Bug: 190438212
Change-Id: I093972c111cb1d921076782492716d5a046be8fc
2021-11-08 16:44:34 +08:00
Mark Chien
ab61c4e42f Merge "Separate tethering build target to Tethering and TetheringNext" am: 7509c7a67e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1870417

Change-Id: I4ba4f4ac5fe1dbce46a78b11063cbc9e6a664aa0
2021-11-08 07:44:33 +00:00
Mark Chien
7509c7a67e Merge "Separate tethering build target to Tethering and TetheringNext" 2021-11-08 07:29:55 +00:00
Treehugger Robot
db33b9ea65 Merge "Include the failing stats in stats failure assertions." am: 27979bd116
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1883772

Change-Id: I05c36d9718a07041224dded9e32c755321760acd
2021-11-08 06:34:52 +00:00
Treehugger Robot
27979bd116 Merge "Include the failing stats in stats failure assertions." 2021-11-08 06:20:39 +00:00
Lorenzo Colitti
5156e787f3 Include the failing stats in stats failure assertions.
Currently debugging IpSecManagerTest counter test failures is
difficult because the assertion message does not say how many
bytes/packets were expected.

Add this information to the assertion message.

Bug: 204860049
Test: test-only change
Change-Id: I4e12be9a58a688fcee3362dceb31d9f21e981d6c
2021-11-08 13:25:45 +09:00
Les Lee
663dfcaec0 Merge "Add test case to test normalize" am: b5ee639fe0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1881008

Change-Id: Ia6e200fe5543425d8f56d212826ae01ade01fe1e
2021-11-06 01:11:32 +00:00
Les Lee
b5ee639fe0 Merge "Add test case to test normalize" 2021-11-06 00:54:14 +00:00
Treehugger Robot
e90ceefb34 Merge "Add IFF_MULTICAST to test interfaces" am: aa5532cb6f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1856105

Change-Id: Ia2e1ab3bfd205ab758d0c2ce075e6a202be2609c
2021-11-05 20:18:07 +00:00
Treehugger Robot
aa5532cb6f Merge "Add IFF_MULTICAST to test interfaces" 2021-11-05 20:01:41 +00:00
Les Lee
5299a2b307 Add test case to test normalize
Bug: 194939211
Test: atest -c NetworkTemplateTest
Change-Id: I2f5790b9217357ddcf3f466cec1b2b1afbb47210
2021-11-05 16:59:10 +08:00
Remi NGUYEN VAN
6fc44359eb Add IFF_MULTICAST to test interfaces
This allows using test interfaces for multicast scenarios, such as
testing mDNS behavior.

Test: atest CtsNetTestCases
Change-Id: Ib5d8a997176f910d499021fdcd12c361aff1233d
2021-11-05 17:15:20 +09:00
Remi NGUYEN VAN
e453beefc5 Merge "Use ConnectivityCheckTargetPreparer in CTS" am: defc74fb2f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1844185

Change-Id: If029b7cb4c7486673c6808f1b6d8a15b67ea0e04
2021-11-05 04:44:35 +00:00
Remi NGUYEN VAN
defc74fb2f Merge "Use ConnectivityCheckTargetPreparer in CTS" 2021-11-05 04:27:47 +00:00
Maciej Żenczykowski
f1dfa0e50b Merge "Fix TetheringPrivilegedTests crash" am: 4e141d9514
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1879622

Change-Id: Ia7dfa9f1acfdd6e6a73dd4414242f5477970b3b1
2021-11-04 10:55:51 +00:00
Maciej Żenczykowski
4e141d9514 Merge "Fix TetheringPrivilegedTests crash" 2021-11-04 10:37:04 +00:00
markchien
5a8c806e55 Separate tethering build target to Tethering and TetheringNext
To avoid much code diverge between aosp and its downstream, we need to
separate the build target which build with latest stable sdk in release
branch and build with unfreeze sdk in dev branch. So we could use new
API with APIshim in dev branch without impacting release branch.

BYPASS_INCLUSIVE_LANGUAGE_REASON=the wording is the file name of
existing file.
Bug: 204265450
Test: m
Change-Id: I949fd83b1eed7461e0b381193b190cf15080bc1b
2021-11-04 08:53:12 +00:00
markchien
45dc794fb4 Fix TetheringPrivilegedTests crash
After separat BpfMap to a library, its package name is jarjar to
com.android.network.stack.util*. Also jarjar BpfMap of
TetheringPrivilegedTests to fix crash in jni registered.

Bug: 179733303
Test: atest TetheringPrivilegedTests
Change-Id: Ia9bc819a44fe26bf2ff7a46351ea60f2eeb02933
2021-11-04 16:40:18 +08:00
Remi NGUYEN VAN
ead12ae16a Merge "Move fromStableParcelable to KeepaliveController" am: 1d1b1fe999
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1876687

Change-Id: I64a68e527701920a5956fbb51001c42b938159cb
2021-11-04 06:31:02 +00:00
Remi NGUYEN VAN
1d1b1fe999 Merge "Move fromStableParcelable to KeepaliveController" 2021-11-04 06:19:17 +00:00
Maciej Żenczykowski
97ae1b7dd6 Merge "bpfmap: Move to Common Location" am: bb4c6073ec
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1863313

Change-Id: I41e514bc96ddce755e068e921ebe3a14186da8c8
2021-11-04 02:02:54 +00:00
Maciej Żenczykowski
bb4c6073ec Merge "bpfmap: Move to Common Location" 2021-11-04 01:50:15 +00:00
Treehugger Robot
d2fc9c0c2e Merge "Add permission update logs" am: f475961aca
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1870419

Change-Id: I4a18e53437973e4d2545a31e7657b885f75b3aa2
2021-11-02 02:44:36 +00:00
Treehugger Robot
f475961aca Merge "Add permission update logs" 2021-11-02 02:27:56 +00:00
Kimberly Kreider
57699090be Merge "Replace "mts" with "mts-tethering"." am: 200e42063c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1864894

Change-Id: I86bfa59c32e41526ab05580d425e7dad7a4f7dd1
2021-11-02 00:06:06 +00:00
Kimberly Kreider
200e42063c Merge "Replace "mts" with "mts-tethering"." 2021-11-01 23:43:53 +00:00
Treehugger Robot
f4016713ae Merge "Shorten a timeout" am: a200fe8c1c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1877219

Change-Id: I10b9f07a30bd017904e4c8c6bc9c38aa49f9c1b1
2021-11-01 12:31:49 +00:00
Treehugger Robot
a200fe8c1c Merge "Shorten a timeout" 2021-11-01 12:19:28 +00:00
Chalard Jean
0aa49aa970 Merge "Replace mDeps with a custom object" am: 31ac212428
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1868567

Change-Id: I3aaea000117e45aa9ff12b408231eae6c52a93cd
2021-11-01 10:43:44 +00:00
Chalard Jean
31ac212428 Merge "Replace mDeps with a custom object" 2021-11-01 10:31:53 +00:00