Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a701afb8 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Improve iptables timeout behaviour.

1. Increase the default timeout from 1s to 5s. This is necessary
   for as long as our version of iptables sleeps for 1 second at
   a time while the iptables lock is contended.
2. When a timeout occurs, kill the process to ensure that if it
   recovers, any output is not returned to subsequent commands.

Add corresponding unit tests.

While I'm at it:

- Ensure that iptables commands that take an output string clear
  the output string before appending to it. Otherwise, callers
  that passed the same output string object to two separate
  iptables commands would think the second command returned both
  outputs. This does not affect any existing callers.
- Delete some unused code.

Bug: 35634318
Test: netd_{unit,integration}_test pass
Change-Id: Ife3dfd328ea82f2e93fb903fcf3660a13078b7b5
parent fea04a83
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment