Add locking to RouteController.

Test: netd_{unit,integration}_test passes
Change-Id: I12899e0304d266b25b0b021ae28f9073c8b42604
diff --git a/server/RouteController.h b/server/RouteController.h
index b01e283..de79b61 100644
--- a/server/RouteController.h
+++ b/server/RouteController.h
@@ -102,11 +102,14 @@
 private:
     friend class RouteControllerTest;
 
+    // Protects access to interfaceToTable.
+    static android::RWLock sInterfaceToTableLock;
     static std::map<std::string, uint32_t> sInterfaceToTable;
 
     static int configureDummyNetwork();
     static int flushRoutes(const char* interface);
     static int flushRoutes(uint32_t table);
+    static uint32_t getRouteTableForInterfaceLocked(const char *interface);
     static uint32_t getRouteTableForInterface(const char *interface);
     static int modifyDefaultNetwork(uint16_t action, const char* interface, Permission permission);
     static int modifyPhysicalNetwork(unsigned netId, const char* interface, Permission permission,