> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# Problems with transmission-daemon with IPv6 and some other popular issues
- URL: https://ostreff.info/problems-with-transmission-daemon-with-ipv6-and-some-other-popular-issues/
- Published: 2021-01-27T18:55:57.000Z
- Updated: 2023-12-20T20:55:46.000Z
- Author: Jordan Ostreff
- Tags: FreeBSD, IPv6

### 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](https://trac.transmissionbt.com/ticket/4197?ref=ostreff.info)

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