Problems with transmission-daemon with IPv6 and some other popular issues

FreeBSD Jan 27, 2021

Remove IPv6 detection

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;
+ } }

Tags

Jordan Ostreff

2G/3G/4G/NSA-5G/SA-5G Mobile Packet Core, Telco Clouds, Ericsson CEE, OpenStack, NFV, Orchestration, SDN, Containerisation, Networking IPv4/IPv6, Industrial Computer Networks, Mathematics, Engineering

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Share with Me via Nextcloud