You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2011/08/02 23:56:27 UTC

[jira] [Resolved] (TS-836) ParentProxySet does not set parent IP

     [ https://issues.apache.org/jira/browse/TS-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-836.
------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 3.1.0)
         Assignee: Leif Hedstrom

I'm fairly certain this is a duplicate of TS-859, please reopen if that's not the case.

> ParentProxySet does not set parent IP
> -------------------------------------
>
>                 Key: TS-836
>                 URL: https://issues.apache.org/jira/browse/TS-836
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: TS API
>    Affects Versions: 2.1.9
>            Reporter: M. Nunberg
>            Assignee: Leif Hedstrom
>
> The following code will result in a socket connection being made to the OS:54321
> #include <sys/socket.h>
> typedef struct sockaddr_storage sockaddr_storage; /*And i need to do this because of another bug*/
> #include <ts/ts.h>
> #include <assert.h>
> #include <stdlib.h>
> #include <netinet/in.h>
> static int hook_os_dns(TSCont contp, TSEvent event, void *edata)
> {
> 	TSHttpTxn txnp = edata;
> 	TSHttpTxnParentProxySet(txnp, "172.29.70.140", 54321);
> 	TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
> 	return 0;
> }
> void TSPluginInit(int arg, const char *argv[])
> {
> 	TSPluginRegistrationInfo info = { "foo", "bar", "baz" };
> 	TSPluginRegister(TS_SDK_VERSION_3_0, &info);
> 	TSCont os_dns_cont = TSContCreate(hook_os_dns, NULL);
> 	TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, os_dns_cont);
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira