Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2576 closed Enhancement (fixed)

IPv6 support for the DHT (BEP-32)

Reported by: jch Owned by: jch
Priority: High Milestone: 1.80
Component: Transmission Version: 1.76
Severity: Normal Keywords: patch ipv6
Cc:

Description

The attached implements BEP-32[1] for Transmission.

Charles, please do *not* commit this yet, I'll let you know when I'm happy with it.

--Juliusz

[1] http://www.pps.jussieu.fr/~jch/software/bittorrent/bep-dht-ipv6.html

Attachments (11)

dht-ipv6-20091113.patch (100.3 KB) - added by jch 11 years ago.
0001-Fix-incorrect-handling-of-libevent-timers-in-DHT-cod.patch (2.1 KB) - added by jch 11 years ago.
Sorry, the previous patch broke the IPv4 DHT
dht-ipv6-20091119.patch (118.9 KB) - added by jch 11 years ago.
dht-values.patch (1.1 KB) - added by jch 11 years ago.
Sorry, typo
dht-sign.patch (444 bytes) - added by jch 11 years ago.
Another typo
0001-Import-dht-0.11.patch (95.1 KB) - added by jch 11 years ago.
0002-Merge-of-dht-ipv6-20091122.patch (26.7 KB) - added by jch 11 years ago.
0003-Don-t-fallback-DHT-bootstrap-if-not-needed.patch (1.1 KB) - added by jch 11 years ago.
0004-Pass-buffer-sizes-to-dht_get_nodes.patch (843 bytes) - added by jch 11 years ago.
0001-Return-0-nodes-when-querying-a-stopped-DHT.patch (1.2 KB) - added by jch 11 years ago.
0002-Let-tr_dhtAnnounce-return-1-for-stopped-DHTs.patch (928 bytes) - added by jch 11 years ago.

Download all attachments as: .zip

Change History (27)

Changed 11 years ago by jch

Changed 11 years ago by jch

Sorry, the previous patch broke the IPv4 DHT

comment:2 Changed 11 years ago by jch

Still not ready to commit, but getting there.

Major improvements in this version; in particular, it actually works. Integrated the manual bootstrap code, and added fallback bootstrapping from dht.transmissionbt.com (thanks, titer), for both IPv4 and IPv6.

Bootstrap is slower in this version. It's okay with me, but if people complain, I can restore the earlier bootstrap acceleration hack.

--Juliusz

Changed 11 years ago by jch

Changed 11 years ago by jch

Sorry, typo

Changed 11 years ago by jch

Another typo

comment:3 Changed 11 years ago by jch

Charles, this is ready to commit now.

In addition to the IPv6 support, this has the following features:

  • manual bootstrap;
  • fall-back bootstrap from dht.transmissionbt.com (thanks, titer);
  • more reliable limiting of the amount of peers we track;
  • produce error messages according to BEP-6;
  • parse error messages;
  • minor tweaks and bug fixes.

--Juliusz

comment:4 Changed 11 years ago by jch

  • Milestone changed from None Set to 1.80

Changed 11 years ago by jch

Changed 11 years ago by jch

comment:5 Changed 11 years ago by jch

  • Keywords patch ipv6 added

comment:6 Changed 11 years ago by jch

Charles, I've just amended 0003. The previous instance had a minor memory leak.

Please make sure you get the updated version.

--Juliusz

comment:7 Changed 11 years ago by jch

The following fixes a heisenbug that sometimes prevents saving our routing table at shutdown.

comment:8 Changed 11 years ago by charles

  • Owner set to charles
  • Status changed from new to assigned

Added patches 0001-0004 to trunk for 1.80 by r9549

comment:9 Changed 11 years ago by charles

  • Owner changed from charles to jch
  • Status changed from assigned to new

comment:10 Changed 11 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

comment:11 Changed 11 years ago by KyleK

  • Resolution fixed deleted
  • Status changed from closed to reopened

Since r9549 my logfile gets filled with messages like this:

<torrent-name> IPv6 DHT not ready (stopped, -1098908704 nodes) (tr-dht.c:653)

The message shows up ever 5-10 seconds.

The NAS device doesn't support IPv6, which is probably the source of this message. Can anything be done about it?

comment:13 Changed 11 years ago by jch

Short version: don't worry. It's just the error message that's incorrect, everything is still working fine.

Long version: I'll submit a patch to fix that.

--Juliusz

comment:14 Changed 11 years ago by jch

Two patches. The first fixes the message, the second prevents the message from appearing.

--Juliusz

comment:15 Changed 11 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

charles * r9632 libtransmission/tr-dht.c: (trunk libT) #2576 "IPv6 support for DHT (BEP #32)" -- silence message "IPv6 DHT not ready." Reported by KyleK; fixed by jch

comment:16 Changed 11 years ago by charles

09:46 < CIA-22> charles * r9757 libtransmission/tr-dht.c: (trunk libT) fix minor memory leak in libtransmission/tr-dht.c, found by valgrind

Note: See TracTickets for help on using tickets.