Commit graph android_packages_modules_Co.../staticlibs
Message SHA1
Merge changes I71545bee,Ic26cddab,I57b36e66,I71367761,I07e7aa8c into main
* changes:
  Use NetlinkUtil to process dump messages in InetDiagMessage.
  Add mif6ctl struct definition.
  Add mf6cctl struct definition.
  Add Mrt6Msg struct for multicast routing support.
  Add support to dump all multicast routes in NetlinkUtils

Yang Sun   authored and   Gerrit Code Review   commited 2023-12-25 03:19:12 +00:00
907c6e377b
Merge "Add netlink attributes field into the InetDiagMessage" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-12-25 03:09:42 +00:00
504f6d6c90
Add netlink attributes field into the InetDiagMessage
Add nlAttrs parameter to store the remaining attributes data.

As a part of follow-up work from aosp/2354202, the TCP socket
parsing can be done by using existing InetDiagMessage class.
The missing piece in the InetDiagMessage class is the possible
netlink attributes fields that may be appended after an
InetDiagMessage.

Bug: 311119352
Bug: 265877161
Test: atest NetworkStaticLibTests
Change-Id: I9c34166124fd4efba2ab211bfb537ccce5e774a4

Chiachang Wang   commited 2023-12-25 01:40:13 +00:00
4fc3f4fa15
Use NetlinkUtil to process dump messages in InetDiagMessage.
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.InetDiagSocketTest
atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest

Change-Id: I71545beea8e4d9d9993f473813017f76094dc2e0

Yang Sun   commited 2023-12-22 18:56:19 +08:00
4e3bc16e48
Add mif6ctl struct definition.
This is used to configure interfaces for multicast routing.

Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMif6ctlTest
Change-Id: Ic26cddab2d5a9f90f63b0828c3e133d830aa0db4

Yang Sun   commited 2023-12-22 18:51:27 +08:00
03e3ceaab1
Add mf6cctl struct definition.
This is used to configure multicast routes.

Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMf6cctlTest
Change-Id: I57b36e6678262f48781b70ab77d49b920c7ddca2

Yang Sun   commited 2023-12-22 18:51:15 +08:00
15d4e023f7
Add Mrt6Msg struct for multicast routing support.
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMrt6MsgTest
Change-Id: I71367761662117aa6c0af3153039e50266d79259

Yang Sun   commited 2023-12-22 18:05:40 +08:00
50b4fd79fa
Add support to dump all multicast routes in NetlinkUtils
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.NetlinkUtilsTest
Change-Id: I07e7aa8ce677dafb94891c8075f8822dadcfd6d1

Yang Sun   commited 2023-12-21 10:06:33 +08:00
3ee59057b7
Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests.
Bug: 316436957

Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914

Tongbo Liu   commited 2023-12-19 11:03:50 +00:00
199357ba68
Add getRtmFamily for RtNetlinkRouteMessage
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.RtNetlinkRouteMessageTest
Change-Id: Ifdf5afc4f58ff55bd20cc60e23b17c3138754392

Yang Sun   commited 2023-12-17 17:34:39 +08:00
6000558538
Add support for multicast route in RtNetlinkRouteMessage
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.RtNetlinkRouteMessageTest
Change-Id: I2f3d69a5bda81de65e4a36e0db61d98dcf082b2d

Yang Sun   commited 2023-12-17 17:31:00 +08:00
08622b8ecb
Add support for long values in StructNlAttr
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.StructNlAttrTest
Change-Id: Iaaa7f63a2b550f017a8c75f84b9d69bf9e829a8c

Yang Sun   commited 2023-12-16 21:58:15 +08:00
d4195824ab
Add support for processing netlink dump messages
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.NetlinkUtilsTest
Change-Id: I15e208dca5ed6a723585f79cf09276017bc8a885

Yang Sun   commited 2023-12-16 21:58:07 +08:00
0b2d75c09a
Merge changes I395560fb,If6abc33c into main
* changes:
  Add support for NLM_F_DUMP request in StructNLMsgHdr
  Mark NetworkStaticLibTestsLib as test for lint

