-
Notifications
You must be signed in to change notification settings - Fork 844
TS-4622 Use port from SRV response when connecting to origin #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This closes apache#773
|
-1, this breaks |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/388/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/284/ for details. |
|
@jacksontj Maybe the right place to do this is when |
|
Yea, I'll have to look a bit more. Ideally its as close to that DNS lookup as possible, that way if some plugin wants to overwrite it I've done the change in core before they can (so that we won't be clobbering eachother). Have to look into it this week. |
|
@jpeach |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/455/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/349/ for details. |
| s->server_info.dst_addr.port() = htons(s->dns_info.srv_port); | ||
| } else { | ||
| s->server_info.dst_addr.port() = htons(s->hdr_info.client_request.port_get()); // now we can set the port. | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a plugin used TSHttpTxnServerAddrSet(), then at this point dst_addr may be the address set by the plugin in which case we should not clobber it. However it is already being clobbered from the request URL, so maybe the cases I tested were already broken (I was using port 80 and 443).
Setting the port from the SRV record should probably be conditional on srv_lookup_success.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change the conditional-- that definitely makes sense.
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/458/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/354/ for details. |
|
I did some testing of my own and I can't reproduce any problems with I tested calling the API on both the You mentioned in a previous comment that it was broken in your testing, can you share the code you were using to see it broken? |
|
👍 This looks good to me and I think it will be safe w/ "TsHttpTxnServerAddrSet()". |
This closes apache#773
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/464/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/360/ for details. |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/465/ for details. |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/466/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/361/ for details. |
|
Linux build failed! See https://ci.trafficserver.apache.org/job/Github-Linux/362/ for details. |
…pache#773)" This reverts commit d91457b. Github UI squashed the tests and the code change-- we want them separate
* asf/master: (44 commits) TS-4614: avoid e->schedule_in for dummy event. This closes apache#766. Use devtoolset-3 for ATS 7 and later, when available Updated some build instructions TS-4311 Removes support for SPDY completely TS-4683 Adds better error handling on config problems Add TSQA tests for https SRV records TS-4615 set SRV scheme based on next_hop_scheme Add some initial SRV tsqa tests TS-4622 use port from SRV response for origin connections Revert "TS-4622 Use port from SRV response when connecting to origin (apache#773)" TS-4622 Use port from SRV response when connecting to origin (apache#773) TS-4688 handle DNS compression labels in SRV responses (apache#812) cachekey/pattern.h: clang format TS-4667 Uses the WKS in the gzip plugin TS-4653: esi plugin - disable HTTP_COOKIE variable by default and implement a whitelist mechanism to allow the specified cookies for it Original code and idea contributed by Chris Rohlf TS-4680: thread safe initialization in TS*DirGet() functions TS-4652 Fixes log field initialization, previously crippled TS-4595: TSRuntimeDirGet TS-4689 Assert if Machine UUID init fails TS-4674: Remove useless assert statement (apache#809) ...
Make a separate process to await upon the needed log message so the Ready condition of the ts process doesn't race between finding the log message and noticing the process ended.
No description provided.