OSDN Git Service

Restore ACT_UNREACHABLE
authorRobin Lee <rgl@google.com>
Mon, 2 May 2016 07:53:34 +0000 (08:53 +0100)
committerRobin Lee <rgl@google.com>
Mon, 2 May 2016 08:34:11 +0000 (09:34 +0100)
This got lost in between
  I7d9752e86fa1a4564c622152a5be6ce2c1eda150 and
  If23df0760c6eb0ad137fc26c5124e48edf23b722.

Which broke creating the UNREACHABLE network, also breaking the dummy
network which should be created after it.

Fix: 28304838
Change-Id: I31c4ca9c3f53d6162b50e5bc46e27cfcd1b6a314

server/RouteController.cpp

index 1e17509..90bfed4 100644 (file)
@@ -736,8 +736,8 @@ WARN_UNUSED_RESULT int addDirectlyConnectedRule() {
 // behaviour. We do flush the kernel-default rules at startup, but having an explicit unreachable
 // rule will hopefully make things even clearer.
 WARN_UNUSED_RESULT int addUnreachableRule() {
-    return modifyIpRule(RTM_NEWRULE, RULE_PRIORITY_UNREACHABLE, RT_TABLE_UNSPEC, MARK_UNSET,
-                        MARK_UNSET);
+    return modifyIpRule(RTM_NEWRULE, RULE_PRIORITY_UNREACHABLE, FR_ACT_UNREACHABLE, RT_TABLE_UNSPEC,
+                        MARK_UNSET, MARK_UNSET, IIF_NONE, OIF_NONE, INVALID_UID, INVALID_UID);
 }
 
 WARN_UNUSED_RESULT int modifyLocalNetwork(unsigned netId, const char* interface, bool add) {