Yang Sun   authored and   Gerrit Code Review   commited 2023-12-12 12:46:55 +00:00
336f3c1084
[XFRM_MSG_NEWSA] Support polling SA state with netlink message
Bug: 308011229
Test: IpSecXfrmControllerTest
Change-Id: Id765cd8d8d7e330969877cb0890bd828417fb6b8

Yan Yan   commited 2023-12-11 18:43:34 +00:00
4df361975d
Add support for NLM_F_DUMP request in StructNLMsgHdr
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.StructNlMsgHdrTest
Change-Id: I395560fb1edfb1c806b2ed4c74a7a3081c7b2515

Yang Sun   commited 2023-12-09 20:03:43 +08:00
9ea3be13fc
Merge "[XFRM_MSG_NEWSA] Support xfrm_replay_state_esn and XFRM_MSG_NEWSA" into main
Yan Yan   authored and   Gerrit Code Review   commited 2023-12-07 22:55:48 +00:00
b94bd28e33
Merge "Add a new PIO flag: DHCPv6-PD preferred flag." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2023-12-06 12:48:33 +00:00
f75eacd3f5
Mark NetworkStaticLibTestsLib as test for lint
This can avoid VisibleForTesting warnings in tests.

Test: atest NetworkStaticLibTests
Change-Id: If6abc33cf266246aeac22ff4b53cfba386c8979f

Yang Sun   commited 2023-12-06 19:57:29 +08:00
d5c0276b34
Add a new PIO flag: DHCPv6-PD preferred flag.
The new P flag is defined in
https://datatracker.ietf.org/doc/draft-ietf-6man-pio-pflag/.

Bug: 315069348
Test: TH
Change-Id: Ie386cc8b9fbe136333b46c73da785e02983a582b

Xiao Ma   commited 2023-12-06 13:41:07 +09:00
594e34f09a
Merge "[XFRM_MSG_NEWSA] Support xfrm_stats and xfrm_usersa_info" into main
Yan Yan   authored and   Gerrit Code Review   commited 2023-12-05 20:26:33 +00:00
4e6bd8f7d4
[XFRM_MSG_NEWSA] Support xfrm_replay_state_esn and XFRM_MSG_NEWSA
Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: I4c21a64c634b1814d52ce81a48abe2550876b755

Yan Yan   commited 2023-12-05 10:49:16 -08:00
0a892e6ec2
[XFRM_MSG_NEWSA] Support xfrm_stats and xfrm_usersa_info
Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: I8641cf36a790d7b15fbe41b4da328c1d91fcec1e

Yan Yan   commited 2023-12-05 10:36:09 -08:00
c9a194c44b
Merge "Return error Status from BpfHandler::initPrograms()" into main
Ken Chen   authored and   Gerrit Code Review   commited 2023-12-04 09:52:18 +00:00
ed353e90e2
Return error Status from BpfHandler::initPrograms()
Instead of logging and aborting from the BpfHandler::initPrograms(),
return a Status object with an error message. The caller
NetdUpdatable::libnetd_updatable_init() will log the message. Netd
main() will exit and restart.

Bug: 312094533
Test: m
Change-Id: I6717da871a9a53357ac895709ea0094c089e7bbd

Ken Chen   commited 2023-12-03 23:45:47 +08:00
d6ea75ac97
Merge "Update registerOffloadEngine() permission check" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2023-11-30 05:57:02 +00:00
4c969a65ae
Update registerOffloadEngine() permission check
Update registerOffloadEngine() permission check to check the
DEVICE_POWER permission in U. This change is required to allow the
android TV device to access the API in U because the
REGISTER_NSD_OFFLOAD_ENGINE permission can not be backported.

Bug: 313546516
Test: TH
Change-Id: I84b80d102a34487ad54719a86eb525b319e2fd8b

