Fix %<chi> with PROXY Protocol#8893
Merged
masaori335 merged 1 commit intoapache:masterfrom Jul 5, 2022
Merged
Conversation
masaori335
commented
Jun 8, 2022
|
|
||
| if (netvc->has_proxy_protocol(reader)) { | ||
| Debug("proxyprotocol", "ioCompletionEvent: http has proxy protocol header"); | ||
| netvc->set_remote_addr(netvc->get_proxy_protocol_src_addr()); |
Contributor
Author
There was a problem hiding this comment.
This is the main change.
masaori335
commented
Jun 8, 2022
|
|
||
| if (this->has_proxy_protocol(buffer, &r)) { | ||
| Debug("proxyprotocol", "ssl has proxy protocol header"); | ||
| set_remote_addr(get_proxy_protocol_src_addr()); |
Contributor
Author
There was a problem hiding this comment.
This is the main change.
Contributor
Author
There was a problem hiding this comment.
I'm wondering if we can unify these code in the SSLNetVConnection and ProtocolProbeSessionAccept, but it's out of scope from this PR.
Contributor
Author
|
The doc of |
ywkaras
approved these changes
Jul 5, 2022
Contributor
|
It kinda feels like this is borderline incompatible change, in that the logging behavior of %{chi} could possibly change. The odds of this happening is small, but we should consider this and make sure we don't break the compatibility contracts. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #8544.
Prior to this change, the source address in the PROXY Protocol message was set as the remote address when it was parsed.
Now,
%<chi>always represents the previous hop.