summaryrefslogtreecommitdiff
path: root/server/InterfaceController.cpp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-02-03 12:35:46 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-02-10 11:40:21 +0900
commitcda022e61c37cc6e6bd863c5a6525108e3789ca8 (patch)
treeefecc50392ce86f06647ef5a9ba9652471e44f9f /server/InterfaceController.cpp
parentce6748a3f656a206b4e85f48cda949bc152cf741 (diff)
Further speed up creating child chains.
Currently createChildChain creates and adds child chains by using -F -X -N and -A iptables commands. This guarantees that the child chains are emtpy. are guaranteed to be empty. Therefore, it is safe to create all the child chains with a single iptables-restore command that flushes all the child chains and appends them to the parent chain. This makes it possible to create chains quickly even if the parent chain is touched by vendor code and thus cannot be safely flushed. This substantially speeds up netd startup. Before: 02-03 12:52:47.786 492 492 I Netd : Creating child chains: 1543.5ms 02-03 12:52:48.103 492 492 I Netd : Netd started in 1929ms After: 02-03 12:51:46.831 511 511 I Netd : Creating child chains: 672.5ms 02-03 12:51:47.244 511 511 I Netd : Netd started in 1115ms Test: builds, boots Test: before/after comparison shows no expected rule changes Bug: 34873832 Change-Id: I88f4e539d727e3b542cf6f8acd61728cadda972f
Diffstat (limited to 'server/InterfaceController.cpp')
0 files changed, 0 insertions, 0 deletions