OSDN Git Service

Created a firewall chain for power save mode.
authorFelipe Leme <felipeal@google.com>
Thu, 11 Feb 2016 02:12:39 +0000 (18:12 -0800)
committerFelipe Leme <felipeal@google.com>
Thu, 11 Feb 2016 02:12:39 +0000 (18:12 -0800)
commit3f62434145c43e85436b86ed9b95a550bbdf486b
tree48a1b77e86c7ece06c1db78ba8e7b4afe78c0237
parent33fe73272684d9be6c124d67662e04d16045f8ff
Created a firewall chain for power save mode.

When power-save mode was first implemented, there were no firewall rules
on netd, so the solution was to make all network interface metered and
re-use the bw_penalty_box chain.

This change removes that workaround by creating a explicit fw_powersave
chain, whose behavior is similar to fw_dozable (in fact, it reuses some
of its code); such change not only makes network restrictions on
power-save mode simpler, but it also allows to optimze how the restrict
network rules are changed.

BUG: 27127112
Change-Id: I52aee49d80386594e3a52fea9667d580d2d944a1
server/CommandListener.cpp
server/FirewallController.cpp
server/FirewallController.h