[tor-commits] r24547: {arm} Swapping the external and internal src address positions for (arm/trunk/src/interface/connections)
Damian Johnson
atagar1 at gmail.com
Sun Apr 3 06:28:10 UTC 2011
Author: atagar
Date: 2011-04-03 06:28:09 +0000 (Sun, 03 Apr 2011)
New Revision: 24547
Modified:
arm/trunk/src/interface/connections/connEntry.py
Log:
Swapping the external and internal src address positions for expanded entries (it was "<foreign> --> <internal> --> <external>" which is, of course, wrong)
Modified: arm/trunk/src/interface/connections/connEntry.py
===================================================================
--- arm/trunk/src/interface/connections/connEntry.py 2011-04-03 06:15:38 UTC (rev 24546)
+++ arm/trunk/src/interface/connections/connEntry.py 2011-04-03 06:28:09 UTC (rev 24547)
@@ -597,7 +597,14 @@
if addrDiffer and isExpansionType and isExpandedAddrVisible and self.includeExpandedIpAddr and CONFIG["features.connection.showColumn.expandedIp"]:
# include the internal address in the src (extra 28 characters)
internalAddress = self.local.getIpAddr() + localPort
- src = "%-21s --> %s" % (internalAddress, src)
+
+ # If this is an inbound connection then reverse ordering so it's:
+ # <foreign> --> <external> --> <internal>
+ # when the src and dst are swapped later
+
+ if myType == Category.INBOUND: src = "%-21s --> %s" % (src, internalAddress)
+ else: src = "%-21s --> %s" % (internalAddress, src)
+
usedSpace += 28
etc = self.getEtcContent(width - usedSpace, listingType)
More information about the tor-commits
mailing list