allow to connect to network ip but not loopback. Fixes #7403

This commit is contained in:
Jefry Lagrange 2013-10-29 21:26:49 +00:00
parent 89d553414f
commit 5261137083
1 changed files with 1 additions and 3 deletions

View File

@ -116,13 +116,11 @@ class SocksQueue:
self.on_failure[sid] = on_failure
file_props = FilesProp.getFileProp(account, sid)
file_props.failure_cb = on_failure
con = gajim.connections[account]
streamhosts_to_test = []
# Remove local IPs to not connect to ourself
for streamhost in file_props.streamhosts:
if streamhost['host'] == '127.0.0.1' or \
streamhost['host'] == '::1' or \
streamhost['host'] == con.peerhost[0]:
streamhost['host'] == '::1'
continue
streamhosts_to_test.append(streamhost)
if not streamhosts_to_test: