diff options
| author | hiroaki.yokoyama <hiroaki.x.yokoyama@sony.com> | 2018-06-13 18:47:30 +0900 |
|---|---|---|
| committer | Yuuki Habu <yuuki.habu@sony.com> | 2018-08-27 09:56:38 +0900 |
| commit | 04f2cb50212ea9c326568b3b39d412f88d37a959 (patch) | |
| tree | c9c7eec52a207f90c28bbea559f736d4a0ec3ba5 /server/TetherControllerTest.cpp | |
| parent | 97bb14c27cd0dc18661d1a4551036e518290a3d7 (diff) | |
netd: PPTP Helper
Enable the conntrack helper for PPTP connections when tethering
is started.
Bug: 112066349
Test: as follows
- Boot device - Pass
- Start tethering - Pass
- Start PPTP on tethered host (USB) - Pass
- make -j64 netd_unit_test
adb shell /data/nativetest64/netd_unit_test/netd_unit_test
- Pass
Change-Id: I547f8b877661c137646b663429d29737678652bf
Diffstat (limited to 'server/TetherControllerTest.cpp')
| -rw-r--r-- | server/TetherControllerTest.cpp | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/server/TetherControllerTest.cpp b/server/TetherControllerTest.cpp index 6e77bfe7..7ccdc0c1 100644 --- a/server/TetherControllerTest.cpp +++ b/server/TetherControllerTest.cpp @@ -127,17 +127,22 @@ 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), - StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -m state --state INVALID -j DROP", - intIf, extIf), - StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -g tetherctrl_counters", - intIf, extIf), + "*raw", + StringPrintf( + "-A tetherctrl_raw_PREROUTING -p tcp --dport 21 -i %s -j CT --helper ftp", + intIf), + StringPrintf("-A tetherctrl_raw_PREROUTING -p tcp --dport 1723 -i %s -j CT " + "--helper pptp", + intIf), + "COMMIT", + "*filter", + StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -m state --state" + " ESTABLISHED,RELATED -g tetherctrl_counters", + extIf, intIf), + StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -m state --state INVALID -j DROP", + intIf, extIf), + StringPrintf("-A tetherctrl_FORWARD -i %s -o %s -g tetherctrl_counters", intIf, + extIf), }; std::vector<std::string> v6Cmds = { @@ -199,18 +204,23 @@ 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), - StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -m state --state INVALID -j DROP", - intIf, extIf), - StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -g tetherctrl_counters", - intIf, extIf), - "COMMIT\n", + "*raw", + StringPrintf( + "-D tetherctrl_raw_PREROUTING -p tcp --dport 21 -i %s -j CT --helper ftp", + intIf), + StringPrintf("-D tetherctrl_raw_PREROUTING -p tcp --dport 1723 -i %s -j CT " + "--helper pptp", + intIf), + "COMMIT", + "*filter", + StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -m state --state" + " ESTABLISHED,RELATED -g tetherctrl_counters", + extIf, intIf), + StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -m state --state INVALID -j DROP", + intIf, extIf), + StringPrintf("-D tetherctrl_FORWARD -i %s -o %s -g tetherctrl_counters", intIf, + extIf), + "COMMIT\n", }; return { |
