Make netd calls to iptables wait for xtables lock
Without this wait iptables commands can fail with various unpleasant
consequences like Log.wtf() or missing iptables rules. The most
critical calls to iptables in NetdConstants.cpp already wait for the
lock.
Bug:22802665
Change-Id: I7d542c3d4f0e005618e368da674159b90d652c8a
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp
index e5cf36c..d656fe8 100644
--- a/server/BandwidthController.cpp
+++ b/server/BandwidthController.cpp
@@ -199,7 +199,7 @@
break;
}
- fullCmd.insert(0, " ");
+ fullCmd.insert(0, " -w ");
fullCmd.insert(0, iptVer == IptIpV4 ? IPTABLES_PATH : IP6TABLES_PATH);
if (StrncpyAndCheck(buffer, fullCmd.c_str(), sizeof(buffer))) {