Hello
I think this is finally working:
I think we're missing the client_port parameter, so I have been set that:
------------------------------------
#if LINUX_TPROXY
                    if (orig_request->flags.tproxy) {
                        client_addr = &httpState->request->client_addr;
                    }
#endif
--------->         client_addr = &httpState->request->client_addr; <-------
--------->         client_port = httpState->request->client_port; <----------
                    /* yes we have to clear all these! */
                    commSetDefer(fd, NULL, NULL);
                    commSetTimeout(fd, -1, NULL, NULL);
                    commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
#if DELAY_POOLS
                    delayClearNoDelay(fd);
#endif
                    comm_remove_close_handler(fd, httpStateFree, httpState);
                    fwdUnregister(fd, httpState->fwd);
                    if (request->flags.pinned) {
                        pinned = 1;
                    } else if (request->flags.connection_auth && 
request->flags.auth_sent) {
                        pinned = 1;
                    }
                    if (orig_request->pinned_connection && pinned) {
                        clientPinConnection(orig_request->pinned_connection, 
fd, orig_request, httpState->peer, request->flag
s.connection_auth);
                    } else if (httpState->peer) {
                        if (httpState->peer->options.originserver)
                            pconnPush(fd, httpState->peer->name, 
httpState->peer->http_port, httpState->orig_request->host, c
lient_addr, client_port);
                        else
                            pconnPush(fd, httpState->peer->name, 
httpState->peer->http_port, NULL, client_addr, client_port);
                    } else {
                        pconnPush(fd, request->host, request->port, NULL, 
client_addr, client_port);
                    }
                    fwdComplete(httpState->fwd);
                    httpState->fd = -1;
                    httpStateFree(fd, httpState);
                } else {
                    fwdComplete(httpState->fwd);
                    comm_close(fd);
                }
            }
-----------------------------------------
Now, I would add a check to know if there exists at least one (or two) 
tcp_outgoing_address. This will made compatible tcp_outgoing_address with 
persistent_connection. :)
Thanks a lot Henrik!
>
> Not ok... You changed the domain component of the key, not the
> client_addr.. Undo this..
>
> If you look a few lines higher up you find the client_addr assignment.
> It's there you need to make the change. Just removing the tproxy if
> (both the preprocessor one, and the if statement, making it always
> assigned should be fine I think.
>
> 		client_addr = &httpState->request->client_addr;
>
BR,
Francisco Gimeno
This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:02 MST