we want to only look up iptables once per run
This commit is contained in:
parent
26b9199378
commit
c9fc49a2de
|
@ -103,21 +103,20 @@ public class TorTransProxy implements TorServiceConstants {
|
||||||
|
|
||||||
private String findSystemIPTables ()
|
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
|
//if the user wants us to use the built-in iptables, then we have to find it
|
||||||
File fileIpt = new File("/system/xbin/iptables");
|
File fileIpt = new File("/system/xbin/iptables");
|
||||||
|
|
||||||
if (fileIpt.exists())
|
if (fileIpt.exists())
|
||||||
mSysIptables = fileIpt.getAbsolutePath();
|
mSysIptables = fileIpt.getAbsolutePath();
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
|
|
||||||
fileIpt = new File("/system/bin/iptables");
|
fileIpt = new File("/system/bin/iptables");
|
||||||
|
|
||||||
if (fileIpt.exists())
|
if (fileIpt.exists())
|
||||||
mSysIptables = fileIpt.getAbsolutePath();
|
mSysIptables = fileIpt.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return mSysIptables;
|
return mSysIptables;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue