Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#4886 closed Bug (fixed)

IPv6-only DHT.dat not being written

Reported by: Harry Owned by: jordan
Priority: Normal Milestone: 2.74
Component: libtransmission Version: 2.51
Severity: Normal Keywords:
Cc:

Description

Hi, I have my transmission configured to only use IPv6 via:

"bind-address-ipv4": "127.0.0.1", "bind-address-ipv6": "2001:0db8::1",

My DHT is enabled and appears to be working:

[01:39:15.841] AssaultCube? Starting IPv6 DHT announce (good, 93 nodes) (tr-dht.c:574)

However, dht.dat is never written to config folder. I am unsure what exactly that dht.dat file does. I believe it helps with bootstrapping? Anyways, if I have 0 IPv4 DHT nodes but a healthy amount of IPv6 nodes, the file is never written. If I enable IPv4 in transmission's config file, the file is written properly on next startup once it straps enough IPv4 peers.

I also do not frequently get peers discovered via DHT for my torrents if I only have IPv6 enabled, though I assume that is probably due to some misconfigured clients not announcing to the IPv6 DHT networks, and not due to the dht.dat problem.

Change History (8)

comment:1 Changed 9 years ago by jch

Yep. The bug's at line 350 in tr-dht.c.

--jch

comment:2 follow-up: Changed 9 years ago by x190

if(tr_dhtStatus(ss, AF_INET, NULL) < TR_DHT_FIREWALLED && tr_dhtStatus(ss, AF_INET6, NULL) < TR_DHT_FIREWALLED)

tr_ninf( "DHT", "Not saving nodes, DHT not ready" );

else {

Still might overwrite one or the other, perhaps unintentionally.

Last edited 9 years ago by x190 (previous) (diff)

comment:3 Changed 9 years ago by jordan

  • Milestone changed from None Set to 2.80
  • Status changed from new to assigned

comment:4 Changed 9 years ago by jordan

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

r13614 | jordan | 2012-11-10 22:26:56 -0600 (Sat, 10 Nov 2012) | 1 line

(trunk libT) #5131: replace JSON_parser with jsonsl to resolve licensing issue.

comment:5 Changed 9 years ago by x190

Actually, r13617 fixes the issue reported in this ticket. See comment:2.

comment:6 Changed 9 years ago by jordan

  • Milestone changed from 2.80 to 2.74

comment:7 in reply to: ↑ 2 ; follow-up: Changed 6 years ago by cfpp2p

Replying to x190:

if(tr_dhtStatus(ss, AF_INET, NULL) < TR_DHT_FIREWALLED && tr_dhtStatus(ss, AF_INET6, NULL) < TR_DHT_FIREWALLED)

tr_ninf( "DHT", "Not saving nodes, DHT not ready" );

else {

Still might overwrite one or the other, perhaps unintentionally.

It looks to me that with the original poster's disabling of IPv4 that the code && tr_dhtStatus(ss, AF_INET6, NULL) < TR_DHT_FIREWALLED) is the correct solution. However when both IPv4 and IPv6 are active it could be better to wait until both types of nodes are ready. But still we'd need to make sure that there is connectivity to both in this case.

The original code just made a precedence for IPv4 nodes no matter what, and that would be good enough. Which in a simplistic sense I agree with this IPv4 precedence.

I don't see how the current code benefits the majority of users.

I think the better way is to determine the connectivity status of both IPv4 and IPv6 then decide whether to wait for one, or both, of the available active types.

@x190 What do you think? Is this what you meant by "Still might overwrite one or the other, perhaps unintentionally"? Also r13617 indicates "patched by jch" but I don't read this ticket that way?? :)

comment:8 in reply to: ↑ 7 Changed 6 years ago by x190

Replying to cfpp2p:

Replying to x190:

@x190 What do you think?

I think you should ask the guys who take all the money, but contribute nothing to the project.

Note: See TracTickets for help on using tickets.