Note:
2 == BPFLOADER_S_VERSION
19 == BPFLOADER_T_VERSION
25 == BPFLOADER_OBJ_AT_VER_VERSION
33 == BPFLOADER_IGNORED_ON_VERSION
37 == BPFLOADER_U_VERSION [*]
41 == BPFLOADER_V_VERSION [**]
and currently we have:
42 == BPFLOADER_MAINLINE_VERSION
43 == BPFLOADER_MAINLINE_T_VERSION
44 == BPFLOADER_MAINLINE_U_VERSION
45 == BPFLOADER_MAINLINE_V_VERSION
[*] udc-dev/udc-release are actually 38, as 37 was some earlier
udc beta2 (2.1 ifirc), and beta3+ switched to 38
[**] 24Q{1,2}-release (ie. U QPR2+) are technically actually 41,
but their platform bpfloader no longer even looks in /apex/com.android.tethering/etc/bpf/...
so it doesn't really matter (although 24Q1's platform
netbpfload still does, however that is obsoleted by
this change)
Thus we need to (as minimum for NetBpfLoad):
BPFLOADER_T_VERSION -> BPFLOADER_MAINLINE_T_VERSION
BPFLOADER_IGNORED_ON_VERSION -> BPFLOADER_MAINLINE_U_VERSION
to cause these to load appropriately from mainline.
One would perhaps also expect (as minimum for NetBpfLoad):
BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION
but (as maximum for platform bpfloader):
BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION
However, since the goal is actually for those to load via mainline on T+,
(with the 'old' version of the .o's loading on S via platform bpfloader)
thus one actually needs (as minimum for NetBpfLoad):
BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_T_VERSION
and (as maximum for platform bpfloader):
BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_T_VERSION
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4b688692ffca0db7ead20cefd9e7e892ca92c70a
Maciej Żenczykowskicommited 2024-03-19 21:33:55 +00:00
PrefixInformationOption#build always gives the correct option length and
type, visible constructor is easiler to verify the incorrect parameters
in the test, for example, we will verify the code that parses the PIO
option in RA as a ND user option in netlink message.
Bug: 315069348
Test: TH
Change-Id: I6b88e6718cb873b15936c1f518d357c36c41ffde
Similarly to NetworkMonitorTest, terminate NetworkMonitor threads and
ExecutorServices after each test case in integration tests.
This should fix flakes where the HTTP probe from testValidation could
finish after mock probe responses are cleared in tearDown.
The utils used in NetworkMonitorTest are factored out to ConcurrentUtils
to achieve that.
Fixes: 292481238
Test: atest --rerun-until-failure 50
Change-Id: I5cdeee8d4f06ea40e338dd2cb1fdcc2fe0907a7d
This commit removes the unused library visibility.
The "frameworks/base/packages/Connectivity" folder is the
temporary folder for modulizing the connectivity codes. There is
no such need now.
Test: m
Change-Id: Ia2890fe64c1bc369fcb90be645263bc56c98a7b2
To use the java struct definitions for multicast routing in connectivity
service, a new lib is defined and included in
service-connectivity-pre-jarjar.
Bug: 323503345
Test: presubmit
Change-Id: I664602fd0fa0a5da136ea28fd3c4d9068c5b46ab
Refactor the test case to support listen custom DNS/HTTP port.
Avoid binding system restricted port (<1024).
Bug: 322113686
Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest
Change-Id: I5d3b966cdadc9321ca2ee0d04a5b8f71ee79bd8a
* changes:
Make RtNetlinkRouteMessage constructor visible for testing.
Make StructRtMsg constructor visible for testing.
Make NduseroptMessage constructor visible for testing.
Xiao Maauthored and Gerrit Code Reviewcommited 2024-02-08 08:20:49 +00:00
This reverts commit b0f489021b.
Reason for revert: Currently reading trunk stable flag from mainline module is not supported. So reverting the CL to avoid confusion.
Change-Id: I0db04f28f378399aa299b325312a6af7f45d4f67
Motomu Utsumiauthored and Gerrit Code Reviewcommited 2024-02-08 03:06:34 +00:00
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
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
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
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
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
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
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
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
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