This is the corresponding test change with netd usage replacement
in NetworkManagementService.
Bug: 209935649
Test: atest NetworkManagementServiceTest
Change-Id: Id25f2d7d291eef7c8bb12a7fcf67b1619cce6da5
This is the corresponding test change with INetd#trafficSwapActiveStatsMap
usage replacement.
Bug: 209935649
Test: atest NetworkStatsFactoryTest
Change-Id: Ic5e29f6a928c4230322ed658fe8ddbd71d7ea56a
BpfNetMaps provide interfaces and native methods for
manipulating BPF maps by calling jni library of traffic controller.
DO NOT TOUCH BpfNetMaps before aosp/1945136 and aosp/1948169 get merged.
Bug: 202086915
Test: build and flash
Change-Id: Iaff8ac71100b3f76b444f3b83616556d0ee6eadf
* changes:
[CLATJ#16] Rename JNI/Dependencies function and improve JNI error handling
[CLATJ#15] ClatCoordinator: add socket filter to packet socket
[CLATJ#14] ClatCoordinator: add anycast to raw socket
[CLATJ#13] ClatCoordinator: open raw socket
[CLATJ#12] ClatCoordinator: open packet socket with a given mark
[CLATJ#11] ClatCoordinator: config tun interface and bring up
[CLATJ#10] ClatCoordinator: detect mtu
[CLATJ#9] ClatCoordinator: open tun interface
[CLATJ#8] ClatCoordinator: select IPv6 address with checksum-neutral IID
[CLATJ#7] ClatCoordinator: select IPv4 address for clatd
[CLATJ#6] libclat: move configure_packet_socket() from netd to apex
[CLATJ#5] libclat: move detect_mtu() from netd to apex
[CLATJ#4] libclat: move selectIpv4Address() and isIpv4AddressFree() from netd to apex
[CLATJ#3] libclat: move generateIpv6Address() from netd to apex
[CLATJ#2] libclat: Add libclat_test to postsubmit
[CLATJ#1] libclat: move makeChecksumNeutral() from netd to apex
This is a clean move. The content of netd.c is not changed. The object
name is still netd.o. But the module name is renamed to netd.o_mainline
to avoid name collision in sc-mainline-prod branch.
Modified Android.bp according to the file location. The sub_dir is
newly specified. The object file will be compiled to:
- apex/com.android.tethering/etc/bpf/net_shared/netd.o
The extracted programs and maps will be in:
- sys/fs/bpf/net_shared/
The netd.o will not be loaded in pre-T because the bpfloader before T
does not load objects from paths other than:
- apex/com.android.tethering/etc/bpf/
- /system/etc/bpf/
Bug: 202086915
Test: cd system/netd; atest
Test: atest TrafficStatsTest NetworkUsageStatsTest
Change-Id: I5281c851341f9258a37d8aad6da4196c06342940
Without this, proguard strips tcFilterAddDevIngressPolice (as its unused
inside the Tethering apk) and crashes the system.
Bug: 202086915
Bug: 157552970
Test: device boots
Change-Id: I3f29a2d2371ecbfad929f8812f7f15f68258b5d1
- rename JNI functions with prefix native_*
- throw exception while JNI function gets invalid address argument
- throw exception while JNI function returns invalid address
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit
Change-Id: I6745a61525c6f72a61fbde0b21b3f7abcdf2446a
Update our packet socket filter to reflect the new 464xlat IP address
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit
Change-Id: Ic50dc122731f311ad00ab8bff5472cb3bc41f5f1
Start translating packets to the new prefix.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I38729c23fce72428919b33ac531ede9593337a0a
Move the raw socket initialization from netd to mainline because
mainline module is going to launch clatd. Need to provide raw
socket for writing local 464xlat IPv6 packets.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I6d1da4f1b400eeed87771ae8197b0c58ec50804b
Move the packet socket initialization from netd to jni because
mainline module is going to launch clatd. Need to provide packet
socket for reading local 464xlat IPv6 packets.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I1cef6e099403f883d668081fb5e917863f5a3c2a
Apply mtu and selected IPv4 address to tun interface.
Then, bring up the tun interface.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I24a2a91e2b084be28820a7a63b265c5f56293334
Detect the available mtu for clat. The native mtu detect function
is moved from netd to libclat which is called by jni. The java
adjust mtu function is moved from netd native code.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: Icf5f57c7e7b947997b76152722e46acdd9d95c1a
Open the v4-... tun interface for clat. The native function
is moved from netd to jni.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I3f3c587275125ce3fc7481006947211f17dbb2d4
Select a local 464xlat IPv6 address for clatd. The IPv6 address has
checksum-neutral IID. The native function is moved from netd to
libclat. Its test is moved from netd as well.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I11520e5c086e475999847d829dd6341b14199b39
Introduce ClatCoordinator to replace netd/ClatdController.
This is a startup commit. Starting clatd needs to prepare local
464xlat ipv4 address, local 464xlat ipv6 address, tun interface,
clat read/write sockets. These will be implemented from this
and followup commits. This commit implements that prepare local
464xlat ipv4 address.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I486db8aef0181ee1aedd7cd7702f95d5a1cef812
configure_packet_socket() is moved from ClatdController. Only change
the failure return value from errno to -errno. The remaining parts
are the same.
The test is modified from ClatdControllerTest::ConfigureIpv6Address.
Simply set socket filter to an interface and check that the packet
socket is bound to the interface. We can't check the socket filter
because there is no way to fetch it from the kernel.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Ia33c21051b040829c7d2aa55ed5b7de8766c98c5
detect_mtu() is moved from ClatdController without behavior
change. The unique_fd for socket fd is replaced by primitive int
because libbase is not supported in mainline.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Ib9c1a9d4b9e1c141d88164e8489c5044fdf70685
isIpv4AddressFree() is moved from ClatdController without behavior
change.
selectIpv4Address() and its test are moved from ClatdController as well.
They have been refactored slightly for testing because function pointer
of isIpv4AddressFreeFunc is not a global variable anymore. We can't set
global function pointer to change selectIpv4Address() behavior for
testing. Instead isIpv4AddressFree is sent as an argument of function
pointer. For public caller, selectIpv4Address() has no behavior change.
For test caller, they can call an internal selectIpv4AddressInternal
(.., fn) to change isIpv4AddrFreeFn function pointer for testing.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Iab5e6fd5ebbccf10e7b3be2251b45949cf3f3464
generateIpv6Address() is moved from ClatdController without behavior
change. The unique_fd for socket fd is replaced by primitive int
because libbase is not supported in mainline.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: I42e152e6fe3ad577a0274e1d55e737318f61176d
Introduce the library libclat to implement clat functions for jni.
It is helpful for unit test.
makeChecksumNeutral() and its test are moved from ClatdController
without behavior change.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: I1c0981d98141fc1cc07b2d3a0f3cbddf38683ff3
- Add a default to framework-connectivity-tiramisu for disabling
T-only build rules.
- Separate the tiramisu hidden apis from hiddenapi txt files, so
that the framework-connectivity-tiramisu file can avoid being
referenced by the APEX when the JAR is not part of it.
Bug: 206893064
Test: m
Merged-In: I37c7385b456e4d71789aafe33cc8375adf40a681
Change-Id: I37c7385b456e4d71789aafe33cc8375adf40a681
Correct the SDK for those tests are expected running in T+
device. Check @IgnoreUpTo(S) may be incorrect after receiving
patches before T release.
Refer to temporary constant definition in DevSdkIgnoreRule until
the SDK constant being pushed into AOSP and synced with branch
used for mainline.
BUg: 215294242
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: Ide6a241f7944dd1e75bc33b21aa29471a5df94c6
Correct the NetworkStatsServiceTest
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I47dc377a5cce7d8a0029dc808ad0f46e651764b1