# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: henrik@henriknordstrom.net-20100515092707-\ # 15h0ryc31c5u2hy9 # target_branch: http://squid-cache.org/bzr/squid3/branches/SQUID_3_1/ # testament_sha1: a52f5323318b3f25edac285549273fce70421016 # timestamp: 2010-05-15 11:27:26 +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 09:27:07 +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, 0, "WARNING: setsockopt(IPV6_V6ONLY) not supported on this platform. May caouse trobles connecting to IPv4 sites."); + warned = 0; #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 - +#if USE_IPV6 /* Windows Vista supports Dual-Sockets. BUT defaults them to 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 supports Dual-Sockets. BUT defaults them to 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 IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWV6O9rAABVVfgEQQeff//3/n 36i////wYAkd9sazFAAACkgoggAFQkkUwjQyaNTJtJhTT0yn6jQamJpkepoYmnoJ6hxkyaGIxNGA RgJhAGAmmjTI0AxxkyaGIxNGARgJhAGAmmjTI0Aw1MJMmUQ9TYjUekNGTQAAAAepppoAcZMmhiMT RgEYCYQBgJpo0yNAMJIgTRMCMpiBqZNDVNknqemmmggA9QGIgApvT1HQuoKKzYZGh+1Wk6sJAFXG MHRlI7pP07YYjEwtBi6tX3PWEiaFHstrg8lJkiVrMWUwjGFITHvhgJDbOAogMXifixc8G7aUtiJk MIZhmZhmYmSjJsiwMFymZ4tiehAhCQUuQ0FFLQpKTZEMFCbzV8JEY4nQOUlKJCJLfMLA4i1mzaqX RMuMKKg9z2lZdgSWr37JUGn4LRkVgtmUaxIJiVBBYfHlZIHgmaOKEEhILdnRqMHvu7LZh/iYizQ3 QDT00lpm2Pb7/E6uhNvMYBhaQnv5SCylcNrqSgBhflMsCo7FixsACtUbAUDcYEqjCPJmxv7SmtPd zWcupQp8LWMedTXBXxTDGE249xeSFfNxKOFTQARfDIxlAsjzKiIolj2bxnz4n7lhV9tbBMcCiqoo S4n1r4djMlU2bn31B3eH3iOXkZ52iAdMcYPdyoMwwJMg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