Author: atagar Date: 2011-04-03 04:16:00 +0000 (Sun, 03 Apr 2011) New Revision: 24541
Modified: arm/trunk/src/interface/connections/connEntry.py Log: Only flagging inbound connections as possibly being private if we're a guard or bridge.
Modified: arm/trunk/src/interface/connections/connEntry.py =================================================================== --- arm/trunk/src/interface/connections/connEntry.py 2011-04-03 04:00:48 UTC (rev 24540) +++ arm/trunk/src/interface/connections/connEntry.py 2011-04-03 04:16:00 UTC (rev 24541) @@ -361,12 +361,13 @@ myType = self.getType()
if myType == Category.INBOUND: - # if the connection doesn't belong to a known relay then it might be - # client traffic + # if we're a guard or bridge and the connection doesn't belong to a + # known relay then it might be client traffic
conn = torTools.getConn() - allMatches = conn.getRelayFingerprint(self.foreign.getIpAddr(), getAllMatches = True) - return allMatches == [] + if "Guard" in conn.getMyFlags() or conn.getOption("BridgeRelay") == "1": + allMatches = conn.getRelayFingerprint(self.foreign.getIpAddr(), getAllMatches = True) + return allMatches == [] elif myType == Category.EXIT: # DNS connections exiting us aren't private (since they're hitting our # resolvers). Everything else, however, is.