httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 56687] New: ProxySourceAddress failed to bind socket to local address
Date Tue, 01 Jul 2014 09:38:01 GMT

            Bug ID: 56687
           Summary: ProxySourceAddress failed to bind socket to local
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_connect

Created attachment 31775
patch: copy source_address in ap_proxy_connect_to_backend

When I use ProxySourceAddress together with mod_proxy_connect to proxy https
connections I get occasional error messages in error_log like:

[proxy:error] [pid 8703:tid 139730268100352] (98)Address already in use:
[client] AH00938: CONNECT: failed to bind socket to local

and the ProxySourceAddress for that request is ignored.

The cause seems to be that ap_proxy_connect_to_backend (called by
mod_proxy_connect) calls apr_socket_bind with conf->source_address directly
passed as argument, so the selected local port is stored in
conf->source_address and used in subsequent binds. This fails if that port is
still in use.

The function ap_proxy_connect_backend (used by mod_proxy_http) makes a copy of
conf->source_address before passing it to apr_socket_bind, and when I tried
that for ap_proxy_connect_to_backend the problem disappeared (see patch).

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message