do not add 127.* IPs when sending file

This commit is contained in:
Yann Leboulanger 2009-07-31 10:57:48 +02:00
parent c740177956
commit ec71c7d7c2
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ class ConnectionBytestream:
my_ips = [self.peerhost[0]]
# all IPs from local DNS
for addr in socket.getaddrinfo(socket.gethostname(), None):
if not addr[4][0] in my_ips:
if not addr[4][0] in my_ips and not addr[4][0].startswith('127'):
my_ips.append(addr[4][0])
for ip in my_ips:
streamhost = common.xmpp.Node(tag = 'streamhost')