[tor-commits] [orbot/master] fix usage of system iptables

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Mar 2 04:10:20 UTC 2017


commit 639bc3241e969fbe5a2a70b466b09f1138c064c8
Author: Unpublished <unpublished at gmx.net>
Date:   Fri Jun 24 00:49:34 2016 +0200

    fix usage of system iptables
---
 .../torproject/android/service/TorTransProxy.java  | 27 ++++++++--------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/src/org/torproject/android/service/TorTransProxy.java b/src/org/torproject/android/service/TorTransProxy.java
index f88e46b..b8b9c6a 100644
--- a/src/org/torproject/android/service/TorTransProxy.java
+++ b/src/org/torproject/android/service/TorTransProxy.java
@@ -80,28 +80,21 @@ public class TorTransProxy implements TorServiceConstants {
 	
 	private String findSystemIPTables ()
 	{
-		if (mSysIptables != null)
-		{
-			return mSysIptables;
-		}
+
+		//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
 		{
-		
-			//if the user wants us to use the built-in iptables, then we have to find it
-			File fileIpt = new File("/system/xbin/iptables");
-			
+
+			fileIpt = new File("/system/bin/iptables");
+
 			if (fileIpt.exists())
 				mSysIptables = fileIpt.getAbsolutePath();
-			else
-			{
-			
-				fileIpt = new File("/system/bin/iptables");
-				
-				if (fileIpt.exists())
-					mSysIptables = fileIpt.getAbsolutePath();
-			}
 		}
-		
+
 		return mSysIptables;
 	}
 	





More information about the tor-commits mailing list