You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (JIRA)" <ji...@apache.org> on 2011/07/12 11:06:59 UTC

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

    [ https://issues.apache.org/jira/browse/TS-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063778#comment-13063778 ] 

Igor Galić commented on TS-836:
-------------------------------

Which other bug? Can you relate them please?

> 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
>             Fix For: 3.1.0
>
>
> 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