Page 1 of 1

[bug] transmission 2.0.4 cannot connect to ipv6 tracker

Posted: Sun Aug 15, 2010 5:37 am
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 );
 

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

Posted: Sun Aug 15, 2010 7:02 am
by lazybones
The transmission trac page https://trac.transmissionbt.com/report is a better place for this kind of thing.

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

Posted: Thu Aug 19, 2010 4:57 am
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!

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

Posted: Wed Aug 25, 2010 6:31 pm
by jch

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

Posted: Sat Oct 09, 2010 10:23 am
by Howmuch
same problem
same solution

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

Posted: Sat Oct 23, 2010 5:19 pm
by Howmuch
same problem still in 2.11