- 16 May, 2016 2 commits
-
-
Lorenzo Colitti authored
This has two benefits: 1. It makes the behaviour of setting firewall chains via the firewallReplaceUidChain RPC match the behaviour of creating the chains on boot. (As a side effect, it reduces code duplication between the two.) 2. It makes creating firewall chains on boot use iptables-restore, which is substantially faster than running iptables commands one at a time. This CL will allow the framework to switch to using firewallReplaceUidChain when the framework starts, providing substantial speedups over the current behaviour of running two iptables commands for every app that is whitelisted or idle. Bug: 26675191 Change-Id: Ifbd15bf9143efd526570dde8f88effc79d164630
-
Lorenzo Colitti authored
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
-
- 26 Apr, 2016 1 commit
-
-
Lorenzo Colitti authored
This allows us to cleanly close apps' TCP connections when we remove their network connectivity. Bug: 27824851 Change-Id: I69ae0e860536139d30d14d580a36c82f79dc2f82
-
- 14 Mar, 2016 1 commit
-
-
Felipe Leme authored
BUG: 27506285 BUG: 26685616 Change-Id: I8352ebbab1778c85e0a1da79a0acede5aea144a1
-
- 02 Mar, 2016 1 commit
-
-
Lorenzo Colitti authored
Also add a binder_test that exercises binder RPCs to the real netd service running on the device Bug: 21725996 Bug: 27239233 Change-Id: Ic83d81605021a0578d6cd32f889290be61d76125
-
- 11 Feb, 2016 1 commit
-
-
Felipe Leme authored
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
-
- 02 Sep, 2015 1 commit
-
-
Lorenzo Colitti authored
Working IPv6 connectivity relies on the kernel being able to receive certain ICMPv6 packets (router advertisements, neighbour solicitations, neighbour advertisements) at all times. Allow these packets when in doze mode. This is not necessary for IPv4 because in IPv4 these functions use ARP, which is invisible to iptables. Bug: 23158230 Change-Id: I29ed77561db9688486cf58cd14ac3bce7fce4b40
-
- 26 Jun, 2015 1 commit
-
-
Xiaohui Chen authored
In uid firewall white list, we white list the system uid range by default to make sure system processes will always have network access. BUG:22094135 Change-Id: I8f472a98a9fd93591a2887982cec1458d7683613
-
- 15 Jun, 2015 1 commit
-
-
Xiaohui Chen authored
This is an attempt to speed up getting out of device idle. It groups uid firewall rules in these child chains so we can attach/detach a whole chain instead of individual uid rules. BUG:21446713 Change-Id: I61dc7d14110e633c5994e466481b9cac633a7a4f
-
- 29 Apr, 2015 1 commit
-
-
Amith Yamasani authored
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
-
- 20 Jun, 2014 1 commit
-
-
JP Abgrall authored
This patch introduces a method isIfaceName that checks interface names from various RPCs for validity before e.g. using them as part of iptables arguments or in filenames. All of these RPC calls can only be called from applications with at least the CONNECTIVITY_INTERNAL permission in recent Android versions, so the impact of the missing checks luckily isn't very high. Orig-Author: Jann Horn <jann@thejh.net> Change-Id: I80df8d745a3de99ad02d6649f0d10562c81f6b98 Signed-off-by:
JP Abgrall <jpa@google.com>
-
- 21 May, 2014 1 commit
-
-
Sreeram Ramachandran authored
Change-Id: Ie4b6b303225c93f2448a503d6ea9cebb552cbad5
-
- 17 Jul, 2012 1 commit
-
-
Jeff Sharkey authored
Creates a separate firewall chain that can be used to allow/deny traffic based on rules. Firewall is disabled by default. When enabled, it supports four types of rules: allowing traffic based on iface name, based on egress source IP, based on egress destination IP and port, and based on local UID. Bug: 5756357 Change-Id: I97f894dca6bddb93b3c56478c5297f79d727cdab
-