Remove the oif=iface clause when tethering.
The rule is meant to be "iif=inputIface => lookup <table_for_outputIface>", not
"iif=foo oif=bar => lookup <table_for_bar>" (the latter would never match
because packets coming in on the input interface will not have any output
interface binding).
Bug: 16242255
Change-Id: I98a2a8ab90765aee833134297b58d4f7a212036f
diff --git a/server/RouteController.cpp b/server/RouteController.cpp
index 4b908e3..64ec204 100644
--- a/server/RouteController.cpp
+++ b/server/RouteController.cpp
@@ -599,7 +599,7 @@
}
return modifyIpRule(action, RULE_PRIORITY_TETHERING, table, MARK_UNSET, MARK_UNSET,
- inputInterface, outputInterface, INVALID_UID, INVALID_UID);
+ inputInterface, OIF_NONE, INVALID_UID, INVALID_UID);
}
WARN_UNUSED_RESULT int modifyLocalNetwork(unsigned netId, const char* interface, bool add) {