Commit graph android_packages_modules_Co.../staticlibs
Message SHA1
Merge "Handle v4-mapped v6 address in Struct parsing" into main am: d232211291
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2807798

Change-Id: I7b88d811ee3197e7ff48af3eb780295077cf9a07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2023-10-31 12:25:39 +00:00
86937794bb
Merge "Add util method to generate IPv4-mapped IPv6 address from IPv4 address" into main am: cb62c1b120
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2795709

Change-Id: I6b3775b97c2029e986ac9d7bc3476486660ea870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2023-10-31 12:25:26 +00:00
1f9352402f
Merge "Handle v4-mapped v6 address in Struct parsing" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-10-31 12:02:47 +00:00
d232211291
Merge "Add util method to generate IPv4-mapped IPv6 address from IPv4 address" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-10-31 12:02:08 +00:00
cb62c1b120
Merge "Increase HandlerUtilsTest timeout to 500ms" into main am: f3bef6846a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2777447

Change-Id: I479983a10ecce9fc46451a9f4be8eff37f82cd96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yuyang Huang   authored and   Automerger Merge Worker   commited 2023-10-31 09:12:59 +00:00
6317afeb93
Merge "Increase HandlerUtilsTest timeout to 500ms" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2023-10-31 08:39:35 +00:00
f3bef6846a
Handle v4-mapped v6 address in Struct parsing
testV4MappedV6Address fails without change in Struct.java

Bug: 295800201
Test: atest ConnectivityCoverageTests
Change-Id: I4a40bc47b051860c6420f211491e2ecd34c1d732

Motomu Utsumi   commited 2023-10-31 17:01:48 +09:00
e3e34bdf3a
Add util method to generate IPv4-mapped IPv6 address from IPv4 address
Bug: 295800201
Test: NetworkStaticLibTests
Change-Id: Ia10e7dd14edfabe0edf5c9e12ceae54a1ff88d13

Motomu Utsumi   commited 2023-10-31 17:01:43 +09:00
52366e0fb1
Merge "Cleanup modifyRoutes" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-10-27 13:11:29 +00:00
9fea45db05
Cleanup modifyRoutes
This is no longer used out of this file, and should not be.

Test: Build
Change-Id: I531191b4afbda39a5fbaf1f483d13068f86d17f1
Merged-In: Ief0a79883bcc2c5493807c548cb71ef655abed23

Chalard Jean   authored and   Jean Chalard   commited 2023-10-27 06:53:36 +00:00
ac5e4cf025
Merge "Add public getter for IpPrefix" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-10-26 18:21:07 +00:00
149868f1b1
Merge "move convenience methods from BpfMap to IBpfMap" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-10-25 22:54:04 +00:00
ad3badf7a8
Add public getter for IpPrefix
Test: TH
Change-Id: I8d2c8e1a6b76f04257f2137c1ce893b59e52e420

Patrick Rohr   commited 2023-10-25 15:32:06 -07:00
6f0dc0dc95
move convenience methods from BpfMap to IBpfMap
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5f4ee8bdc3aaff1f306a36126e6e812b486e312b

Maciej Żenczykowski   commited 2023-10-25 11:51:40 -07:00
74641d82c4
remove dead portions of BpfUtils.java
(mostly to improve code coverage)

We can always revert if it ever turns out this is useful,
but I'd prefer for cgroup attach to be a once-at-boot
thing and handled either from bpfloader or the netd updatable
which are both directly C++ code.

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

Maciej Żenczykowski   commited 2023-10-25 17:40:35 +00:00
de9d367ab2
Merge "Add a routing coordinator class" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-10-25 09:13:16 +00:00
4e47533688
Merge changes Idce2024f,I7e009073,I29fe506c,I37b2a0b8,Iccb4e3ec into main
* changes:
  Add toString for more consistent logging to IaPrefixOption
  Create IpPrefix in IaPrefixOption constructor
  Add @Computed annotation to Struct
  Remove check that preferred lifetime >= t2
  Remove IA prefix option option-code from public constructor

Patrick Rohr   authored and   Gerrit Code Review   commited 2023-10-25 02:14:30 +00:00
49967eab24
Add toString for more consistent logging to IaPrefixOption
toString() approximately follows the format of tcpdump logging ND
options.

Test: TH
Change-Id: Idce2024f44bba5427dc0f88128b87b367c09ccb6

Patrick Rohr   commited 2023-10-24 15:07:14 -07:00
8f77f016df
Create IpPrefix in IaPrefixOption constructor
The constructor is invoked during Struct#parse() at which point we might
as well try to create the IpPrefix object which will be used later. If
this fails for some reason (UnknownHostException or ClassCastException),
the prefix is bogus and should not be used.

