#2903 closed Bug (fixed)
Don't send DHT port messages to peers if we didn't advertise support for DHT in the handshake
Reported by: | charles | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | 1.90 |
Component: | libtransmission | Version: | 1.83 |
Severity: | Normal | Keywords: | |
Cc: | jch@… |
Description
Reported by arvid.
I think the source of this is a literal reading of the DHT BEP which says "Peer receiving a handshake indicating the remote peer supports the DHT should send a PORT message." However I don't think it makes sense to send the PORT message if we didn't advertise DHT support in the handshake.
CC'ing jch for a third opinion.
Change History (5)
comment:1 Changed 13 years ago by charles
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 13 years ago by jch
Ack.
comment:3 Changed 13 years ago by livings124
Is that a good "Ack"?
comment:4 follow-up: ↓ 5 Changed 13 years ago by jch
Is that a good "Ack"?
I confirm the correctness of the fix in r10201, and shall promptly flagellate myself for introducing the bug in the first place.
(r10201 appears to also be doing something else, namely removing the checks for the session having enabled the DHT; I don't vouch for the correctness of that part.)
comment:5 in reply to: ↑ 4 Changed 13 years ago by charles
Replying to jch:
(r10201 appears to also be doing something else, namely removing the checks for the session having enabled the DHT; I don't vouch for the correctness of that part.)
I vouch for it. All we're doing in that code in handshake.c is recording whether or not the peer said they support DHT.
jch: if you feel this change is in error, please reopen this ticket. Thanks!