Yuyang Huang   commited 2023-11-29 13:38:40 +09:00
d5896e7721
Fix StructXfrmLifetimeCurTest failure when default timezone is not GMT
Previously the calculation of the expected ADD_TIME implicitly depended
on the default timezone of the test device and thus might have
different values and cause test failures. This fix updates the test to
always use "GMT" to generate the ADD_TIME

Bug: 308011229
Test: StructXfrmLifetimeCurTest passing with default timezone being
      GMT, GMT-6, GMT-10
Change-Id: Ib88a253c1ecb09feeb298a04b847c4105651a710

Yan Yan   commited 2023-11-29 00:15:07 +00:00
17b7a74041
Merge changes Ibd38e3c0,I0e9f52aa into main
* changes:
  [XFRM_MSG_NEWSA] Support xfrm_lifetime_cfg and xfrm_lifetime_cur
  [XFRM_MSG_NEWSA] Support xfrm_selector and xfrm_id

Yan Yan   authored and   Gerrit Code Review   commited 2023-11-28 22:51:44 +00:00
7475acf7e2
Update bug component in xfrm folder OWNER file.
Change the component number to 685852 which is used for IpSec. and also
add OWNER file for xfrm unit test folder.

Test: TH
Change-Id: I2359d6d8c6b3916ce36fdbcc1f487896efb0dccb

Xiao Ma   commited 2023-11-28 11:54:41 +09:00
9224b1019a
[XFRM_MSG_NEWSA] Support xfrm_lifetime_cfg and xfrm_lifetime_cur
Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: Ibd38e3c0036c760f6397910162054cfb02e45059

Yan Yan   commited 2023-11-27 12:10:59 -08:00
7a82062499
[XFRM_MSG_NEWSA] Support xfrm_selector and xfrm_id
Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: I0e9f52aad8e9cb72b8bbac1f9ee9f8e53d939e47

Yan Yan   commited 2023-11-27 12:10:52 -08:00
97ea643797
[XFRM_MSG_GETSA] Support XFRM_MSG_GETSA message
Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: I42e423c09ffb733a809636360468c963c7864872

Yan Yan   commited 2023-11-27 12:10:46 -08:00
c5e280590a
Move the owner of xfrm netlink source code to its own directory.
Test: TH
Change-Id: I260665a0afa056e32021c5255a17ea0af59b6575

Xiao Ma   commited 2023-11-22 18:50:00 +09:00
4ba5edcb8a
Merge "[XFRM_MSG_GETSA] Fix the class names and code locations" into main
Yan Yan   authored and   Gerrit Code Review   commited 2023-11-22 01:31:01 +00:00
ecda769a25
[XFRM_MSG_GETSA] Fix the class names and code locations
- Change class names to start with Xfrm or StructXfrm for consistency
  with other messages and structs
- Create xfrm sub-folder for xfrm messages
- Add "finals" to input parameters

Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: Id6d34b4549bbc1890b3f4dd9f1638977f66e3236

Yan Yan   commited 2023-11-21 19:21:32 +00:00
f085fadfdc
Delete mdns_aidl_interface-lateststable-java
It's no longer needed because the only useful version is v1 and all
functions are deprecated in v2.

Bug: 298594687
Test: m
Change-Id: I0226b7f3d3cda6fb897e02a035e84943913a944e

Ken Chen   commited 2023-11-21 09:04:03 +00:00
a3b4febfe5
Merge "Improve message for SIM cards not supporting data" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-11-19 14:48:31 +00:00
10c33ca574
Merge "Make thread leak error message more readable" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-11-17 08:34:42 +00:00
e9a5de9fba
Make thread leak error message more readable
This change only outputs thread count differences instead of
listing all threads. Additionally, it ignores threads with 1
count, which effectively filter out threads created
by the test runner or other system components, such as
hwuiTask*, queued-work-looper, SurfaceSyncGroupTimer,
RenderThread, and Time-limited test.

