Updates to mark_test.
1. UID routing.
- Also test per-UID routing, if supported by the kernel.
2. Sysctl changes.
- Refactor code that sets sysctls, and robustly restore them in
tearDown.
- Check for the TCP FWMARK reflect sysctl.
- Support separate sysctls for IPv4 and IPv6 mark reflection.
- Switch to using the per-interface RA sysctl, and configure
routing manually if it's not there.
3. Test coverage.
- Test TCP FIN and FIN+ACK. This not only increases coverage
but also makes the test more robust, since retransmitted FINs
won't confuse other reflection tests.
- Test behaviour with the mark sysctls off.
4. Robustness changes.
- Run the reflect and accept tests multiple times to help
expose any flaky behaviour.
- Skip multicast packets. This makes things more robust, as
previously, code that was expecting no packets would fail
because it would receive an RS instead.
5. Readability improvements.
- Move code around to make it a bit more readable.
Change-Id: Ieb5f81a1ec077d25d49b212cecbe82c527d69002
2 files changed