Problems with transmission-daemon with IPv6 and some other popular issues
Remove IPv6 detection
Current port version inside net-p2p/transmission-components
must be extracted with command FLAVOR=daemon make extract
then edit file work-daemon/transmission-4.0.5/libtransmission/net.cc
searching for ipv6
. Then just reinstall with FLAVOR=daemon make deinstall install clean
The problem with net-p2p/transmission-daemon and IPv6 is that transmission developers are … not willing to implement such functionality as visible from: https://trac.transmissionbt.com/ticket/4197
So the user who need to use IPv6 but NOT use IPv6 with transmission are left alone.
So you can use this quick patch:
cd /usr/ports/net-p2p/transmission-daemon ;
make extract ;
vi work/transmission-2.94/libtransmission/net.c
@@ -598,7 +598,7 @@
{
int addrlen = 16;
const int rc = tr_globalAddress( AF_INET6,
ipv6, &addrlen );
- have_ipv6 = ( rc >= 0 ) && ( addrlen == 16 );
+ have_ipv6 = 0; /** NO, we do not have IPv6 **/
last_time = now;
}
cd ../../../ ; make deinstall install package clean ;
service transmission restart
Enjoy your non-ipv6 enabled daemon on ipv6/ipv4 dual-stack system!
If you see the error messages like "UDP failed to set receive buffer: No buffer space available "
in you syslog then you must increase sysctl kern.ipc.maxsockbuf with variable greater then 5242880. To do this permanently you must put into /etc/sysctl.conf following:
kern.ipc.maxsockbuf=5242880
Message "IPv4 DHT announce failed" flooding syslog
vi work/transmission-2.94/third-party/dht/dht.c
@@ -1239,6 +1346,8 @@
sr = sr->next;
}
+ int sr_duplicate = sr && !sr->done;
+
if(sr) { /* We're reusing data from an old search. Reusing the same tid
means that we can merge replies for both searches. */
@@ -1288,7 +1397,11 @@
search_step(sr, callback, closure);
search_time = now.tv_sec;
- return 1;
+ if(sr_duplicate) {
+ return 0;
+ } else {
+ return 1;
+ } }