Changeset 9775


Ignore:
Timestamp:
Dec 15, 2009, 4:48:26 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2669 "Apply IPV6_V6ONLY to the IPv6 DHT socket" -- committed jch's patch for 1.80

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-dht.c

    r9757 r9775  
    320320
    321321    if(tr_globalIPv6()) {
     322        int one = 1;
    322323        dht6_socket = socket(PF_INET6, SOCK_DGRAM, 0);
    323324        if(dht6_socket < 0)
    324325            goto fail;
     326
     327#ifdef IPV6_V6ONLY
     328        /* Since we always open an IPv4 socket on the same port, this
     329           shouldn't matter.  But I'm superstitious. */
     330        setsockopt(dht6_socket, IPPROTO_IPV6, IPV6_V6ONLY,
     331                   &one, sizeof(one));
     332#endif
    325333
    326334        rebind_ipv6(1);
Note: See TracChangeset for help on using the changeset viewer.