mirror of
https://github.com/transmission/transmission
synced 2025-02-02 12:32:54 +00:00
(trunk libT) don't attempt to set V6ONLY on ipv4 sockets
This commit is contained in:
parent
769af9c213
commit
61e505b8d1
1 changed files with 3 additions and 2 deletions
|
@ -543,8 +543,9 @@ tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs )
|
|||
#endif
|
||||
|
||||
#ifdef IPV6_V6ONLY
|
||||
if( retval = setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval,
|
||||
sizeof( optval ) ) == -1 ) {
|
||||
if( addr->type == TR_AF_INET6 &&
|
||||
( retval = setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval,
|
||||
sizeof( optval ) ) ) == -1 ) {
|
||||
/* the kernel may not support this. if not, ignore it */
|
||||
if( errno != ENOPROTOOPT )
|
||||
return -errno;
|
||||
|
|
Loading…
Reference in a new issue