OSDN Git Service

Make firewallReplaceUidChain match the behaviour of createChain.
authorLorenzo Colitti <lorenzo@google.com>
Fri, 13 May 2016 02:25:54 +0000 (11:25 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Mon, 16 May 2016 11:35:37 +0000 (20:35 +0900)
commitf157caf303ab397b3d350b33c842f79902058d16
treee1d9382d1b19d5f0d40cdc501228823ff3ae3c58
parent54ecf16d8effb5feedb7138254c880bd9f7a26b3
Make firewallReplaceUidChain match the behaviour of createChain.

The behaviour of the firewallReplaceUidChain was incorrect in
several ways:

1. It was missing the "always allow TCP RST packets" rules which
   were added in http://ag/963000 .
2. It included a RETURN statement at the end of blacklist chains,
   which is superfluous since all user-defined chains implicitly
   return, and became incorrect when http://ag/963000 switched the
   behaviour of blacklist chains from inserting new rules at the
   beginning to appending them at the end.
3. It was missing the rules to allow the types of ICMPv6 packets
   that are critical in maintaining connectivity.

By itself, this change is a no-op since nothing currently calls
firewallReplaceUidRule.

Bug: 26675191
Change-Id: I985e6861812908cbe7eaf0f54ca0ad39c22bbfeb
server/FirewallController.cpp
server/FirewallController.h
server/FirewallControllerTest.cpp
tests/binder_test.cpp