we want to only look up iptables once per run

This commit is contained in:
Nathan Freitas 2017-01-14 06:40:10 -05:00
parent 26b9199378
commit c9fc49a2de
1 changed files with 3 additions and 4 deletions

View File

@ -103,21 +103,20 @@ public class TorTransProxy implements TorServiceConstants {
private String findSystemIPTables ()
{
if (mSysIptables == null)
{
if (mSysIptables == null) {
//if the user wants us to use the built-in iptables, then we have to find it
File fileIpt = new File("/system/xbin/iptables");
if (fileIpt.exists())
mSysIptables = fileIpt.getAbsolutePath();
else
{
else {
fileIpt = new File("/system/bin/iptables");
if (fileIpt.exists())
mSysIptables = fileIpt.getAbsolutePath();
}
}
return mSysIptables;
}