Allow TCP RSTs to make it through firewall rules.
This allows us to cleanly close apps' TCP connections when we
remove their network connectivity.
Bug: 27824851
Change-Id: I69ae0e860536139d30d14d580a36c82f79dc2f82
diff --git a/server/FirewallController.h b/server/FirewallController.h
index 3af6081..0854c20 100644
--- a/server/FirewallController.h
+++ b/server/FirewallController.h
@@ -22,6 +22,8 @@
#include <utils/RWLock.h>
+#include "NetdConstants.h"
+
enum FirewallRule { DENY, ALLOW };
// WHITELIST means the firewall denies all by default, uids must be explicitly ALLOWed
@@ -82,6 +84,9 @@
protected:
friend class FirewallControllerTest;
std::string makeUidRules(const char *name, bool isWhitelist, const std::vector<int32_t>& uids);
+ static int (*execIptables)(IptablesTarget target, ...);
+ static int (*execIptablesSilently)(IptablesTarget target, ...);
+ static int (*execIptablesRestore)(IptablesTarget target, const std::string& commands);
private:
FirewallType mFirewallType;