mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk libT) #2573: Don't send BT_PORT messages over IPv6
This commit is contained in:
parent
c086da3656
commit
cf66227f0d
1 changed files with 8 additions and 2 deletions
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue