- Feb 08, 2024
-
-
Motomu Utsumi authored
This reverts commit b0f48902. Reason for revert: Currently reading trunk stable flag from mainline module is not supported. So reverting the CL to avoid confusion. Change-Id: I0db04f28f378399aa299b325312a6af7f45d4f67
-
- Feb 02, 2024
-
-
Cole Faust authored
The android framework has android.annotation.RequiresApi, which is a copy of androidx.annotation.RequiresApi. However it was added with source retention instead of class retention like androidx's version has. This causes it to be missed if you compiled a library and then used that library to compile something else, that library's public methods won't have @RequiresApi on them when using that library's compiled jar file. To make @RequiresApi have class retention, we need to baseline the NewApi issues that it would cause. These baselines also require us to disable strict_updatability_linting in some places. Bug: 323366771 Test: m lint-check Change-Id: I0c984e3ba39e357ce102be442568f2d77a4f9034
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize a RtNetlinkRouteMessage instance to trigger IPv4/v6 route updates in the unit test. Bug: 318764217 Test: atest NetworkStackTests Change-Id: Icfcc7ade636c89a63d897f4e9246410f6387b3c9
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize a StructRtMsg instance to fill in the RtNetlinkRouteMessage constructor. Bug: 318764217 Test: atest NetworkStackTests Change-Id: I1481cb8fab29ae94d48fa342ecf2b303a9701a31
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize an NduseroptMessage instance to trigger IPv6 RDNSS option update in the unit test. Bug: 318764217 Test: atest NetworkStackTests Change-Id: Ic2e8ca0d5e71b73c0dbdc3311e72486af371c899
-
- Feb 01, 2024
-
-
Junyu Lai authored
The check*Permission methods are a bit error-prone because people can forget to check the return value and expect that they behave like the enforce* methods. This was pointed out before in some bugs. This change adds @CheckResult annotation to enforce linter warning and rename methods accordingly. Test: TH Fix: 279691948 Change-Id: Ibb0df6540fe0ed40289bb190b790130daaa2f763
-
Yang Sun authored
Test: atest NetworkStaticLibTests atest FrameworksNetTests Change-Id: I34a0a29eb7e78490701872229585e61f7a0c1dd3
-
- Jan 31, 2024
-
-
Aditya Choudhary authored
This CL is created as a best effort to migrate test targets to the new android ownership model. If you find incorrect or unnecessary attribution in this CL, please create a separate CL to fix that. For more details please refer to the link below, <add g3 doc link> Bug: 304529413 Test: N/A Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5 Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
-
- Jan 30, 2024
-
-
Yang Sun authored
Pass buffer size to netlinkSocketForProto to allow callers to specify buffer size. The buffer size is not set if 0 is passed in. Following callers of netlinkSocketForProto passes SOCKET_RECV_BUFFERSIZE to keep same behavior as before: * OffloadHardwareInterface.createConntrackSocket() * NetlinkUtils.sendOneShotKernelMessage() * IpSecXfrmController.Dependencies.newNetlinkSocket() * InetDiagMessage.getConnectionOwnerUid() Following callers pass 0 to not update the buffer size: * TunInterfaceController - it uses the socket only for writing * NetlinkUtils.createNetLinkInetDiagSocket() same behavior as before Added a SOCKET_DUMP_RECV_BUFFERSIZE of 128k to be used by socket requesting dump information from kernel: * NetlinkUtils.getAndProcessNetlinkDumpMessages() - sends dump request and expecting multiple reply messages. Bug: 320420453 Test: atest NetworkStaticLibTests atest FrameworksNetTests Change-Id: I3dcb76963cf2646eb311602b50ab4e44b8ad3e8f
-
- Jan 29, 2024
-
-
Yang Sun authored
Bug: 320420453 Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.NetlinkUtilsTest Change-Id: I166a0d5185a18274ed82f739f289969c1f989b20
-
- Jan 26, 2024
-
-
Xiao Ma authored
Usually we can call InterfaceController.setIPv4Address API to add an IPv4 address on the interface, in fact it ends up calling the native Netd API which doesn't support setting deprecation/expiration time. In user space we already have the netlink infra to send RTM_NEWADDR for IPv6 address, extend the function to support IPv4 as well, then we can deprecate the Netd API in IpClient. Bug: 129660498 Test: atest NetworkStaticLibTests Change-Id: I9fc7ba8d7035e0ed1df8c1f2baef9ec7e1806be3
-
- Jan 25, 2024
-
-
Motomu Utsumi authored
Memory leak was observed and inline mock is one of the reasons. This CL updates DevSdkIgnoreRunner to clear mock state if there is no thread leak. Test: TH Bug: 321603955 Change-Id: I50fd03f14c6703bd38b5729f577d7ea516cd5b44
-
- Jan 24, 2024
-
-
Maciej Żenczykowski authored
Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I7cef2b19f55e6e056b46bb1b28f85c7f7376f6f4
-
Maciej Żenczykowski authored
Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Id4ceeb0dc0cb8ffbd4a4bfb75359f311a00a08a7
-
- Jan 23, 2024
-
-
Tongbo Liu authored
Bug: 318958910 Change-Id: I71499f2a5244030c5c83c2102585c4c0c3da5db4
-
- Jan 22, 2024
-
-
Junyu Lai authored
This test is conducting two physical devices: a device acting as the hotspot and a separate client device. The test assesses whether the client can connect to the hotspot and utilize its internet connection. This test verifies the basic functionality of the hotspot feature by exercising the entire system without mocking any component. This is crucial because various system components, like cellular, Wi-Fi, routing rules, tethering, and hardware offload, can have regressions or design changes that impact the basic functionality. Test: m connectivity_multi_devices_snippet && \ atest CtsConnectivityMultiDevicesTestCases (2 physical devices near each other are needed to perform this test) Bug: N/A Change-Id: Ib97495c48f313889cedae03d59762482da10cfd8
-
- Jan 18, 2024
-
-
Chiachang Wang authored
This commit addresses the review feeback of aosp/2864606 to add a wtf log for unexpected cases. Bug: 320842025 Test: m Change-Id: I1581b0e754b74aac72278a0db61d9836618d50b5
-
Chiachang Wang authored
Address format check issue to remove unused import. Test: m Change-Id: Id3d6838b26ccdfd6d24a5c18ec45d2c97af22796
-
Junyu Lai authored
Some callers of openSessionInternal could have null package name. Update nullability annotations accordingly. Test: TH Bug: N/A Change-Id: Ifafafcd64612c99e5174364a010ec95415702b0d
-
Junyu Lai authored
This is no-op refactor to move utility methods from ConnectivityService to a common place. Test: atest NetworkStaticLibTests#com.android.net.moduletests.util.PermissionUtilsTest#testEnforcePackageNameMatchesUid Bug: N/A Change-Id: I5802dedcc91fa6e130a5c534bba5080ca37dbeec
-
- Jan 17, 2024
-
-
Xiao Ma authored
This can be used in the integration test to assert if an ARP packet captured on the tap interface is broadcast or unicast request. Bug: 315076572 Test: atest NetworkStaticLibTests Change-Id: I52c0b18bf3fd2b64727912e54c045a8e8405d2f6
-
- Jan 15, 2024
-
-
Remi NGUYEN VAN authored
Instead of (wrongly) looking at the DNS message flags for the Query Unicast bit, look at the flag in the question record. The previous bug means that all queries would be replied multicast instead of sometimes unicast. The fix is flagged off as this is a behavior change that may affect performance and latency. Bug: 289482497 Test: atest Change-Id: I08e30c4ffa747c9073d631e8addca1278ea40648
-
Junyu Lai authored
Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest Bug: N/A Change-Id: Icaef559d54f8d7ce06fb9bf231330235ee01ab8f
-
Junyu Lai authored
Consider below scenario: Internal address: 1.2.3.4 External address: 5.6.7.8 Remote address: 8.8.8.8 When a packet was sent from 1.2.3.4 to 8.8.8.8, the current design translate it to a packet from 8.8.8.8 to 5.6.7.8 and foward it to the external interface. However, when the response is received from the external interface, there is a need to remember what is the original address to forward to. Thus, an address translation mechanism was introduced in current design. This change simplify PacketForwarder by removing the address translation. Consider, if the 2 interfaces are using the same address. Internal address: 1.2.3.4 External address: 1.2.3.4 Remote address: 8.8.8.8 When a packet was sent from 1.2.3.4 to 8.8.8.8, simply swap source and destination and and foward it to the external interface. When there is a response from the external interface, the same process can be done, this removes the need of address translation. Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideVpnTests Bug: N/A Change-Id: I86f2e774e9112905e5255b5a28c927562a42ab84
-
- Jan 10, 2024
-
-
Junyu Lai authored
This change includes: 1. Refactor the logic in Tethering#dump into utils class. 2. Move the utils class to a common place which could be referenced from other sub-modules. 3. Add @MonitorThreadLeak annotation to enforce there is no thread leak problem. Test: atest FrameworksNetTests NetworkStaticLibTests Test: atest ConnectivityCoverageTests:com.android.networkstack.tethering.TetheringTest#testDumpTetheringLog Test: adb shell dumpsys tethering (with hardcoded exception) Fix: 312669345 Change-Id: Ia6fdfeeec2110afa0ec9e056e9db3843748845c3
-
- Jan 09, 2024
-
-
Tomasz Wasilczyk authored
Bug: 175635923 Test: m MODULES-IN-packages-modules-Connectivity Change-Id: I94dafe991ccd73450671ea68eaf65b787dc1d0fa
-
- Dec 26, 2023
-
-
Handa Wang authored
This implements a basic border routing test case (ping) and demonstrates a valid test environment for Thread Border Router test cases. Later we can add more packet verifications and more test cases. Bug: 295843010 Test: atest android.net.ThreadBorderRouterTest Change-Id: Ifb9b6d45539143a227c2bc0ed69b5c3167ef9acd
-
- Dec 25, 2023
-
-
Chiachang Wang authored
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
-
- Dec 22, 2023
-
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.InetDiagSocketTest atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest Change-Id: I71545beea8e4d9d9993f473813017f76094dc2e0
-
Yang Sun authored
This is used to configure interfaces for multicast routing. Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMif6ctlTest Change-Id: Ic26cddab2d5a9f90f63b0828c3e133d830aa0db4
-
Yang Sun authored
This is used to configure multicast routes. Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMf6cctlTest Change-Id: I57b36e6678262f48781b70ab77d49b920c7ddca2
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.structs.StructMrt6MsgTest Change-Id: I71367761662117aa6c0af3153039e50266d79259
-
- Dec 21, 2023
-
-
Spandan Das authored
This java library is available to the following 1. NetworkStack, a platform app 2. TetheringNext, an app in com.android.tethering The availability to (2) was done implicitly using a baseline map in build/soong/apex/apex.go. Make this explicit in Android.bp Bug: 281077552 Test: m nothing Change-Id: I5738ef1fc153e7ef9ccdde512e61310b0fd1ddbb
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.NetlinkUtilsTest Change-Id: I07e7aa8ce677dafb94891c8075f8822dadcfd6d1
-
- Dec 19, 2023
-
-
Tongbo Liu authored
Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests. Bug: 316436957 Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914
-
- Dec 17, 2023
-
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.RtNetlinkRouteMessageTest Change-Id: Ifdf5afc4f58ff55bd20cc60e23b17c3138754392
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.RtNetlinkRouteMessageTest Change-Id: I2f3d69a5bda81de65e4a36e0db61d98dcf082b2d
-
- Dec 16, 2023
-
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.StructNlAttrTest Change-Id: Iaaa7f63a2b550f017a8c75f84b9d69bf9e829a8c
-
Yang Sun authored
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.netlink.NetlinkUtilsTest Change-Id: I15e208dca5ed6a723585f79cf09276017bc8a885
-
- Dec 13, 2023
-
-
Ken Chen authored
All AIDL interfaces need to be a stable version in release branch. Bug: 298594687 Test: m Change-Id: Ia81eb29214f3ff76ca21c3ac098d26c4e8d9440d
-