Sample Output:
[1122/3060] android.net.connectivity.com.android.server.CSLocalAgentCreationTests#ThreadLeakMonitor: FAILED (1ms)

STACKTRACE:
java.lang.IllegalStateException: Unexpected thread changes: removed=[] added=[] updated=[TestAlarmManager=25,CSTestHandler=25]

Test: atest ConnectivityCoverageTests
      (with shouldThreadLeakFailTest set to true)
Bug: 310581973
Bug: 307693729
Change-Id: I085799ebbd69c29f833335684de208105302e012

Junyu Lai   commited 2023-11-17 15:05:19 +08:00
c034c7217e
Improve message for SIM cards not supporting data
The previous message is not clear about the fact that there is
a SIM card inserted. Clarify it.

Change-Id: I2391d9fa7762b6225438049199f9f178a8b24d41

Remi NGUYEN VAN   commited 2023-11-17 04:14:39 +00:00
1af3d90f24
Merge "BpfRingBuf.h - implement wait()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-11-17 00:35:26 +00:00
b0b38f6b69
[XFRM_MSG_GETSA] Support xfrm_address_t and xfrm_usersa_id
Add xfrm_address_t and xfrm_usersa_id structs

Bug: 308011229
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink
      (new tests added)
Change-Id: I552983d7e768e7fb8ba307ffc55060c8b35e7436

Yan Yan   commited 2023-11-16 21:46:43 +00:00
1c363601a1
Merge "BpfUtils.java - add requires T+ annotation" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-11-16 11:06:57 +00:00
fdcf0111c3
BpfUtils.java - add requires T+ annotation
Networking bpf (including cgroup related portions)
was mainlined in Android T.

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

Maciej Żenczykowski   commited 2023-11-16 01:57:46 +00:00
1df0aafcc3
BpfMap.java - add requires S+ annotation
Since the first mainline eBPF code (for Tethering offload)
landed in Android S.

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

Maciej Żenczykowski   commited 2023-11-16 01:45:46 +00:00
6f776f5af3
Merge "Migrate to netd_aidl_interface-V14" into main
Ken Chen   authored and   Gerrit Code Review   commited 2023-11-15 14:26:10 +00:00
9397e4ebd3
Merge "Add @deprecated annotation and bump netd_aidl_interface" into main
Ken Chen   authored and   Gerrit Code Review   commited 2023-11-15 10:54:08 +00:00
ba716f2195
Merge "Ensure no thread leak after NetworkStatsServiceTest" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-11-15 07:45:34 +00:00
c7126bb997
Ensure no thread leak after NetworkStatsServiceTest
This change includes:
 1. A mechanism in DevSdkIngoreRunnrer to dump thread counts
    before/after tests, and compare thread counts to detect leaks.
 2. Add an annotation @MonitorThreadLeak for test classes to
    annotate the classes which should monitor thread leaks.
 3. Annotated NetworkStatsServiceTest to apply the enforcement.

Sample output:
[1/2] android.net.connectivity.com.android.server.net.NetworkStatsServiceTest#testDumpStatsMap: PASSED (1.187s)
[2/2] android.net.connectivity.com.android.server.net.NetworkStatsServiceTest#ThreadLeakMonitor: FAILED (7ms)

STACKTRACE:
java.lang.IllegalStateException: Expected threads: {binder:26055_3=1, Instr: androidx.test.runner.AndroidJUnitRunner=1, main=1, InstrumentationConnectionThread=1, binder:26055_2=1, binder:26055_1=1} but got: {binder:26055_3=1, NetworkStatsObservers=1, Instr: androidx.test.runner.AndroidJUnitRunner=1, main=1, InstrumentationConnectionThread=1, binder:26055_2=1, binder:26055_1=1}

Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest \
      --rerun-until-failure 100
Bug: 308544001
Bug: 307693729
Change-Id: Ia0bccb82c5985df608b8402009b32626b6b17c5a

Junyu Lai   commited 2023-11-15 14:03:45 +08:00
17f589cf47