Add directly-connected routes for IPv4 as well.
A normal Android system will have directly-connected routes for on-link prefixes in the per-interface tables for both IPv4 and IPv6. The tests creates these routes for IPv6 (if they're not already created by the autoconf sysctl), but doesn't create them for IPv4. Create them for IPv4 as well. Also, move the code that creates the unreachable rule so it runs before we create any other rule. Previously, the routing setup code relied for correctness on the fact that the unreachable rule was created after routes were created. Creating the unreachable rule first ensures that the routes are correct in themselves. Change-Id: I33667b4642e8dd9299bd6dc5a404e6e71e1be163
Loading
Please sign in to comment