summaryrefslogtreecommitdiff
path: root/server/TetherControllerTest.cpp
diff options
context:
space:
mode:
authorTyler Wear <twear@codeaurora.org>2017-11-06 18:34:11 -0800
committerNiranjan Pendharkar <npendhar@quicinc.com>2018-06-14 17:39:05 +0000
commit415c44b3f29964eb50152227b3642116c412927b (patch)
tree51399863a6c85946187f4663695cac05969240ae /server/TetherControllerTest.cpp
parentf7d506cc3c7e6344f121ec8b231fbd10c0e980f0 (diff)
netd: Active FTP Helper
Enable conntrack helper for active FTP connections when tethering is started. Bug:69265432 CRs-fixed:2136660 Test: as follows - Boot device - Pass - Start tethering - Pass - Start active FTP on tethered host (USB) - Pass - Download file over FTP - Pass - make -j64 netd_unit_test adb shell /data/nativetest64/netd_unit_test/netd_unit_test - Pass Change-Id: I5c812afe9602e80ea1c42d0cafba40fe6019a995
Diffstat (limited to 'server/TetherControllerTest.cpp')
-rw-r--r--server/TetherControllerTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/TetherControllerTest.cpp b/server/TetherControllerTest.cpp
index bcdb106b..6e77bfe7 100644
--- a/server/TetherControllerTest.cpp
+++ b/server/TetherControllerTest.cpp
@@ -127,6 +127,10 @@ protected:
"COMMIT\n", intIf);
std::vector<std::string> v4Cmds = {
+ "*raw",
+ StringPrintf("-A tetherctrl_raw_PREROUTING -p tcp --dport 21 -i %s -j CT --helper ftp",
+ intIf),
+ "COMMIT",
"*filter",
StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -m state --state"
" ESTABLISHED,RELATED -g tetherctrl_counters", extIf, intIf),
@@ -195,6 +199,10 @@ protected:
"COMMIT\n", intIf);
std::vector<std::string> v4Cmds = {
+ "*raw",
+ StringPrintf("-D tetherctrl_raw_PREROUTING -p tcp --dport 21 -i %s -j CT --helper ftp",
+ intIf),
+ "COMMIT",
"*filter",
StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -m state --state"
" ESTABLISHED,RELATED -g tetherctrl_counters", extIf, intIf),