[bug] transmission 2.0.4 cannot connect to ipv6 tracker

Discussion of Transmission that doesn't fit in the other categories
Post Reply
liudongmiao
Posts: 2
Joined: Sun Aug 15, 2010 5:15 am

[bug] transmission 2.0.4 cannot connect to ipv6 tracker

Post by liudongmiao »

Now, transmission suppose that the tracker is ipv4:

Code: Select all

    if(( addr = tr_sessionGetPublicAddress( s, TR_AF_INET )))
        curl_easy_setopt( e, CURLOPT_INTERFACE, tr_ntop_non_ts( addr ) );
Then, if the tracker is ipv6, curl will fail to connect:

Code: Select all

* About to connect() to bt.neu6.edu.cn port 6969 (#0)
*   Trying 2001:da8:9000::232... * getaddrinfo(3) failed for 0.0.0.0:0
* Couldn't bind to '0.0.0.0'
* couldn't connect to host
* Expire cleared
* Closing connection #0
I think we cannot suppose that the tracker is ipv4 or ipv6, then it's better to remove it.
I have tried, and it works for me with patch in attachment:

Code: Select all

* About to connect() to bt.neu6.edu.cn port 6969 (#0)
*   Trying 2001:da8:9000::232... * Connected to bt.neu6.edu.cn (2001:da8:9000::232) port 6969 (#0)
Is this issue happened to someone?

----------ipv6.tracker.patch-----------

Code: Select all


--- transmission-2.04/libtransmission/web.c     2010-08-07 11:34:35.000000000 +0800
+++ transmission-2.04.patched/libtransmission/web.c     2010-08-15 13:29:00.000000000 +0800
@@ -139,7 +139,6 @@ getTimeoutFromURL( const char * url )
 static CURL *
 createEasy( tr_session * s, struct tr_web_task * task )
 {
-    const tr_address * addr;
     CURL * e = curl_easy_init( );
     const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL;
 
@@ -177,9 +176,6 @@ createEasy( tr_session * s, struct tr_we
     curl_easy_setopt( e, CURLOPT_WRITEDATA, task );
     curl_easy_setopt( e, CURLOPT_WRITEFUNCTION, writeFunc );
 
-    if(( addr = tr_sessionGetPublicAddress( s, TR_AF_INET )))
-        curl_easy_setopt( e, CURLOPT_INTERFACE, tr_ntop_non_ts( addr ) );
-
     if( task->range )
         curl_easy_setopt( e, CURLOPT_RANGE, task->range );
 
lazybones
Posts: 220
Joined: Sun Jan 24, 2010 12:41 am

Re: [bug] transmission 2.0.4 cannot connect to ipv6 tracker

Post by lazybones »

The transmission trac page https://trac.transmissionbt.com/report is a better place for this kind of thing.
livings124
Transmission Developer
Posts: 3141
Joined: Fri Jan 13, 2006 8:08 pm

Re: [bug] transmission 2.0.4 cannot connect to ipv6 tracker

Post by livings124 »

Thanks liudongmiao! Would you be able to open a trac ticket for this and your other enhancement so that we don't lose track of it and can have it reviewed. Thanks!
Howmuch
Posts: 2
Joined: Mon Sep 20, 2010 12:46 pm

Re: [bug] transmission 2.0.4 cannot connect to ipv6 tracker

Post by Howmuch »

same problem
same solution
Howmuch
Posts: 2
Joined: Mon Sep 20, 2010 12:46 pm

Re: [bug] transmission 2.0.4 cannot connect to ipv6 tracker

Post by Howmuch »

same problem still in 2.11
Post Reply