OSDN Git Service

Blacklist uids for network access
authorAmith Yamasani <yamasani@google.com>
Sun, 26 Apr 2015 02:08:57 +0000 (19:08 -0700)
committerAmith Yamasani <yamasani@google.com>
Wed, 29 Apr 2015 20:39:59 +0000 (13:39 -0700)
commit390e4ea8106f9e741bc80fb962aaee94d5b28cbb
treeb3a629995d71760ee9c5adbdd4f3ac0042954a26
parent52e673f59eecf3e24b3b257bec0f977da5c35325
Blacklist uids for network access

FirewallController can now be in blacklist mode (aka disabled)
or whitelist mode (aka enabled).

Some of the methods don't do anything when in blacklist mode.

Uid rules updated to allow dropping packets to uids that
shouldn't get any network access, usually for idle apps.

Added a wait option to iptables calls to make sure it doesn't
fail if there's contention. Fixes a flakiness I was seeing in
removing rules.

Bug: 20066058
Change-Id: I815bcb45aa06d04020e902df8c67bb3894e98f40
server/CommandListener.cpp
server/CommandListener.h
server/FirewallController.cpp
server/FirewallController.h
server/NetdConstants.cpp