httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 44806] Set the IP address+port used for backend proxy requests.
Date Thu, 05 Jun 2008 09:54:48 GMT

--- Comment #23 from rahul <>  2008-06-05 02:54:47 PST ---
> modules/proxy/mod_proxy.c
> Parser:  Boundary condition.  If we're defining PORT_MAX_PORTS as 65536
> (0x00010000), then "(ports+r) >= ..." on line 1741 is the error condition we
> need to check for.  Add an equals sign.


> modules/proxy/proxy_util.c
> @@ -2349,6 +2373,20 @@  Non-critical issue (cosmetic):
> Note:  In your design, you're reporting the error of a failure to bind for the
> first address only when all fail, while in my version in comment #17, moving
> the ap_log_error() call inside the loop (and after the break) will report EACH
> address that fails, even if some address succeeds.  We also don't need to keep
> the status in "rv" as "addr" will be set on success and NULL on failure. 
> Difference:
> Your version:  Reports the error only if all addresses & ports fail.
> My version:  Reports an error for each address where all ports fail.

Actually if you check my version of bind_to_addr, you will see that I am
printing a log on each time an attempt is made to bind, with a log that reports
when a binding is successful. I think there is no loss of information in my
case too. (Any address that was tried but did not result in a bind is a failed

> As adjusted, I attempted to install the patch and run it.  I found the
> following problems when patching against a stock version 2.2.8:
> +++ modules/proxy/mod_proxy.c   (working copy)
> @@ -35,6 +35,12 @@
> Patch was rejected.  I manually inserted it.  Trailing text did not match.
> All other items did install, but some had different line offsets.

My diffs were against 2.3 trunk. since this is valid in trunk also we should
change the version to trunk ?

> Compilation errors:
> My C compiler did not like the declarations inside the for() loops
> modules/proxy/proxy_util.c: 2275:  "int i"
> modules/proxy/proxy_util.c: 2378:  "apr_sockaddr_t *addr"
> Moving those declarations outside of the loops onto their own line worked.


> Operation:
> ProxyBindAddress allowed in main server configuration.
> ProxyBindAddress allowed inside VirtualHost configuration.
> ProxyBindAddress allowed inside <IfModule mod_proxy.c> configuration.
> ProxyBindAddress NOT allowed inside <Proxy "*"> configuration - acceptable, but
> unexpected.
> Configured it with a hostname only resolving to one IPv4 and one IPv6 address.
> Did NOT see any binding attempts in logs.
> Saw ONLY "[error] proxy: HTTP: All addresses and ports in range specified
> failed to bind"
> Removed address-family comparison; added AF to debug string; recompiled.
> Still saw it.  Inserted a debug-log entry and found conf->bind_addr is NULL. 
> Set port options in the config file - different options for the main
> configuration and a virtual host that has proxy service, but found that at the
> time of the call, port+range = "0+0" - NOT the same as set.

> Are we certain that the configuration pointer value used when proxying is the
> same configuration pointer value that was used during configuration - i.e. same
> memory address?

That is interesting, In my testing, it seems to work fine? could you check this
against a 2.3 trunk checkout?

> Just in case I made any accidental changes, I've included my differences,
> complete with DEBUGGING statements that should be removed before the final
> version is released and incorporated into the mainstream program.
> File:  modules/proxy/mod_proxy.h - patch same as proposed, and therefore
> excluded.

Configure bugmail:
------- 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