netd: VPN PPTP Helper

Enable/Disable the conntrack helper for VPN PPTP connections when
tethering is started/stoped.

Change-Id: Ie4df349579d6d69396b582bd7ab1c1ec70dd05c1
CRs-Fixed: 2239116
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
index 06eaf94..61ac8c5 100644
--- a/server/TetherController.cpp
+++ b/server/TetherController.cpp
@@ -633,6 +633,8 @@
         "*raw",
         StringPrintf("%s %s -p tcp --dport 21 -i %s -j CT --helper ftp",
                      op, LOCAL_RAW_PREROUTING, intIface),
+        StringPrintf("%s %s -p tcp --dport 1723 -i %s -j CT --helper pptp",
+                     op, LOCAL_RAW_PREROUTING, intIface),
         "COMMIT",
         "*filter",
         StringPrintf("%s %s -i %s -o %s -m state --state ESTABLISHED,RELATED -g %s",
diff --git a/server/TetherControllerTest.cpp b/server/TetherControllerTest.cpp
index 6e77bfe..9ac502e 100644
--- a/server/TetherControllerTest.cpp
+++ b/server/TetherControllerTest.cpp
@@ -130,6 +130,8 @@
             "*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"
@@ -202,6 +204,8 @@
             "*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"