Send SIGTERM with timeout first, if fail, SIGKILL.
Bug: 212345928
Test: connect/disconnect to IPv6 only network and ping 8.8.8.8
repeat 3 times
Change-Id: I5125a3ac7e8ab6d4e8ae7fc7134b8ac8e42ce5dd
Introduce ClatCoordinatorTest for unit tests of class ClatCoordinator.
Add the tests:
- testStartStopClatd
- testGetFwmark
- testAdjustMtu
Bug: 212345928
Test: atest FrameworksNetTests
Change-Id: I6908eac05b14077b450d51e1432d340c8a247eb1
ParcelFileDescriptor rely on garbage collection to close handler.
When there is any error during starting clat or quick on/off
IPv6 only network, the file descriptor may not be able to be closed
before next clatStart is called. This may be problematic. For
example, the same v4- tun interface has not closed yet and clatStart
has been called again.
Test: connect/disconnect to IPv6 only network and ping 8.8.8.8
repeat 10 times
Change-Id: I8e1c66206dc221827a039213ecc86d5cbd777dff
provide clatd stop function which stops clatd by pid.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a follow commit.
Change-Id: Icd9c4f9038bf75113fbc5608f213145e58a061d9
launch clatd with the given cli arguments.
Bug: 212345928
Test: flash and boot
- run "atest ClatCoordinatorTest" in a follow commit.
- manual test
1. Connect to ipv6-only wifi.
2. Try IPv4 traffic.
$ ping 8.8.8.8
Change-Id: Ie57a7c7a9d3d77396e91fa9f94c02f1ad05487c1
This CL provides native methods to access BPF maps via a native library.
Bug: 202086915
Test: m; flash; boot;
Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29
Delete tagSocket(), privilegedTagSocket() and untagSocket() revelant
test cases since thay are moved out of TrafficController in
aosp/1849156.
Bug: 202086915
Test: atest traffic_controller_unit_test passed
Change-Id: I605577ee4d7076f0c8ad75888a4d32bff90f6104
Remove eBPF offload at clat stopping if possible.
Bug: 212345928
Test: build only
because need to test with clatd launched
Change-Id: I6ace77694c0e6fe68d16e80e3c8198aa41385fd2
Move native functions from ClatdController and TcUtils to libclat
for jni ClatdCoordinator.
Bug: 212345928
Test: atest libclat_test
Change-Id: Ia4b344b07537d57c3e4ff1285b0e7b17e0c63c3e
Needed because ClatdController and clatd binary are moved
into apex. libclat is used for accessing BPF map.
Bug: 212345928
Test: build
Change-Id: I1be5d4c9cc2c9865ac99f2595443e54e7334c843
Tethering module.
Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.
Bug: 202086915
Test: m; flash; boot;
Change-Id: Ifeaeb060fbf1add9f06748e7846b9e11e0345bda
Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.
Test: m
Change-Id: I6162c758446f597eb79734e00348dc8b1fe2d422
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