Ignore:
Timestamp:
Aug 2, 2016 8:35:28 AM (8 years ago)
Author:
ming
Message:

Re #1945 (misc): Set IPv6 sockets to be IPv6 only

Auto-detect in configure script if this option is supported, and if yes, Set IPv6 sockets to be IPv6 only.

Thanks to Alexander Traud for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/sock_bsd.c

    r4860 r5403  
    540540                               &val, sizeof(val)); 
    541541        } 
     542#if defined(PJ_SOCK_HAS_IPV6_V6ONLY) && PJ_SOCK_HAS_IPV6_V6ONLY != 0 
     543        if (af == PJ_AF_INET6) { 
     544            pj_sock_setsockopt(*sock, PJ_SOL_IPV6, IPV6_V6ONLY, 
     545                               &val, sizeof(val)); 
     546        } 
     547#endif 
    542548#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ 
    543549    PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 
Note: See TracChangeset for help on using the changeset viewer.