Test: TH
Change-Id: I7e0090735022d017ba11aa85266ba19e65807da7

Patrick Rohr   commited 2023-10-24 15:04:19 -07:00
9f03f9e6e5
Add @Computed annotation to Struct
@Computed will ignore "computed" fields from struct parsing. Fields
cannot both be annotated by @Computed and @Field (though there
currently is no check for this).

Test: builds
Change-Id: I29fe506c5e3be4cc50fdaf3a07fc5e922111165b

Patrick Rohr   commited 2023-10-24 15:03:35 -07:00
3b2c559149
Remove check that preferred lifetime >= t2
For a single address, DHCPv6 won't work well (i.e. potentially lose provisioning) if
the preferred lifetime is lower than t2. However, this might be a valid
scenario in a renumbering event in the presence of multiple prefixes.

Additionally, in DHCPv6 it is up to the server to configure the client
correctly.

Test: TH
Change-Id: I37b2a0b89deda85b3f7be29c8f02f685aa6e65f8

Patrick Rohr   commited 2023-10-24 11:44:46 -07:00
dc6c70fd5f
Add a routing coordinator class
Test: In followup changes : RoutingCoordinatorManagerTest
Change-Id: Ia6811d614e02123a072c7638291828745abae051

Chalard Jean   commited 2023-10-24 22:12:26 +09:00
2fb66f1b28
Merge "[BR01.1] Support BpfNetMapsReader" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-10-24 05:56:33 +00:00
a62eed380c
Remove IA prefix option option-code from public constructor
Since it is constant. Struct.parse() still requires a constructor that
includes the code field, so it is marked protected.

Test: TH
Change-Id: Iccb4e3ec4078e0dcc73836f0d1b721146153da50

Patrick Rohr   commited 2023-10-23 14:28:19 -07:00
b8af9d5c19
[BR01.1] Support BpfNetMapsReader
A helper class to *read* java BpfMaps. This is designed to
provide direct bpf access in the caller process through
ConnectivityManager APIs.

The change also removes any statical link to
net-utils-device-common-struct from service-connectivity.
This is because net-utils-device-common-struct is already
included in framework-connectivity. Including it again in
service-connectivity would create a r8 build fail by circular
dependency.

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
Bug: 297836825
Change-Id: I7a6d2eb816d0dc7343167bddd672806b199f44fe

Junyu Lai   commited 2023-10-23 20:11:02 +08:00
626045a601
Fix arg order to set-package-network-enabled in the CTS preparer
Test: manual
Change-Id: Ife55ed9dc152cd2c21e56b84201b9c34dbb04d46

Chalard Jean   commited 2023-10-23 17:26:53 +09:00
a27dca2fdc
Merge "Reapply "Simplify addRoutesToLocalNetwork calls"" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-10-21 16:25:58 +00:00
dab9125464
Merge "Add method to check if IA prefix option takes 0 lifetimes." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2023-10-20 05:37:26 +00:00
26af70f5fe
Dump bpf program status in dumpsys
Sample output:
Bpf Program Status:
  CGROUP_INET_INGRESS: 21
  CGROUP_INET_EGRESS: 22
  CGROUP_INET_SOCK_CREATE: 28
  CGROUP_INET4_BIND: 30
  CGROUP_INET6_BIND: 31

Test: adb shell dumpsys connectivity
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest#testDumpDoesNotCrash
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest#testDumpDoesNotCrash
Bug: 292156770
Change-Id: I312c90c524af12d093536156d6d5c6febd64305a

Junyu Lai   commited 2023-10-18 16:05:55 +08:00
155760b57b
Reapply "Simplify addRoutesToLocalNetwork calls"
This reverts commit 316346be6e.

Change-Id: I86977f6e7a5451d037c7ea6fee5c4bc7082935ff

Chalard Jean   commited 2023-10-18 15:50:02 +09:00
7f2b3dabcd
Revert "Simplify addRoutesToLocalNetwork calls"
Revert submission 2777667

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/305187495

Reverted changes: /q/submissionid:2777667

Bug: 305187495

Change-Id: I516d40b20d775e9c61b2f825bc094329d016d0c3

Anton Kulakov   commited 2023-10-13 15:15:50 +00:00
316346be6e
Simplify addRoutesToLocalNetwork calls
There are only three calls to this method, and two of them
are with a list of 1 address which means it's simpler inlined.

