1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(trunk libT) #2573: Don't send BT_PORT messages over IPv6

This commit is contained in:
Charles Kerr 2009-11-12 01:59:53 +00:00
parent c086da3656
commit cf66227f0d

View file

@ -2125,8 +2125,14 @@ tr_peerMsgsNew( struct tr_torrent * torrent,
if( tr_peerIoSupportsLTEP( peer->io ) )
sendLtepHandshake( m );
if(tr_peerIoSupportsDHT(peer->io))
protocolSendPort(m, tr_dhtPort(torrent->session));
if(tr_peerIoSupportsDHT(peer->io)) {
/* We don't have an IPv6 DHT yet.
* According to BEP-32, we can't send PORT over IPv6. */
const struct tr_address *addr = tr_peerIoGetAddress( peer->io, NULL );
if( addr->type == TR_AF_INET ) {
protocolSendPort( m, tr_dhtPort( torrent->session ) );
}
}
tellPeerWhatWeHave( m );