Add back hook for inserting OEM specific iptables rules.
The functionality was lost during merge in ICS branch.
This patch is adding back OEM iptables hook in netd.
Bug:5862460
Change-Id: I9444b8c53e8b84fea2002c2c1d9ba42e45ae5f0c
diff --git a/BandwidthController.cpp b/BandwidthController.cpp
index be3cb28..4c15394 100644
--- a/BandwidthController.cpp
+++ b/BandwidthController.cpp
@@ -45,6 +45,7 @@
extern "C" int system_nosh(const char *command);
#include "BandwidthController.h"
+#include "oem_iptables_hook.h"
/* Alphabetical */
const char BandwidthController::ALERT_IPT_TEMPLATE[] = "%s %s %s -m quota2 ! --quota %lld --name %s";
@@ -231,6 +232,8 @@
res = runCommands(sizeof(IPT_BASIC_ACCOUNTING_COMMANDS) / sizeof(char*),
IPT_BASIC_ACCOUNTING_COMMANDS, RunCmdFailureBad);
+ setupOemIptablesHook();
+
return res;
}
@@ -239,6 +242,7 @@
/* The IPT_CLEANUP_COMMANDS are allowed to fail. */
runCommands(sizeof(IPT_CLEANUP_COMMANDS) / sizeof(char*),
IPT_CLEANUP_COMMANDS, RunCmdFailureOk);
+ setupOemIptablesHook();
return 0;
}