The last call will be replaced with calls to RouteController
in a followup, meaning we addRoutesToLocalNetwork can be removed.

Test: RouterAdvertisementDaemonTest
      NetdUtilsTest
Change-Id: I3b6ee1db40f09954b336321000735a66306bf000

Chalard Jean   commited 2023-10-13 16:19:25 +09:00
cf70df3e9b
Add method to check if IA prefix option takes 0 lifetimes.
Bug: 260934173
Test: TH
Change-Id: If49a888198a52bf0cfefc125e0aa9636c1692279

Xiao Ma   commited 2023-10-12 23:36:59 +09:00
cc9b86c647
Add hidden constants for communicating about local network agents
Test: FrameworksNetTests
Change-Id: Ic490fee6ee70d74acff0a290199b2946817173d0

Chalard Jean   commited 2023-10-12 13:30:49 +09:00
d6f4efb1a8
Merge "Move the delegated prefix validity check to IaPrefixOption class." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2023-10-10 03:27:35 +00:00
a1eb2e453f
Move the delegated prefix validity check to IaPrefixOption class.
Bug: 260934173
Test: TH
Change-Id: Idc6e32f8dbaf3b0e3c57eff496a006fafee02b5e

Xiao Ma   commited 2023-10-08 14:33:25 +09:00
fac8a33763
type safety for kernel version
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If05c0c5383dceeb65964143f5574d2ee1a484907

Maciej Żenczykowski   commited 2023-10-06 15:54:38 -07:00
3a64568abb
type safety for bool ignore_on_{eng,user,userdebug}
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia85e16d1a7f8d1b21e4ce4c306db6bbea06138e0

Maciej Żenczykowski   commited 2023-10-06 14:57:12 -07:00
6dec6e9374
type safety for bool optional
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6f10395ca6f1c73f3513031f561fdf1b1dedf451

Maciej Żenczykowski   commited 2023-10-06 14:48:43 -07:00
f2466ef4bb
type safety for bool shared
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4883eab734f47522fec718f0709475f7e6dd0a53

Maciej Żenczykowski   commited 2023-10-06 14:46:11 -07:00
a262bd3d1e
move PRIVATE/SHARED/MANDATORY/OPTIONAL/{LOAD,IGNORE}_ON_* into core headers
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7053ab46e73b763f64f36baf5e7ab64b62421045

Maciej Żenczykowski   commited 2023-10-06 14:25:41 -07:00
10da6d4e61
BpfClassic.h - add missing commas
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ife32fa36808de13c5f37ace497395dcc381ca336

Maciej Żenczykowski   commited 2023-10-06 13:50:13 -07:00
1e32277fff
Increase HandlerUtilsTest timeout to 500ms
The test is currently 1~3% flaky with a 200ms timeout, in particular it
may fail if a GC runs while waitForIdle is running.

Increase the timeout to 1s, which should be enough to cover such cases.

Change-Id: Ic6d4ff18fb81feb09639442196cdef3c5cfdf30c
Fixes: 302949876
Test: TH

Remi NGUYEN VAN   commited 2023-10-06 08:20:53 +00:00
eaa71ff305
more classic bpf macros
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5c7fd55301cd5aa44502f8481923c86bc49ea914

Maciej Żenczykowski   commited 2023-10-04 22:41:21 +00:00
d5bf2061f3
TcUtils jni: jobject clazz -> jclass clazz
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0a06d2627ef06fe4606b3d1a6525af767d218945

Maciej Żenczykowski   commited 2023-10-04 19:15:53 +00:00
f24beefe55
BpfUtils jni: jobject clazz -> jclass clazz
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3fd51ad129873782b74c7c47b50e16f1f1f0fa6e

Maciej Żenczykowski   commited 2023-10-04 19:15:44 +00:00
b0f8d31e7d
bpf jni: add native_getProgramIdFromCgroup
Test: TreeHugger
Bug: 292156770
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib7b194b9cbf6519f9fbcfd1fcefcbe5d825f5c3a

Maciej Żenczykowski   commited 2023-10-04 19:14:43 +00:00
85ac050b35
BpfSyscallWrappers: add queryProgram()
Test: TreeHugger
Bug: 292156770
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f77220a6c4b13efb5630d7a5ade1db39c59901e

Maciej Żenczykowski   commited 2023-10-04 19:12:25 +00:00
340e2ff355
Merge "Remove lint-baseline in staticlibs" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-10-04 06:45:02 +00:00
30ef5308d6
Merge "Remove defaultEnabled arg from isNetworkStackFeatureEnabled" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-10-03 11:51:32 +00:00
a675e966b2