[jira] [Commented] (TS-4574) Let TSHttpTxnServerAddrSet clear the address
[ https://issues.apache.org/jira/browse/TS-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428746#comment-15428746 ] James Peach commented on TS-4574: - No, this is not fixed. The referenced pull request just mentions this ticket. > Let TSHttpTxnServerAddrSet clear the address > > > Key: TS-4574 > URL: https://issues.apache.org/jira/browse/TS-4574 > Project: Traffic Server > Issue Type: Improvement > Components: TS API >Reporter: James Peach >Assignee: James Peach > Fix For: 7.0.0 > > > After using {{TSHttpTxnServerAddrSet}} to route requests to a specific > destination, you might change your mind and decide to allow an internal DNS > lookup. > I propose that we allow {{TSHttpTxnServerAddrSet}} to take a {{NULL}} > argument to clear and API DNS result that was previously set. > {code} > diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc > index 5772c12..362bf32 100644 > --- a/proxy/InkAPI.cc > +++ b/proxy/InkAPI.cc > @@ -5336,6 +5336,13 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr > const *addr) >sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); >HttpSM *sm = reinterpret_cast(txnp); > + > + if (addr == NULL) { > +sm->t_state.api_server_addr_set = false; > +sm->t_state.server_info.dst_addr.setToAnyAddr(AF_INET); > +return TS_SUCCESS; > + } > + >if (ats_ip_copy(&sm->t_state.server_info.dst_addr.sa, addr)) { > sm->t_state.api_server_addr_set = true; > return TS_SUCCESS; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-4574) Let TSHttpTxnServerAddrSet clear the address
[ https://issues.apache.org/jira/browse/TS-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428719#comment-15428719 ] Alan M. Carroll commented on TS-4574: - [~jpe...@apache.org] - it looks like you fixed this already. Should the bug be closed? > Let TSHttpTxnServerAddrSet clear the address > > > Key: TS-4574 > URL: https://issues.apache.org/jira/browse/TS-4574 > Project: Traffic Server > Issue Type: Improvement > Components: TS API >Reporter: James Peach >Assignee: James Peach > Fix For: 7.0.0 > > > After using {{TSHttpTxnServerAddrSet}} to route requests to a specific > destination, you might change your mind and decide to allow an internal DNS > lookup. > I propose that we allow {{TSHttpTxnServerAddrSet}} to take a {{NULL}} > argument to clear and API DNS result that was previously set. > {code} > diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc > index 5772c12..362bf32 100644 > --- a/proxy/InkAPI.cc > +++ b/proxy/InkAPI.cc > @@ -5336,6 +5336,13 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr > const *addr) >sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); >HttpSM *sm = reinterpret_cast(txnp); > + > + if (addr == NULL) { > +sm->t_state.api_server_addr_set = false; > +sm->t_state.server_info.dst_addr.setToAnyAddr(AF_INET); > +return TS_SUCCESS; > + } > + >if (ats_ip_copy(&sm->t_state.server_info.dst_addr.sa, addr)) { > sm->t_state.api_server_addr_set = true; > return TS_SUCCESS; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-4574) Let TSHttpTxnServerAddrSet clear the address
[ https://issues.apache.org/jira/browse/TS-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15356271#comment-15356271 ] James Peach commented on TS-4574: - https://github.com/apache/trafficserver/pull/740#issuecomment-229524470 > Let TSHttpTxnServerAddrSet clear the address > > > Key: TS-4574 > URL: https://issues.apache.org/jira/browse/TS-4574 > Project: Traffic Server > Issue Type: Improvement > Components: TS API >Reporter: James Peach > Fix For: 7.0.0 > > > After using {{TSHttpTxnServerAddrSet}} to route requests to a specific > destination, you might change your mind and decide to allow an internal DNS > lookup. > I propose that we allow {{TSHttpTxnServerAddrSet}} to take a {{NULL}} > argument to clear and API DNS result that was previously set. > {code} > diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc > index 5772c12..362bf32 100644 > --- a/proxy/InkAPI.cc > +++ b/proxy/InkAPI.cc > @@ -5336,6 +5336,13 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr > const *addr) >sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); >HttpSM *sm = reinterpret_cast(txnp); > + > + if (addr == NULL) { > +sm->t_state.api_server_addr_set = false; > +sm->t_state.server_info.dst_addr.setToAnyAddr(AF_INET); > +return TS_SUCCESS; > + } > + >if (ats_ip_copy(&sm->t_state.server_info.dst_addr.sa, addr)) { > sm->t_state.api_server_addr_set = true; > return TS_SUCCESS; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-4574) Let TSHttpTxnServerAddrSet clear the address
[ https://issues.apache.org/jira/browse/TS-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345337#comment-15345337 ] James Peach commented on TS-4574: - Rather than {{setToAnyAddr}} we should probably call {{ats_ip_invalidate}}. Not sure why {{IpEndpoint}} doesn't have a {{invalidate()}} method; that seems like a more natural way to do it. Note to self ... there are assertions in the state machine that would probably not be triggered by {{ats_ip_invalidate}}, so invalidation ought to zero the port too. > Let TSHttpTxnServerAddrSet clear the address > > > Key: TS-4574 > URL: https://issues.apache.org/jira/browse/TS-4574 > Project: Traffic Server > Issue Type: Improvement > Components: TS API >Reporter: James Peach > > After using {{TSHttpTxnServerAddrSet}} to route requests to a specific > destination, you might change your mind and decide to allow an internal DNS > lookup. > I propose that we allow {{TSHttpTxnServerAddrSet}} to take a {{NULL}} > argument to clear and API DNS result that was previously set. > {code} > diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc > index 5772c12..362bf32 100644 > --- a/proxy/InkAPI.cc > +++ b/proxy/InkAPI.cc > @@ -5336,6 +5336,13 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr > const *addr) >sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); >HttpSM *sm = reinterpret_cast(txnp); > + > + if (addr == NULL) { > +sm->t_state.api_server_addr_set = false; > +sm->t_state.server_info.dst_addr.setToAnyAddr(AF_INET); > +return TS_SUCCESS; > + } > + >if (ats_ip_copy(&sm->t_state.server_info.dst_addr.sa, addr)) { > sm->t_state.api_server_addr_set = true; > return TS_SUCCESS; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-4574) Let TSHttpTxnServerAddrSet clear the address
[ https://issues.apache.org/jira/browse/TS-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15343066#comment-15343066 ] James Peach commented on TS-4574: - RFC [~zwoop] [~bcall] [~amc] > Let TSHttpTxnServerAddrSet clear the address > > > Key: TS-4574 > URL: https://issues.apache.org/jira/browse/TS-4574 > Project: Traffic Server > Issue Type: Improvement > Components: TS API >Reporter: James Peach > > After using {{TSHttpTxnServerAddrSet}} to route requests to a specific > destination, you might change your mind and decide to allow an internal DNS > lookup. > I propose that we allow {{TSHttpTxnServerAddrSet}} to take a {{NULL}} > argument to clear and API DNS result that was previously set. > {code} > diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc > index 5772c12..362bf32 100644 > --- a/proxy/InkAPI.cc > +++ b/proxy/InkAPI.cc > @@ -5336,6 +5336,13 @@ TSHttpTxnServerAddrSet(TSHttpTxn txnp, struct sockaddr > const *addr) >sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); >HttpSM *sm = reinterpret_cast(txnp); > + > + if (addr == NULL) { > +sm->t_state.api_server_addr_set = false; > +sm->t_state.server_info.dst_addr.setToAnyAddr(AF_INET); > +return TS_SUCCESS; > + } > + >if (ats_ip_copy(&sm->t_state.server_info.dst_addr.sa, addr)) { > sm->t_state.api_server_addr_set = true; > return TS_SUCCESS; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)