OSDN Git Service

Flush routing rules and add an "unreachable" rule on Init().
authorSreeram Ramachandran <sreeram@google.com>
Sat, 19 Jul 2014 07:22:15 +0000 (00:22 -0700)
committerSreeram Ramachandran <sreeram@google.com>
Tue, 22 Jul 2014 18:26:01 +0000 (11:26 -0700)
commitb717e74df3571951890cf36ee8bd559501d7fdc4
tree2947c70ebf0a1dba738461475ccff87b45c8801d
parent87475a1471373b72ffc9f81f17dfd7884723fa86
Flush routing rules and add an "unreachable" rule on Init().

Without the flush, rules accumulate duplicates when netd is restarted due to a
runtime restart. Nothing functionally wrong with having duplicates; it just
makes the output of "ip rule" look as though something went wrong in the system.

Time to add the unreachable rule, to suss out issues with corner cases. With the
flush, there's no more a naked "from main" rule that we need to protect by
adding the unreachable rule. But it's a good idea to add the unreachable rule
anyway, in case somebody comes along and adds a rule below it later.

Change-Id: I975b2221868b7f5366bd7cf60937a82fb4b75913
server/RouteController.cpp