httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56687] New: ProxySourceAddress failed to bind socket to local address
Date Tue, 01 Jul 2014 09:38:01 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56687

            Bug ID: 56687
           Summary: ProxySourceAddress failed to bind socket to local
                    address
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_connect
          Assignee: bugs@httpd.apache.org
          Reporter: apache@arbruijn.dds.nl

Created attachment 31775
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31775&action=edit
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 192.168.1.192:50519] AH00938: CONNECT: failed to bind socket to local
address

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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message