# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: henrik@henriknordstrom.net-20100515211950-\ # 293g337key1db4lw # target_branch: http://squid-cache.org/bzr/squid3/branches/SQUID_3_1/ # testament_sha1: d927df1c844b0a33d9d1c016a3b0955937b75600 # timestamp: 2010-05-15 23:19:57 +0200 # base_revision_id: henrik@henriknordstrom.net-20100514124035-\ # ugh17zxh8s1ze14l # # Begin patch === modified file 'configure.in' --- configure.in 2010-05-05 07:42:45 +0000 +++ configure.in 2010-05-15 09:19:58 +0000 @@ -365,10 +365,6 @@ fi ]) -dnl Nasty hack to get autoconf 2.64 on Linux to run. -dnl all other uses of RUN_IFELSE are wrapped inside CACHE_CHECK which breaks on 2.64 -AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[]) - dnl This is a developer only option.. developers know how to set defines dnl dnl AC_ARG_ENABLE(xmalloc-debug, @@ -2674,7 +2670,7 @@ ;; esac AC_CACHE_CHECK([if PF_INET6 is available], squid_cv_pf_inet6, - AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* PF_INET6 available check */ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ /* PF_INET6 available check */ # include # include int main(int argc, char **argv) { @@ -2699,56 +2695,6 @@ if test "$use_ipng" != "no" && test "$squid_cv_pf_inet6" = "yes" ; then AC_DEFINE(USE_IPV6,1,[Enable support for IPv6 ]) SET_IPV6_SETTINGS="" - use_v4mapped=yes - -dnl Check for forced split-stack mode - AC_MSG_CHECKING([for IPv6 split-stack requirement]) - AC_ARG_WITH(ipv6-split-stack, - AS_HELP_STRING([--with-ipv6-split-stack],[Force-Enable experimental split-stack support for Windows XP and *BSD. Requires IPv6.]), - [ use_v4mapped="no" - AC_MSG_RESULT(yes)], - [ AC_MSG_RESULT(no) ]) - -dnl Check for IPv6 v4-mapping availability -dnl Useful for other OS with hybrid-stack defaults turned OFF -dnl But only usable if it actually works... - if test "$use_v4mapped" = "yes" ; then - AC_MSG_CHECKING([for IPv6 v4-mapping ability]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* IPPROTO_V4MAPPED is usable check */ -# include -# include -# include -#if HAVE_NETINET_IN6_H -# include -#endif - int main(int argc, char **argv) { - int s = socket(PF_INET6, SOCK_STREAM, 0); - int tos = 0; - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &tos, sizeof(int)) < 0) - return 1; - else - return 0; - } - ]])],[ AC_MSG_RESULT(yes) - use_v4mapped=yes - AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets]) - ],[ AC_MSG_RESULT(no) - AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [Enable v4-mapping through v6 sockets]) - use_v4mapped=no - ],[]) - fi - -dnl if we can't defer v4-mapping to the OS we are forced to split-stack the FD table. - AC_MSG_CHECKING([for IPv6 stack type/mode]) - if test "$use_v4mapped" = "yes"; then - AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets. Requires IPv6 hybrid-stack.]) - AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 0, [Enable support for IPv6 on split-stack implementations]) - AC_MSG_RESULT(mapping hybrid) - else - AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [Enable v4-mapping through v6 sockets. Requires IPv6 hybrid-stack.]) - AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 1, [Enable support for IPv6 on split-stack implementations]) - AC_MSG_RESULT(split-stack or BSD non-mapping dual-stack) - fi dnl Check whether this OS defines sin6_len as a member of sockaddr_in6 as a backup to ss_len AC_CACHE_CHECK([for sin6_len field in struct sockaddr_in6], @@ -2769,8 +2715,6 @@ else # IPv6 is not available, but is not explicitly required. Auto-Disable. AC_DEFINE(USE_IPV6,0,[Enable support for IPv6]) - AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations]) - AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets]) SET_IPV6_SETTINGS="\#IPv6 Not Available: " fi AC_SUBST(SET_IPV6_SETTINGS) === modified file 'src/acl/Ip.cc' --- src/acl/Ip.cc 2010-01-16 04:33:11 +0000 +++ src/acl/Ip.cc 2010-05-15 09:19:58 +0000 @@ -421,10 +421,6 @@ hints.ai_flags |= AI_NUMERICHOST; } -#if 0 && USE_IPV6 && !IPV6_SPECIAL_SPLITSTACK - hints.ai_flags |= AI_V4MAPPED | AI_ALL; -#endif - int errcode = xgetaddrinfo(addr1,NULL,&hints,&hp); if (hp == NULL) { debugs(28, 0, "aclIpParseIpData: Bad host/IP: '" << addr1 << === modified file 'src/comm.cc' --- src/comm.cc 2010-05-14 12:40:35 +0000 +++ src/comm.cc 2010-05-15 21:19:50 +0000 @@ -661,7 +661,10 @@ debugs(50, 1, "comm_open: setsockopt(IPV6_V6ONLY) on FD " << fd << ": " << xstrerror()); } #else - debugs(50, 0, "WARNING: comm_open: setsockopt(IPV6_V6ONLY) not supported on this platform"); + static bool warned = 0; + if (!warned) + debugs(50, DBG_CRITICAL, "WARNING: setsockopt(IPV6_V6ONLY) not supported on this platform. May cause troble connecting to IPv4 sites."); + warned = 1; #endif /* sockopt */ } @@ -756,20 +759,11 @@ tos = TOS; } -#if IPV6_SPECIAL_SPLITSTACK - - if ( addr.IsIPv6() ) - comm_set_v6only(new_socket, tos); - -#endif - -#if IPV6_SPECIAL_V4MAPPED - - /* Windows Vista supports Dual-Sockets. BUT defaults them to V6ONLY. Turn it OFF. */ +#if USE_IPV6 + /* Windows Vista and later supports Dual-Sockets. BUT defaults V6ONLY. Turn it OFF. */ /* Other OS may have this administratively disabled for general use. Same deal. */ if ( addr.IsIPv6() ) comm_set_v6only(new_socket, 0); - #endif /* update fdstat */ @@ -1051,11 +1045,11 @@ if (F->tos) comm_set_tos(fd, F->tos); -#if IPV6_SPECIAL_SPLITSTACK - +#if USE_IPV6 + /* Windows Vista and later supports Dual-Sockets. BUT defaults V6ONLY. Turn it OFF. */ + /* Other OS may have this administratively disabled for general use. Same deal. */ if ( F->local_addr.IsIPv6() ) - comm_set_v6only(fd, F->tos); - + comm_set_v6only(fd, 0); #endif copyFDFlags(fd, F); === modified file 'src/ip/IpAddress.h' --- src/ip/IpAddress.h 2010-05-14 04:16:42 +0000 +++ src/ip/IpAddress.h 2010-05-15 09:19:58 +0000 @@ -331,11 +331,7 @@ \param ai structure to be filled out. \param force a specific sockaddr type is needed. default: don't care. */ -#if IPV6_SPECIAL_V4MAPPING - void GetAddrInfo(struct addrinfo *&ai, int force = AF_INET6) const; -#else void GetAddrInfo(struct addrinfo *&ai, int force = AF_UNSPEC) const; -#endif /** * Equivalent to the sysem call freeaddrinfo() but for IpAddress allocated data # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWSNV5j0ABxRfgEQQeff//3/n 36i////wYArd99j69cleoAKADa7u26HXRw6ZEiiqCSU1PRJ+qPKepkGgPUMmmm1A9Q00DQaA0NAc ZMmhiMTRgEYCYQBgJpo0yNAMV6SnkjygeoADQAAAAAAAACRJNNNNRFPHpqnkNKYno9QaBGIxGho9 NGmhAikTQmQjIMGqNkaQ00ajI9DU2oeoGhkaeoJJAEABCp+pgyU0NMk9TMJoyRkPU0A8pIFns2ao jVqnzLM5YCHBEpdOzjw5SVh/VvbpLULPRYw76MXWduKB6BkGyZUuLMMYQtaSmgIZ22UdFFIFpdEN rZwVVTLJ1tdVUqN79OIELAfIfJ8Lsx0s93Kg/kX4CaE2NtjbbYVOrcdIlxZ8GC0rKNWUFw1RZ4Si RMztahe73TCUDJ8Hwura8kqOloq7noas7m+PCSnjE7L76Vwdi7O4XGtZK7wlwcZjgYEEgui1lzN1 SyVTYZUsNHYW8JkLQYMOT6YGgpR0oCwiRPr+HxoYJhluMDGUYzRia+eQtYxsPzNHbK0RUtSAoWSU cKyS13ljQaG3VcNQoI2t31bVyNlpUZGVaDygnTtPF27bUq/OH3ZXXTw78u+eABRO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