httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: Linux + TCP_CORK + IPv6 = Broken [PATCH]
Date Wed, 04 Dec 2002 12:44:01 GMT
As Jeff suggested a while back do we know which versions of the linux kernel
are affected by this problem? If so we can probably have the flag
automagically set.

Otherwise this looks OK to me.

david

----- Original Message -----
From: "Colm MacCárthaigh" <colmmacc@Redbrick.DCU.IE>
To: <dev@httpd.apache.org>
Cc: <trawick@attglobal.net>; <dev@apr.apache.org>
Sent: Wednesday, December 04, 2002 12:30 PM
Subject: Re: Linux + TCP_CORK + IPv6 = Broken [PATCH]


> On Wed, Dec 04, 2002 at 12:25:49PM +0000, Colm MacCárthaigh wrote:
> > My tests (and patch) were based on apr and apr-util from CVS ,
> > with the 2.0.43 codebase, because CVS seems broken right now.
>
> stupid pre-test patch, here's the real one:
>
> Index: configure.in
> ===================================================================
> RCS file: /home/cvspublic/apr/configure.in,v
> retrieving revision 1.506
> diff -u -r1.506 configure.in
> --- configure.in 2 Dec 2002 16:07:09 -0000 1.506
> +++ configure.in 4 Dec 2002 12:29:41 -0000
> @@ -1770,6 +1770,16 @@
>  echo "${nl}Checking for IPv6 Networking support..."
>  dnl Start of checking for IPv6 support...
>
> +use_ipv6_tcp_cork=1
> +AC_ARG_ENABLE(ipv6-tcp-cork,
> +  [  --disable-ipv6-tcp-cork Disable TCP_CORK with IPv6.],
> +  [  if test "$enableval" = "no"; then
> +        use_ipv6_tcp_cork=0
> +     fi ],
> +  [ use_ipv6_tcp_cork=1 ] )
> +
> +AC_SUBST(use_ipv6_tcp_cork)
> +
>  AC_ARG_ENABLE(ipv6,
>    [  --disable-ipv6          Disable IPv6 support in APR.],
>    [ if test "$enableval" = "no"; then
> Index: include/apr.h.in
> ===================================================================
> RCS file: /home/cvspublic/apr/include/apr.h.in,v
> retrieving revision 1.117
> diff -u -r1.117 apr.h.in
> --- include/apr.h.in 22 Oct 2002 12:37:40 -0000 1.117
> +++ include/apr.h.in 4 Dec 2002 12:29:41 -0000
> @@ -171,6 +171,11 @@
>   */
>  #define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
>
> +/* Should we use "corked" TCP with IPv6 ? (this seems to be broken on
> + * linux
> + */
> +#define APR_USE_IPV6_TCP_CORK     @use_ipv6_tcp_cork@
> +
>  /* Is the TCP_NODELAY socket option inherited from listening sockets?
>  */
>  #define APR_TCP_NODELAY_INHERITED @tcp_nodelay_inherited@
> Index: network_io/unix/sockopt.c
> ===================================================================
> RCS file: /home/cvspublic/apr/network_io/unix/sockopt.c,v
> retrieving revision 1.63
> diff -u -r1.63 sockopt.c
> --- network_io/unix/sockopt.c 20 Nov 2002 03:50:21 -0000 1.63
> +++ network_io/unix/sockopt.c 4 Dec 2002 12:29:42 -0000
> @@ -259,7 +259,12 @@
>          return APR_ENOTIMPL;
>  #endif
>      }
> +#if APR_USE_IPV6_TCP_CORK
>      if (opt & APR_TCP_NOPUSH) {
> +#else
> +    if (opt & APR_TCP_NOPUSH && sock->remote_addr->sa.sin.sin_family
!=
APR_INET6) {
> +#endif
> +
>  #if APR_TCP_NOPUSH_FLAG
>          if (apr_is_option_set(sock->netmask, APR_TCP_NOPUSH) != on) {
>              int optlevel = IPPROTO_TCP;
>
> --
> colmmacc@redbrick.dcu.ie        PubKey: colmmacc+pgp@redbrick.dcu.ie
> Web:                                 http://devnull.redbrick.dcu.ie/
>


Mime
View raw message